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 |
---|---|---|---|---|---|---|
This function updates content of categories listed in Used_categories.txt | void updateUsedCategoriesContent() {
try{
InputStream inputStream = DMOZCrawler.class.getResourceAsStream("Used_categories.txt");
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
HashSet<String> usedCategories = new HashSet<>();
String currentLine;
while ((currentLine = bufferedReader.readLine()) != null){
usedCategories.add(currentLine.toLowerCase());
System.out.println("Used category added :: " + currentLine);
}
System.out.println(usedCategories);
for(String id : usedCategories){
categoryContent(Integer.parseInt(id));
}
} catch (Exception exception){
exception.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateCategory(String category){}",
"void updateCategory(Category category);",
"void updateCategory(Category category);",
"public void UpdateCategoriesCheckRepeats(){\n dbHandler.OpenDatabase();\n ArrayList<Category> CategoryObjectList = dbHandler.getAllCategory();\n // Create Category String List\n ArrayList<String> CategoryStringList = new ArrayList<>();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n CategoryStringList.add( CategoryObjectList.get(i).getName() );\n }\n\n Category category;\n // cycle through object list\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n category = CategoryObjectList.get(i);\n CategoryObjectList.remove(i);\n CategoryStringList.remove(i); // remove so it doesn't find itself\n\n // find name in Category List\n int index = CategoryStringList.indexOf( category.getName() );\n\n if (index == -1){\n CategoryObjectList.add(category);\n CategoryStringList.add(category.getName());\n }else{\n CategoryObjectList.get(index).increaseCounter( category.getCounter() );\n CategoryObjectList.get(index).increaseAmount( category.getAmount() );\n i--;\n }\n }\n\n // Add back to database\n dbHandler.deleteAllCategory();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n dbHandler.addCategory(CategoryObjectList.get(i));\n }\n\n dbHandler.CloseDatabase();\n }",
"private void updateCategoryTree() {\n categoryTree.removeAll();\r\n fillTree(categoryTree);\r\n\r\n }",
"@Override\n public void updateCategories(List<String> categories) {\n //Update the Category Spinner with the new data\n mCategorySpinnerAdapter.clear();\n //Add the Prompt as the first item\n categories.add(0, mSpinnerProductCategory.getPrompt().toString());\n mCategorySpinnerAdapter.addAll(categories);\n //Trigger data change event\n mCategorySpinnerAdapter.notifyDataSetChanged();\n\n if (!TextUtils.isEmpty(mCategoryLastSelected)) {\n //Validate and Update the Category selection if previously selected\n mPresenter.updateCategorySelection(mCategoryLastSelected, mCategoryOtherText);\n }\n }",
"private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void modifyRadarTechnologiesInformation(List<CategoryUpdate> updateList);",
"public void setCategory(String newCategory) {\n category = newCategory;\n }",
"private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }",
"public void setCategories(Categories categories) {\n this.categories = categories;\n }",
"@Override\n\tpublic void updateCategory(Category cat) {\n\t\tdao.updateCategory(cat);\n\t\t\n\t}",
"public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }",
"UpdateCategoryResponse updateCategory(UpdateCategoryRequest request) throws RevisionException;",
"public Categorie updateCategorie(Categorie c);",
"public static void kategorien_aus_inhaltsverzeichnis_abfangen (String htmlfile)\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n \t\n \t// hole kateogrienamen: aus inhaltsverziechnis:\n \tString kategoriename = \"\";\n \t\n \t// Oberkategorie Kategorie steht zwischen:\n \t// <p style=\"margin-top: 0.21cm; margin-bottom: 0.21cm; text-transform: uppercase\">\n \t// und\n \t// </a></font></font></p>\n \t\n \t\n \t\n \t// adde kategorienamen in combo:\n \n\t\t\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFile kategorienfile = new File (\"kategorien.txt\");\n \t\tif (kategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tkategorienfile.delete();\n \t\t\t}\n \t\tFile unterkategorienfile = new File (\"unterkategorien.txt\");\n \t\tif (unterkategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tunterkategorienfile.delete();\n \t\t\t}\n \t\t\n \t\tFileWriter fwk1 = new FileWriter (kategorienfile,true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n } // while\n } // try\n catch (Exception yx)\n {\n \tSystem.out.println (\"konnte kategorien aus inhaltverszeichnis nicht auslesen.\");\n }\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void update(Categories cate) {\n\t\tcategoriesDAO.update(cate);\n\t}",
"public String updateCategory()\n {\n logger.info(\"**** In updateCategory in Controller ****\");\n boolean flag = categoryService.updateCategory(category);\n if (flag)\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.CATEGORY_UPDATION_SUCCESS, Constants.CATEGORY_UPDATION_SUCCESS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n return searchCategory();\n }",
"public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }",
"public void category(String menuCategory) {\n for (WebElement element : categories) {\n\n if (menuCategory.equals(CategoryConstants.NEW_IN.toString())) {\n String newin = menuCategory.replace(\"_\", \" \");\n menuCategory = newin;\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String elementText = element.getText();\n if (elementText.equals(menuCategory)) {\n element.click();\n\n break;\n }\n }\n }",
"private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}",
"public void updatePortletCategory(PortletCategory category);",
"public void SetCategory(String text) {\n\t\t\n\t\t\n\t\tCategory_label.setText(text);\n\t}",
"@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }",
"public final void readCategoria() {\n cmbCategoria.removeAllItems();\n cmbCategoria.addItem(\"\");\n categoryMapCategoria.clear();\n AtividadePreparoDAO atvprepDAO = new AtividadePreparoDAO();\n for (AtividadePreparo atvprep : atvprepDAO.readMotivoRetrabalho(\"Categoria\")) {\n Integer id = atvprep.getMotivo_retrabalho_id();\n String name = atvprep.getMotivo_retrabalho();\n cmbCategoria.addItem(name);\n categoryMapCategoria.put(id, name);\n }\n }",
"public static void updateCategoryName(Context context, Category category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category.category);\r\n\r\n db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n values,\r\n DbContract.CategoryTable._ID + \" = ?\",\r\n new String[]{Integer.toString(category._id)}\r\n );\r\n db.close();\r\n }",
"@Override\n\tprotected void updateRecord(String[] data) {\n\t\tCategory category = new Category();\n\t\tcategory.setId(new Integer(data[0]));\n\t\tcategory.setName(data[1]);\n\t\tcategory.setGameId(new Integer(data[2]));\n\t\tnew Categories().update(category);\n\t}",
"public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }",
"public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\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_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}",
"private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}",
"Boolean updateCategory(DvdCategory category) throws DvdStoreException;",
"public void updateToNewest(){\n\t\tif(!isUpdateInfoNull()){\n\t\t\tVersionUtil.updateToNewestBasiclistCategory(currentRegionId);\n\t\t\theadStatus = \"normal\";\n\t\t\tinitRootNodeByVersionId(\"head\");\n\t\t\tdoVersionCampare();\n\t\t}\n\t\tRequestContext.getCurrentInstance().execute(\"PF('updateCategories').hide();\");\n\t}",
"public void modifyCategory(Category c) {\n\t\tcategoryDao.update(c);\n\t}",
"private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }",
"public void setCategory(String category);",
"private void uploadCategoriesChanges(JSONObject json) throws UnsupportedEncodingException {\n RestClient.put(this, RestClient.UPDATE_CATEGORY_URL, json, username, password,\n new JsonHttpResponseHandler() {\n @Override\n public void onFailure(int statusCode, Header[] headers,\n Throwable throwable, JSONObject errorResponse) {\n Log.d(DEBUG_TAG, \"updating category failure \" + errorResponse.toString());\n }\n });\n }",
"@NoProxy\n @NoWrap\n @NoDump\n @Override\n public void setCategoryHrefs(final Set<String> val) {\n categoryUids = val;\n }",
"@Override\n @IcalProperty(pindex = PropertyInfoIndex.CATEGORIES,\n adderName = \"category\",\n jname = \"categories\",\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setCategories(final Set<BwCategory> val) {\n categories = val;\n }",
"public void changeCategory(Category newCategory) {\n this.category = newCategory;\n }",
"public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}",
"public static void old_kategorien_aus_grossem_text_holen (String htmlfile) // alt, funktioniert zwar bis auf manche\n\t// dafür müsste man nochmal loopen um dien ächste zeile derü berschrift auch noch abzufangen bei <h1 class kategorie western\n\t// da manche bausteine in die nächste zeile verrutscht sind.\n\t// viel einfacher geht es aus dem inhaltsverzeichnis des katalogs die kategorien abzufangen.\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n // System.out.println(\"Gelesene Zeile: \" + zeile);\n \t\n \t\n \t// 1. Pruefe ob die Zeile eine Kategorie ist: wenn ja Extrahiere diese KATEGORIE aus dem Code:\n \t// Schema <h1 class=\"kategorie-western\"><a name=\"_Toc33522153\"></a>Bescheide\n \t// Rücknahme 44 X\t</h1>\n \t/*if (zeile.contains(\"<h1\"))\n \t\t\t{\n \t\t\t// grussformeln:\n \t\tzeile.replace(\"class=\\\"kategorie-western\\\" style=\\\"page-break-before: always\\\">\",\"\");\n \t\t\n \t\t\t}\n \t*/\n \t// der erste hat immer noch ein page-break before: drinnen; alle anderen haben dann kategorie western ohne drin\n \tif (zeile.contains(\"<h1 class=\\\"kategorie-western\\\"\"))\n \t\t\t/*zeile.contains(\"<h1 class=\\\"kategorie-western\\\">\") /*|| zeile.contains(\"</h1>\")*/\n \t{\n \t\tSystem.out.println (zeile + \"\\n\"); // bis hier werden alle kategorien erfasst !\n \t\t\n \t\t// hier passiert es, dass vllt. die kategorie in die nächste Zeile gerutscht ist:\n \t\t// daher nochmal loopen und mit stringBetween die nächste einfangen:\n \t\t\n \t\tString kategoriename = \"\";\n \t/*\tif (zeile.contains(\"</h1>\") && !zeile.contains(\"<h1 class=\")) // das ist immer der fall wenn es in die nächste zeile rutscht , weil der string zu lang ist:\n \t\t{\n \t\t\t kategoriename = zeile.replace(\"</h1>\", \"\");\n \t\t}\n \t\telse\n \t\t{\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t}*/\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t \n \t\t if (! zeile.contains(\"</h1>\")) // dann ist es in die nächste Zeile gerutscht\n \t\t {\n \t\t\t // hole nächste Zeile und vervollständige damit kategorie:\n \t\t }\n\n \t\tif (kategoriename == null || kategoriename ==\"\")\n \t\t{\n \t\t\t// keine kategorie adden (leere ist sinnlos)\n \t\t}\n \t\n \t\t\tif (kategoriename.contains(\"lass=\\\"kategorie-western\\\">\"))\n \t\t\t{\n \t\t\t\tkategoriename.replace(\"lass=\\\"kategorie-western\\\">\", \"\");\n \t\t\t}\n \t\t\n \t\t\t//System.out.println (kategoriename + \"\\n\");\n \t\t/*\tkategoriename.replace(\"lass=\",\"\");\n \t\t\tkategoriename.replace(\"kategorie-western\",\"\");\n \t\t\tkategoriename.replace(\"\\\"\",\"\");\n \t\t\tkategoriename.replace(\">\",\"\");\n \t\t\tkategoriename.replace(\"/ \",\"\");*/\n\t \t\t//mainobject.kategoriencombo.addItem(kategoriename);\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFileWriter fwk1 = new FileWriter (\"kategorien.txt\",true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n \t\t\n \t}\n \t\n\n \n \t// 2. Pruefe ob die Zeile der Name eines Textbausteins ist d.h. Unterkateogrie:\n \t//<p style=\"margin-top: 0.21cm; page-break-after: avoid\"><a name=\"_Toc33522154\"></a>\n \t//Ablehnung erneute Überprüfung</p>\n // System.out.println (\"Ermittle alle Unterkateogrien (d.h. Textbausteinnamen an sich)... 243\\n\");\n\n \tif (zeile.contains(\"<p style=\\\"margin-top: 0.21cm; page-break-after: avoid\\\"><a name=\"))\n \t{\n \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n \t\tif (unterkategorie == null || unterkategorie ==\"\")\n \t\t{\n \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n \t\t}\n \t\telse\n \t\t{\n \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n \t\t\t\n \t\t\t\n\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\t//mainobject.bausteinecombo.addItem(unterkategorie);\n\n \t\t\tcount_unterkategorien = count_unterkategorien+1; // anzahl der bausteine anhand der bausteinnamen ermitteln \n \t\t\t// Schreibe die unter Kategorien in Textfile:\n\t \t\tFileWriter fwk2 = new FileWriter (\"unterkategorien.txt\",true);\n\t \t\tfwk2.write(unterkategorie+\"\\n\");\n\t \t\tfwk2.flush();\n\t \t\tfwk2.close();\n\n \t\t//unterkategorienamen[count_unterkategorien] = unterkategorie;\n \t\t// (= hier unterkateogrienamen)\n \t\t\n \t\t\n \t // parts.length = anzahl der bausteine müsste gleich count_unterkategorien sein.\n \t // jetzt zugehörigen baustein reinschreiben:\n \t // also je nach count_unterkateogerien dann den parts[count] reinschrieben:\n \t /* try {\n \t\t\tfwb.write(parts[count_unterkategorien]);\n \t\t} catch (IOException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\tSystem.out.println(\"503 konnte datei mit baustein nicht schreiben\");\n \t\t}\n \t \n \t */\n \t \n\n \t\t}\n \t\t\n \t\t\n \t\t \n \t} // if zeile contains\n \t\t \n \n }\t// while\n \n } // try\n catch (Exception y)\n {}\n \t\t \n \t\t \n\t \t// <p style=\"margin-left: 0.64cm; font-weight: normal\"> usw... text </p> sthet immer dazwischen\n\t \t/*if (zeile.contains(\"<p style=\\\"margin-left: 0.64cm; font-weight: normal\\\">\"))\n\t \t{\n\t \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n\t \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n\t \t\tif (unterkategorie == null || unterkategorie ==\"\")\n\t \t\t{\n\t \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n\t \t\t\t\n\t \t\t\t\n\t\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\tmainobject.bausteinecombo.addItem(unterkategorie);\n\t \t\t}\n\t \t}\n\t \t*/\n System.out.println (\"Alle Oberkategorien, Namen erfolgreich ermittelt und eingefügt 239\\n\");\n\n System.out.println (\"Alle Unterkategorien oder Bausteinnamen erfolgreich eingefügt 267\\n\");\n\n \n \n\t}",
"public void updateCategory(String[] idPath, String name, String[] parentIDPath) {\n\t\tremoveSubcategory(idPath);\n\t\tcreateCategory(DBUtils.validateAndCreateObjectID(idPath[idPath.length - 1]), name, parentIDPath);\n\t}",
"@Override\n\tpublic void update(Category entity) {\n\n\t}",
"private void updateContent(int pageIndex) {\n if(mCategoriesController == null){\n mCategoriesController = CategoriesController.getInstance();\n }\n switch (pageIndex) {\n case RADIOS_VIEW_INDEX:\n updateRadioList(mCategoriesController.getLastSelectedCategory().getRadioList());\n break;\n default:\n updateCategories(mCategoriesController.getCategories());\n }\n }",
"private void setSuggestedCategory() {\n if (selectedCategoryKey != null) {\n return;\n }\n if (suggestedCategories != null && suggestedCategories.length != 0) {\n selectedCategoryKey = suggestedCategories[0].getKey();\n selectCategory.setText(suggestedCategories[0].getName());\n }\n }",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }",
"public void setCategories(List<Category> categories) {\n LayoutInflater inflater = LayoutInflater.from(context);\n\n for (Category category : categories) {\n View categoryView = inflater.inflate(R.layout.bottom_sheet_dialog_category, null);\n\n TextView categoryText = (TextView) categoryView.findViewById(R.id.item_header);\n\n categoryText.setText(category.getName());\n\n rootView.addView(categoryView);\n\n for (Option option : category.getOptions()) {\n View optionView = inflater.inflate(R.layout.bottom_sheet_dialog_item, null);\n ImageView icon = (ImageView) optionView.findViewById(R.id.item_icon);\n\n icon.setImageDrawable(option.getIcon());\n\n TextView text = (TextView) optionView.findViewById(R.id.item_text);\n\n text.setText(option.getName());\n\n optionView.setOnClickListener(option.getListener());\n\n rootView.addView(optionView);\n }\n }\n }",
"@Override\r\n\tpublic void updateCategory(Category c) {\n\t\tem.merge(c);\r\n\t\t\r\n\t}",
"private void listadoCategorias() {\r\n sessionProyecto.getCategorias().clear();\r\n sessionProyecto.setCategorias(itemService.buscarPorCatalogo(CatalogoEnum.CATALOGOPROYECTO.getTipo()));\r\n }",
"public void setCategoryName(final String categoryName);",
"@Override\n\tpublic ZuelResult modifyContentCategory(TbContentCategory contentCategory) throws ServiceException {\n\t\ttry{\n contentCategory.setUpdated(new Date());\n boolean isModified = service.modifyContentCategory(contentCategory);\n if(isModified){ \n return ZuelResult.ok();\n }\n }catch(ServiceException e){\n e.printStackTrace();\n throw e;\n }\n return ZuelResult.error(\"服务器忙,请稍后重试\");\n\t}",
"public void setCategories(List<CategoryMappingValue> categories) {\r\n\t\tthis.categories = categories;\r\n\t}",
"static public void set_category_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"category name:\"};\n\t\tEdit_row_window.attr_vals = new String[]{Edit_row_window.selected[0].getText(1)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m, \" +\n\t\t\t\t\" curr_cinema_movie_tag mt\" +\n\t\t\t\t\" where mt.movie_id=m.id and mt.tag_id=\"+Edit_row_window.id+\n\t\t\t\t\" order by num_links desc \";\n\n\t\tEdit_row_window.not_linked_query = \" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"movie name\", \"rating\", \"release year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. release year:\";\n\t\tEdit_row_window.linked_category_name = \"MOVIES\";\n\t}",
"public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}",
"private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }",
"public void setName(String ac) {\n categoryName = ac;\n }",
"public void setCategory(String category){\n this.category = category;\n }",
"public void newCategory() {\n btNewCategory().push();\n }",
"@Override\n\tpublic Category updateCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn null;\n\t}",
"public void setCategory(Category cat) {\n this.category = cat;\n }",
"public void updateUI() {\n if (mCategoryAdapater == null) {\n mCategoryAdapater = new CategoryAdapter(mCategories);\n mCategoryRecyclerView.setAdapter(mCategoryAdapater);\n } else {\n mCategoryAdapater.setCategories(mCategories);\n mCategoryAdapater.notifyDataSetChanged();\n }\n Log.d(TAG, \"updateUI()\");\n }",
"@Override\n public boolean updateCategory(Category newCategory)\n {\n // format the string\n String query = \"UPDATE Categories SET CategoryName = '%1$s', Description = '%2$s', CreationDate = '%3$s'\";\n \n query = String.format(query, newCategory.getCategoryName(), newCategory.getDescription(),\n newCategory.getCreationDate());\n \n // if everything worked, inserted id will have the identity key\n // or primary key\n return DataService.executeUpdate(query);\n }",
"public void setCategory(Category c) {\n this.category = c;\n }",
"public static void addCategory(Context context, String category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n // Don't allow adding if there's already a non-deleted category with that name\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0 AND \" + CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category},\r\n null,\r\n null,\r\n null\r\n );\r\n\r\n if(cursor.getCount() > 0) {\r\n cursor.close();\r\n throw new IllegalArgumentException(\"Category with name already exists\");\r\n }\r\n cursor.close();\r\n\r\n // Check if there's a deleted category that can be re-enabled\r\n ContentValues updateValues = new ContentValues();\r\n updateValues.put(CategoryTable.COLUMN_NAME_IS_DELETED, 0);\r\n\r\n int count = db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n updateValues,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category}\r\n );\r\n if(count > 0) return;\r\n\r\n // Otherwise add it as normal\r\n ContentValues insertValues = new ContentValues();\r\n insertValues.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category);\r\n db.insert(CategoryTable.TABLE_NAME, null, insertValues);\r\n db.close();\r\n }",
"@Test\n public void testDefaultCategorizationUsingServiceAPI() throws Exception {\n EventServiceAdmin eventServiceAdmin = Framework.getService(EventServiceAdmin.class);\n eventServiceAdmin.setListenerEnabledFlag(\n \"documentCategorizationSyncListener\", false);\n \n // let us create some documents\n makeSomeDocuments();\n f2 = session.getDocument(f2.getRef());\n file1 = session.getDocument(file1.getRef());\n file2 = session.getDocument(file2.getRef());\n note1 = session.getDocument(note1.getRef());\n\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:coverage\"));\n assertEquals(null, file2.getPropertyValue(\"dc:language\"));\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // run the engine again, this time all the documents should be processed\n List<DocumentModel> updatedDocuments = service.updateCategories(Arrays.asList(\n file1, file2, note1, f2));\n assertEquals(3, updatedDocuments.size());\n \n assertEquals(\"en\", file1.getPropertyValue(\"dc:language\"));\n assertEquals(\"asia/Viet_Nam\", file1.getPropertyValue(\"dc:coverage\"));\n \n assertEquals(\"fr\", file2.getPropertyValue(\"dc:language\"));\n assertEquals(\"europe/France\", file2.getPropertyValue(\"dc:coverage\"));\n \n // TODO: handle the string content of Note document too\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // folderish documents are ignored by the categorizers\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n }",
"private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }",
"@Override\n\tpublic void update(Categoria c) throws SQLException {\n\t\tPreparedStatement ps=conn.prepareStatement(\"UPDATE categoria SET descrizione=?\");\n\t\tps.setString(1, c.getDescrizione());\n\t\tint n = ps.executeUpdate();\n\t\tif(n==0)\n\t\t\tthrow new SQLException(\"categoria: \" + c.getIdCategoria() + \" non presente\");\n\t\t\n\t}",
"private void populate(List<Entry> entries) {\n List<Long> entryIds = entries.stream().map(Entry::getId).collect(Collectors.toList());\n Map<Entry, List<Category>> entryToCategories = entryDAO.findCategoriesByEntryIds(entryIds);\n\n // Set the Categories property of each Entry, accordingly.\n entries.forEach(entry -> entry.setCategories(entryToCategories.getOrDefault(entry, Collections.emptyList())));\n }",
"public void LoadTexts(String idCategory, String nameCategory, String imageCategory) {\n textViewCategory.setText(nameCategory);\n Picasso.with(getActivity())\n .load(imageCategory)\n .error( R.drawable.logo_circular )\n .placeholder( R.drawable.logo_circular )\n .into( imageViewCategory );\n LoadSubcategory(idCategory);\n LoadProducts(idCategory);\n }",
"private void butEditCategories_Click(Object sender, EventArgs e) throws Exception {\n ArrayList selected = new ArrayList();\n for (int i = 0;i < listCategories.SelectedIndices.Count;i++)\n {\n selected.Add(CatList[listCategories.SelectedIndices[i]].DefNum);\n }\n FormDefinitions FormD = new FormDefinitions(DefCat.ProcCodeCats);\n FormD.ShowDialog();\n DataValid.setInvalid(InvalidType.Defs);\n changed = true;\n fillCats();\n for (int i = 0;i < CatList.Length;i++)\n {\n if (selected.Contains(CatList[i].DefNum))\n {\n listCategories.SetSelected(i, true);\n }\n \n }\n //we need to move security log to within the definition window for more complete tracking\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Definitions\");\n fillGrid();\n }",
"private void addNewCategory() {\n Utils.replaceFragment(getActivity(),new AddCategoriesFragment());\n }",
"Collection</* IInstallableUnit */?> publishCategories( File categoryDefinition )\n throws FacadeException, IllegalStateException;",
"private CIECADocument updateCoverageCategory(final CIECADocument inDoc, final java.util.logging.Logger mLogger) {\n\t\t\n\t\tif (inDoc != null && inDoc.getCIECA() != null && inDoc.getCIECA().getAssignmentAddRq() != null) {\n\t\t\t\n\t\t\t//\n\t\t\t// <ClaimInfo>/<PolicyInfo>/<CoverageInfo>/<Coverage>/<CoverageCategory>\n\t\t\t//\n\t\t\tfinal ClaimInfoType claimInfo = inDoc.getCIECA().getAssignmentAddRq().getClaimInfo();\n\t\t\tif (claimInfo != null) {\n\t\t\t\tif (claimInfo.isSetPolicyInfo()) {\n\t\t\t\t\tfinal PolicyInfoType policyInfo = claimInfo.getPolicyInfo();\n\t\t\t\t\tif (policyInfo != null) {\n\t\t\t\t\t\tif (policyInfo.isSetCoverageInfo()) {\n\t\t\t\t\t\t\tfinal CoverageInfoType coverageInfo = policyInfo.getCoverageInfo();\n\t\t\t\t\t\t\tif (coverageInfo != null && coverageInfo.sizeOfCoverageArray() > 0) {\n\t\t\t\t\t\t\t\tfinal Coverage coverage = coverageInfo.getCoverageArray(0);\n\t\t\t\t\t\t\t\tif (coverage != null) {\n\t\t\t\t\t\t\t\t\tif (coverage.isSetCoverageCategory()) {\n\t\t\t\t\t\t\t\t if (mLogger.isLoggable(Level.FINE)) {\n\t\t\t\t\t\t\t\t \tmLogger.fine(\"********* BEFORE updateCoverageCategory:: coverage.getCoverageCategory(): [ \" + coverage.getCoverageCategory() + \" ] *********\");\n\t\t\t\t\t\t\t\t }\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t// TypeOfLoss - C maps to G, P maps to A, M maps to D, \n\t\t\t\t\t\t\t\t\t\t// A (Animal) maps to 0 Else no mapping \n\t\t\t\t\t\t\t\t\t\tif (coverage.getCoverageCategory() != null) {\n\t\t\t\t\t\t\t\t\t\t\tfinal String inCoverageCategory = coverage.getCoverageCategory();\n\t\t\t\t\t\t\t\t\t\t\tif (inCoverageCategory.equalsIgnoreCase(\"C\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"G\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"P\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"A\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"M\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"D\");\n\t\t\t\t\t\t\t\t\t\t\t} else if (inCoverageCategory.equalsIgnoreCase(\"A\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Map A (Animal) to O (Other) - preventing collision with A (Property)\n\t\t\t\t\t\t\t\t\t\t\t\tcoverage.setCoverageCategory(\"0\");\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\t// else NO MAPPING of remaining LossTypes\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t if (mLogger.isLoggable(Level.FINE)) {\n\t\t\t\t\t\t\t\t \tmLogger.fine(\"********* AFTER updateCoverageCategory:: coverage.getCoverageCategory(): [ \" + coverage.getCoverageCategory() + \" ] *********\");\n\t\t\t\t\t\t\t\t }\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn inDoc;\n\t}",
"private void updateExpensesCategoriesBreakdown() {\n TextView amountEntertainment = (TextView) findViewById(R.id.amount_categoryBreakdown_entertainment);\n TextView amountFood = (TextView) findViewById(R.id.amount_categoryBreakdown_food);\n TextView amountGifts = (TextView) findViewById(R.id.amount_categoryBreakdown_gifts);\n TextView amountMisc = (TextView) findViewById(R.id.amount_categoryBreakdown_misc);\n TextView amountShopping = (TextView) findViewById(R.id.amount_categoryBreakdown_shopping);\n TextView amountTravel = (TextView) findViewById(R.id.amount_categoryBreakdown_travel);\n\n amountEntertainment.setText(R.string.str_dollarSign);\n amountFood.setText(R.string.str_dollarSign);\n amountGifts.setText(R.string.str_dollarSign);\n amountMisc.setText(R.string.str_dollarSign);\n amountShopping.setText(R.string.str_dollarSign);\n amountTravel.setText(R.string.str_dollarSign);\n\n amountEntertainment.append(database.getCategoryExpenditure(\"entertainment\", selectedMonth).toString());\n amountFood.append(database.getCategoryExpenditure(\"food\", selectedMonth).toString());\n amountGifts.append(database.getCategoryExpenditure(\"gifts\", selectedMonth).toString());\n amountMisc.append(database.getCategoryExpenditure(\"misc\", selectedMonth).toString());\n amountShopping.append(database.getCategoryExpenditure(\"shopping\", selectedMonth).toString());\n amountTravel.append(database.getCategoryExpenditure(\"travel\", selectedMonth).toString());\n }",
"@Override\n public void gotCategories(ArrayList<String> categories) {\n ArrayAdapter<String> categoryAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_list_item_1 , categories);\n categoriesListView.setAdapter(categoryAdapter);\n }",
"public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}",
"public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void setCategory(String category)\r\n {\r\n m_category = category;\r\n }",
"private void listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }",
"public void setCategory(String newCategory) {\n\t\t_pcs.firePropertyChange(\"category\", this.category, newCategory); //$NON-NLS-1$\n\t\tthis.category = newCategory;\n\t}",
"protected int EditCategory(String categoryName, String categoryColor,\n int position) {\n int resnum = Integer.parseInt(this.IniFile.getIniString(this.appIniFile,\n \"resource\", \"resnum\", \"0\", (byte) 0));\n for (int i = 1; i <= resnum; i++) {\n if (i != position) {\n String resname = this.IniFile.getIniString(this.appIniFile, \"resource\",\n \"resname\" + i, \"0\", (byte) 0);\n if (resname.equals(categoryName)) {\n return 0;\n }\n }\n }\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resname\" + position,\n categoryName);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resbkcolor\" + position,\n categoryColor);\n this.groups.get(position - 1).put(\"group\", categoryName);\n this.exlist_adapter.notifyDataSetChanged();\n return 1;\n }",
"public void setCategory(String category) {\r\n this.category = category;\r\n }",
"public void refreshCategoriesofMapShare(Category category) {\n\t\tsetFormType(\"list-mapsharebal-by-category\");\n\t\tthis.category = category;\n\t\t// this.mapShareBals =\n\t\t// mapShareBalDAO.findMSBBByConditions(category.getCategoryId());\n\t\tloadMapShareByCategory(category.getCategoryId());\n\t\tRequestContext requestContext = RequestContext.getCurrentInstance();\n\t\trequestContext.execute(\"$('.mapShareBalClearFilter').click();\");\n\t}",
"public void editRemoteCategory(String name, long category_id) {\n url = Constants.editCategory;\n params = new HashMap<>();\n params.put(param_category_name, \"\" + name);\n params.put(param_category_id, \"\" + category_id);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.editCategory(name, category_id, mIRestApiCallBack, false, url, params);\n } else {\n mIRestApiCallBack.onNoInternet();\n }\n\n }",
"void addCategory(Category category);",
"public static void showCategories() throws IOException {\n Main.FxmlLoader(CATEGORY_PATH);\n }",
"@Override\n public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n this.updated = new Date();\n }",
"public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }",
"private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}",
"public void readFile(String filename){\n\t\ttry{\n\t\t\tBufferedReader bf = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\tString[] categories = new String[5];\n\t\t\tline = bf.readLine();\n\t\t\tint[] pointValues = new int[5];\n\t\t\tboolean FJ = false;\n\t\t\t\n\t\t\t// Read the first line\n\t\t\tint index = 0;\n\t\t\tint catnum = 0;\n\t\t\twhile(catnum < 5){\n\t\t\t\tcategories[catnum] = readWord(line, index);\n\t\t\t\tindex += categories[catnum].length();\n\t\t\t\tif(index == line.length()-1){\n\t\t\t\t\tSystem.out.println(\"Error: Too few categories.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i < catnum; i++){\n\t\t\t\t\tif(categories[i].equals(categories[catnum])){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate categories.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(catnum < 4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tcatnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many categories.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tCategory cat1, cat2, cat3, cat4, cat5, cat6;\n\t\t\tcat1 = new Category(categories[0]);\n\t\t\tcat2 = new Category(categories[1]);\n\t\t\tcat3 = new Category(categories[2]);\n\t\t\tcat4 = new Category(categories[3]);\n\t\t\tcat5 = new Category(categories[4]);\n\t\t\tcat6 = new Category(\"FJ\");\n\n\t\t\t// Read the second line\n\t\t\tline = bf.readLine();\n\t\t\t//System.out.println(line);\n\t\t\tindex = 0;\n\t\t\tint pointnum = 0;\n\t\t\twhile(pointnum < 5){\n\t\t\t\tint point = 0;\n\t\t\t\ttry{\n\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\tindex += (readWord(line, index)).length();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tSystem.out.println(\"Error: point value not integer.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpointValues[pointnum] = point;\n\t\t\t\tfor(int i = 0; i < pointnum; i++){\n\t\t\t\t\tif(pointValues[pointnum] == pointValues[i]){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate point values\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(pointnum <4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tpointnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many point values.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the questions\n\t\t\tString q=\"\";\n\t\t\tString a=\"\";\n\t\t\tString category=\"\";\n\t\t\tint point=0;\n\t\t\tint colonNumber = 0;\n\t\t\tQuestion question = new Question(0, \"\", \"\");\n\t\t\t\n\t\t\twhile((line = bf.readLine())!= null && line.length() != 0){\n\t\t\t\tindex = 0;\n\t\t\t\t// New question, initialize all vars\n\t\t\t\tif(line.substring(0,2).equals(\"::\")){\n\t\t\t\t\t// Add the previous question\n\t\t\t\t\tif(question.getPoint() != 0){\n\t\t\t\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\t\t\t\tcat1.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\t\t\t\tcat2.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\t\t\t\tcat3.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\t\t\t\tcat4.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\t\t\t\tcat5.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\t\t\t\tcat6.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ta=\"\";\n\t\t\t\t\tq=\"\";\n\t\t\t\t\tcategory=\"\";\n\t\t\t\t\tpoint = 0;\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tcolonNumber = 1;\n\t\t\t\t\tquestion = new Question(0, \"\", \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If FJ cont'd\n\t\t\t\telse{\n\t\t\t\t\tif(category.equals(\"FJ\")){\n\t\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setQuestion(q);\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\ta += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(colonNumber < 3 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\t\tindex+=2;\n\t\t\t\t\t\t\t\tcolonNumber++;\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// FJ starts\n\t\t\t\tif(readWord(line, index).equals(\"FJ\")){\n\t\t\t\t\tif(FJ){\n\t\t\t\t\t\tSystem.out.println(\"Error: Multiple final jeopardy questions.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\tFJ = true;\n\t\t\t\t\tpoint = -100;\n\t\t\t\t\tcategory = \"FJ\";\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tcolonNumber++;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\tindex += q.length();\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t}\n\t\t\t\t// Other questions\n\t\t\t\telse{\n\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t//System.out.println(colonNumber);\n\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tcategory = category + readWord(line, index);\n\t\t\t\t\t\t\tboolean right = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(categories[i].equals(category))\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += category.length();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\t\t\tright = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(pointValues[i] == point)\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong point value.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tq = q + readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ta = a+ readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\tif(index < line.length()){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(colonNumber < 4 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\tindex += 2;\n\t\t\t\t\t\t\tcolonNumber++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add the last question\n\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\tcat1.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\tcat2.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\tcat3.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\tcat4.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\tcat5.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\tcat6.addQuestion(question);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tmCategories.add(cat1);\n\t\t\tmCategories.add(cat2);\n\t\t\tmCategories.add(cat3);\n\t\t\tmCategories.add(cat4);\n\t\t\tmCategories.add(cat5);\n\t\t\tmCategories.add(cat6);\n\t\t\t\n\t\t\tbf.close();\n\t\t}\n\t\t\n\t\tcatch(IOException ioe){\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}",
"public void setCategory(java.lang.String category) {\n this.category = category;\n }",
"protected void DeleteCategory(int position, int arg2) {\n int resnum = Integer.parseInt(this.IniFile.getIniString(this.appIniFile,\n \"resource\", \"resnum\", \"0\", (byte) 0));\n for (int i = 1; i <= resnum; i++) {\n if (i == position) {\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resid\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resname\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resicon\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resbkcolor\"\n + i);\n } else if (i > position) {\n String resid = this.IniFile.getIniString(this.appIniFile, \"resource\",\n \"resid\" + i, \"\", (byte) 0);\n String resname = this.IniFile.getIniString(this.appIniFile, \"resource\",\n \"resname\" + i, \"\", (byte) 0);\n String resicon = this.IniFile.getIniString(this.appIniFile, \"resource\",\n \"resicon\" + i, \"\", (byte) 0);\n String resbkcolor = this.IniFile.getIniString(this.appIniFile,\n \"resource\", \"resbkcolor\" + i, \"\", (byte) 0);\n\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resid\"\n + (i - 1), resid);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resname\"\n + (i - 1), resname);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resicon\"\n + (i - 1), resicon);\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resbkcolor\"\n + (i - 1), resbkcolor);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resid\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resname\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resicon\" + i);\n this.IniFile.deleteIniString(this.appIniFile, \"resource\", \"resbkcolor\"\n + i);\n }\n }\n this.IniFile.writeIniString(this.appIniFile, \"resource\", \"resnum\", (resnum - 1)\n + \"\");\n this.groups.remove(arg2);\n this.exlist_adapter.notifyDataSetChanged();\n }",
"public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"private void saveNewCategory() {\n String name = newCategory_name.getText()\n .toString();\n int defaultSizeType = categoryDefaultSize.getSelectedItemPosition() - 1;\n String color = String.format(\"%06X\", (0xFFFFFF & categoryColor.getExactColor()));\n int parentCategoryId = -1;\n if (parentCategory != null) {\n parentCategoryId = parentCategory.getId();\n }\n String icon = categoryIcon.getSelectedItem();\n categoryDataSource.editCategory(categoryId, name, name, parentCategoryId, defaultSizeType,\n icon, color);\n\n setResult(Activity.RESULT_OK);\n this.finish();\n }",
"private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }"
]
| [
"0.7061229",
"0.66097367",
"0.66097367",
"0.63944143",
"0.6331616",
"0.62196785",
"0.61027914",
"0.60338753",
"0.60300756",
"0.59075564",
"0.58970207",
"0.5840109",
"0.582191",
"0.58193964",
"0.58163",
"0.5789299",
"0.5721696",
"0.5666555",
"0.5658386",
"0.565636",
"0.5642011",
"0.5641036",
"0.5570787",
"0.5533965",
"0.5524089",
"0.5510971",
"0.5504676",
"0.548258",
"0.54744846",
"0.54722863",
"0.54712",
"0.5464661",
"0.54555255",
"0.54481494",
"0.5441425",
"0.5440573",
"0.5436591",
"0.5426169",
"0.5424282",
"0.54123616",
"0.541043",
"0.53972894",
"0.53871346",
"0.5384583",
"0.53811437",
"0.53689355",
"0.53654355",
"0.5361956",
"0.5361329",
"0.53598714",
"0.534755",
"0.53388363",
"0.53298944",
"0.5310367",
"0.5307624",
"0.5278779",
"0.52709764",
"0.52605355",
"0.52421516",
"0.52296895",
"0.5216358",
"0.5215607",
"0.5202239",
"0.5192153",
"0.5191121",
"0.5186252",
"0.51786005",
"0.5160502",
"0.51460725",
"0.51325697",
"0.5129283",
"0.5117029",
"0.51126707",
"0.5111504",
"0.5104145",
"0.50810724",
"0.50786746",
"0.50781816",
"0.5076396",
"0.5075235",
"0.50714946",
"0.506834",
"0.5066991",
"0.5061076",
"0.50558347",
"0.5051848",
"0.5049834",
"0.5041049",
"0.5040851",
"0.5036203",
"0.5033381",
"0.5030904",
"0.5023489",
"0.5022464",
"0.5018548",
"0.50169563",
"0.50139666",
"0.50110376",
"0.50110376",
"0.50110376"
]
| 0.8499105 | 0 |
This function targets categories listed in Used_categories.txt file for updating the content in MongoDB. | void categoryContent(Integer categoryId){
Document query = new Document();
// selected_collection.find({'locations' : {'$exists' : False}}, no_cursor_timeout=True)
query.put("id", categoryId);
query.put("$where", "this.categoryContent.length==0");
FindIterable findIterable = mongoCollection.find(query);
int count = 0;
for (Object doc: findIterable){
System.out.println(doc);
StringBuilder content = new StringBuilder();
Document result = (Document) doc;
int id = result.getInteger("id");
List<String> siteURLs = (List<String>) result.get("siteURLs");
for(String url :siteURLs){
try {
String urlContent = getContent(url);
if(urlContent != null){
content.append(urlContent).append("\n");
}
} catch (BoilerpipeProcessingException e) {
System.err.println("URL: " + url + " Message: " + e.getMessage());
} catch (Exception e) {
e.printStackTrace();
}
}
mongoCollection.updateOne(new Document("id", id),new Document("$set", new Document("categoryContent", content.toString())));
count++;
}
System.out.println(count);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateUsedCategoriesContent() {\n try{\n InputStream inputStream = DMOZCrawler.class.getResourceAsStream(\"Used_categories.txt\");\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n HashSet<String> usedCategories = new HashSet<>();\n\n String currentLine;\n while ((currentLine = bufferedReader.readLine()) != null){\n usedCategories.add(currentLine.toLowerCase());\n System.out.println(\"Used category added :: \" + currentLine);\n }\n\n System.out.println(usedCategories);\n\n for(String id : usedCategories){\n categoryContent(Integer.parseInt(id));\n }\n } catch (Exception exception){\n exception.printStackTrace();\n }\n }",
"void updateCategory(String category){}",
"public void UpdateCategoriesCheckRepeats(){\n dbHandler.OpenDatabase();\n ArrayList<Category> CategoryObjectList = dbHandler.getAllCategory();\n // Create Category String List\n ArrayList<String> CategoryStringList = new ArrayList<>();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n CategoryStringList.add( CategoryObjectList.get(i).getName() );\n }\n\n Category category;\n // cycle through object list\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n category = CategoryObjectList.get(i);\n CategoryObjectList.remove(i);\n CategoryStringList.remove(i); // remove so it doesn't find itself\n\n // find name in Category List\n int index = CategoryStringList.indexOf( category.getName() );\n\n if (index == -1){\n CategoryObjectList.add(category);\n CategoryStringList.add(category.getName());\n }else{\n CategoryObjectList.get(index).increaseCounter( category.getCounter() );\n CategoryObjectList.get(index).increaseAmount( category.getAmount() );\n i--;\n }\n }\n\n // Add back to database\n dbHandler.deleteAllCategory();\n for (int i = 0; i < CategoryObjectList.size(); i++) {\n dbHandler.addCategory(CategoryObjectList.get(i));\n }\n\n dbHandler.CloseDatabase();\n }",
"@Test\n public void testDefaultCategorizationUsingServiceAPI() throws Exception {\n EventServiceAdmin eventServiceAdmin = Framework.getService(EventServiceAdmin.class);\n eventServiceAdmin.setListenerEnabledFlag(\n \"documentCategorizationSyncListener\", false);\n \n // let us create some documents\n makeSomeDocuments();\n f2 = session.getDocument(f2.getRef());\n file1 = session.getDocument(file1.getRef());\n file2 = session.getDocument(file2.getRef());\n note1 = session.getDocument(note1.getRef());\n\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:language\"));\n assertEquals(null, file1.getPropertyValue(\"dc:coverage\"));\n assertEquals(null, file2.getPropertyValue(\"dc:language\"));\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // run the engine again, this time all the documents should be processed\n List<DocumentModel> updatedDocuments = service.updateCategories(Arrays.asList(\n file1, file2, note1, f2));\n assertEquals(3, updatedDocuments.size());\n \n assertEquals(\"en\", file1.getPropertyValue(\"dc:language\"));\n assertEquals(\"asia/Viet_Nam\", file1.getPropertyValue(\"dc:coverage\"));\n \n assertEquals(\"fr\", file2.getPropertyValue(\"dc:language\"));\n assertEquals(\"europe/France\", file2.getPropertyValue(\"dc:coverage\"));\n \n // TODO: handle the string content of Note document too\n assertEquals(null, note1.getPropertyValue(\"dc:language\"));\n \n // folderish documents are ignored by the categorizers\n assertEquals(null, f2.getPropertyValue(\"dc:language\"));\n }",
"private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void updateCategory(Category category);",
"void updateCategory(Category category);",
"public void setCategories(Categories categories) {\n this.categories = categories;\n }",
"void modifyRadarTechnologiesInformation(List<CategoryUpdate> updateList);",
"public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }",
"void updateContent(){\n Document query = new Document();\n// selected_collection.find({'locations' : {'$exists' : False}}, no_cursor_timeout=True)\n query.put(\"$where\", \"this.categoryContent.length==0 & this.siteURLs.length>0\");\n FindIterable findIterable = mongoCollection.find(query);\n\n int count = 0;\n for (Object doc: findIterable){\n System.out.println(doc);\n StringBuilder content = new StringBuilder();\n Document result = (Document) doc;\n int id = result.getInteger(\"id\");\n List<String> siteURLs = (List<String>) result.get(\"siteURLs\");\n int urlsCount = 0;\n for(String url :siteURLs){\n try {\n String urlContent = getContent(url);\n if(urlContent != null){\n content.append(urlContent).append(\"\\n\");\n urlsCount++;\n if (urlsCount >= 5)\n break;\n }\n } catch (BoilerpipeProcessingException e) {\n System.err.println(\"URL: \" + url + \" Message: \" + e.getMessage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n mongoCollection.updateOne(new Document(\"id\", id),new Document(\"$set\", new Document(\"categoryContent\", content.toString())));\n count++;\n }\n System.out.println(count);\n }",
"@Override\n\tprotected void updateRecord(String[] data) {\n\t\tCategory category = new Category();\n\t\tcategory.setId(new Integer(data[0]));\n\t\tcategory.setName(data[1]);\n\t\tcategory.setGameId(new Integer(data[2]));\n\t\tnew Categories().update(category);\n\t}",
"private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }",
"private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}",
"void insertDocuments(Collection<Category> categoryList){\n mongoCollection.drop();\n for(Category category : categoryList){\n String json = gson.toJson(category);\n Document document = Document.parse(json);\n mongoCollection.insertOne(document);\n System.out.println(json);\n }\n }",
"public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }",
"private void suggestCategory() {\n String[] allCat = {\"Pizza\", \"Pasta\", \"Dessert\", \"Salad\", \"SoftDrinks\"};\n// for (ItemDTO i : allDetails) {\n// names.add(i.getName());\n// }\n\n TextFields.bindAutoCompletion(txtCat, allCat);\n }",
"UpdateCategoryResponse updateCategory(UpdateCategoryRequest request) throws RevisionException;",
"public void setCategory(String newCategory) {\n category = newCategory;\n }",
"public void setCategory(String category);",
"@Override\n public void updateCategories(List<String> categories) {\n //Update the Category Spinner with the new data\n mCategorySpinnerAdapter.clear();\n //Add the Prompt as the first item\n categories.add(0, mSpinnerProductCategory.getPrompt().toString());\n mCategorySpinnerAdapter.addAll(categories);\n //Trigger data change event\n mCategorySpinnerAdapter.notifyDataSetChanged();\n\n if (!TextUtils.isEmpty(mCategoryLastSelected)) {\n //Validate and Update the Category selection if previously selected\n mPresenter.updateCategorySelection(mCategoryLastSelected, mCategoryOtherText);\n }\n }",
"public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}",
"public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\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_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}",
"Map<Long, List<String>> retrieveCategoriesForTargetTable(TargetTable ttable);",
"public void setCategory(String category){\n this.category = category;\n }",
"@Override\n @IcalProperty(pindex = PropertyInfoIndex.CATEGORIES,\n adderName = \"category\",\n jname = \"categories\",\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setCategories(final Set<BwCategory> val) {\n categories = val;\n }",
"public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}",
"@Override\n\tpublic void updateCategory(Category cat) {\n\t\tdao.updateCategory(cat);\n\t\t\n\t}",
"public void setCategories(List<CategoryMappingValue> categories) {\r\n\t\tthis.categories = categories;\r\n\t}",
"private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }",
"@Override\n\tpublic void update(Categories cate) {\n\t\tcategoriesDAO.update(cate);\n\t}",
"@Then(\"book categories must match book_categories table from db\")\n public void book_categories_must_match_book_categories_table_from_db() {\n String sql = \"SELECT name FROM book_categories;\";\n List<Object> namesObj = DBUtils.getColumnData(sql, \"name\");\n List<String> exNames = new ArrayList<>();\n for (Object o : namesObj) {\n exNames.add(o.toString());\n }\n // get the actual categories from UI as webelements\n // convert the web elements to list\n List<WebElement> optionsEl = booksPage.mainCategoryList().getOptions();\n List<String> acNames = BrowserUtils.getElementsText(optionsEl);\n // remove the first option ALL from acList.\n acNames.remove(0);\n // compare 2 lists\n assertEquals(\"Categories did not match\", exNames, acNames);\n }",
"private void uploadCategoriesChanges(JSONObject json) throws UnsupportedEncodingException {\n RestClient.put(this, RestClient.UPDATE_CATEGORY_URL, json, username, password,\n new JsonHttpResponseHandler() {\n @Override\n public void onFailure(int statusCode, Header[] headers,\n Throwable throwable, JSONObject errorResponse) {\n Log.d(DEBUG_TAG, \"updating category failure \" + errorResponse.toString());\n }\n });\n }",
"Collection</* IInstallableUnit */?> publishCategories( File categoryDefinition )\n throws FacadeException, IllegalStateException;",
"public Categorie updateCategorie(Categorie c);",
"public void category(String menuCategory) {\n for (WebElement element : categories) {\n\n if (menuCategory.equals(CategoryConstants.NEW_IN.toString())) {\n String newin = menuCategory.replace(\"_\", \" \");\n menuCategory = newin;\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String elementText = element.getText();\n if (elementText.equals(menuCategory)) {\n element.click();\n\n break;\n }\n }\n }",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"private void checkCategoriaInDB(DB db ){\n\t\tString[] catDef = {\"Ambiente\", \"Animali\", \"Arte e Cultura\",\"Elettronica e Tecnologia\", \"Sport\", \"Svago\"};\n\t\tMap<Long, Categoria> categorie = db.getTreeMap(\"categorie\");\n\t\tfor(String nomeCat : catDef) {\n\t\t\tlong hashcode = (long)nomeCat.hashCode();\n\t\t\tif(!categorie.containsKey(hashcode))\n\t\t\t\tcategorie.put(hashcode, new Categoria(null ,nomeCat));\n\t\t}\n\t}",
"public Flowable<List<Category>> addCategories(List<Category> categories) {\n return executeTransaction((bgRealm, subscriber) -> {\n bgRealm.copyToRealmOrUpdate(categories);\n });\n }",
"@Override\n\tpublic void defineTargetCategories(List<String> values) {\n\t\tPreconditions.checkArgument(\n\t\t\t\tvalues.size() <= maxTargetValue,\n\t\t\t\t\"Must have less than or equal to \" + maxTargetValue + \" categories for target variable, but found \"\n\t\t\t\t\t\t+ values.size());\n\t\tif (maxTargetValue == Integer.MAX_VALUE) {\n\t\t\tmaxTargetValue = values.size();\n\t\t}\n\n\t\tfor (String value : values) {\n\t\t\ttargetDictionary.intern(value);\n\t\t}\n\t}",
"public static ArrayList<String> catToCateg(String categ) throws Exception {\n\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (categOffsetIndex == null) {\n\t\t\tSystem.out.println(\"categ loading index...\");\n\t\t\tloadCategIndex();\n\t\t\tSystem.out.println(\"categ index loaded !!!\");\n\t\t}\n\n\t\tif (categOffsetIndex.get(categ) != null) {\n\t\t\tFile file = new File(basedir + \"categHierarchy\");\n\t\t\tRandomAccessFile rFile = new RandomAccessFile(file, \"r\");\n\t\t\t// System.out.println(categOffsetIndex.get(categ));\n\t\t\trFile.seek(categOffsetIndex.get(categ));\n\t\t\tString temp = rFile.readLine();\n\t\t\trFile.close();\n\t\t\tString arr[] = temp.split(\"\\t\");\n\n\t\t\tString temp1 = arr[1].substring(1, arr[1].length() - 1);\n\t\t\tString arr1[] = temp1.split(\",\");\n\n\t\t\tfor (String key : arr1) {\n\t\t\t\tlist.add(key.trim());\n\t\t\t}\n\t\t\trFile.close();\n\t\t\treturn list;\n\n\t\t}\n\n\t\telse {\n\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public void updatePortletCategory(PortletCategory category);",
"public interface Categories {\n List<String> all();\n List<String> getAdCategories(Ad ad);\n void linkCategories(long id, String[] categories);\n}",
"public static void kategorien_aus_inhaltsverzeichnis_abfangen (String htmlfile)\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n \t\n \t// hole kateogrienamen: aus inhaltsverziechnis:\n \tString kategoriename = \"\";\n \t\n \t// Oberkategorie Kategorie steht zwischen:\n \t// <p style=\"margin-top: 0.21cm; margin-bottom: 0.21cm; text-transform: uppercase\">\n \t// und\n \t// </a></font></font></p>\n \t\n \t\n \t\n \t// adde kategorienamen in combo:\n \n\t\t\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFile kategorienfile = new File (\"kategorien.txt\");\n \t\tif (kategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tkategorienfile.delete();\n \t\t\t}\n \t\tFile unterkategorienfile = new File (\"unterkategorien.txt\");\n \t\tif (unterkategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tunterkategorienfile.delete();\n \t\t\t}\n \t\t\n \t\tFileWriter fwk1 = new FileWriter (kategorienfile,true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n } // while\n } // try\n catch (Exception yx)\n {\n \tSystem.out.println (\"konnte kategorien aus inhaltverszeichnis nicht auslesen.\");\n }\n\t\t\n\t\t\n\t}",
"public final void readCategoria() {\n cmbCategoria.removeAllItems();\n cmbCategoria.addItem(\"\");\n categoryMapCategoria.clear();\n AtividadePreparoDAO atvprepDAO = new AtividadePreparoDAO();\n for (AtividadePreparo atvprep : atvprepDAO.readMotivoRetrabalho(\"Categoria\")) {\n Integer id = atvprep.getMotivo_retrabalho_id();\n String name = atvprep.getMotivo_retrabalho();\n cmbCategoria.addItem(name);\n categoryMapCategoria.put(id, name);\n }\n }",
"private void populate(List<Entry> entries) {\n List<Long> entryIds = entries.stream().map(Entry::getId).collect(Collectors.toList());\n Map<Entry, List<Category>> entryToCategories = entryDAO.findCategoriesByEntryIds(entryIds);\n\n // Set the Categories property of each Entry, accordingly.\n entries.forEach(entry -> entry.setCategories(entryToCategories.getOrDefault(entry, Collections.emptyList())));\n }",
"public void setCategory(String category) {\r\n this.category = category;\r\n }",
"static public List<Category> categoryReader() throws IOException {\n\n BufferedReader csvReader = new BufferedReader(new FileReader(CATEGORIES_REFERENCE_FILE));\n String row;\n List<Category> dataList = new ArrayList<>();\n\n row = csvReader.readLine();\n while ((row = csvReader.readLine()) != null){\n Category data = new Category();\n String[] datas = row.split(SEPARATOR_COMA);\n\n data.setCategory_id(Integer.parseInt(datas[0]));\n data.setName(datas[1]);\n dataList.add(data);\n\n }\n return dataList;\n }",
"@NoProxy\n @NoWrap\n @NoDump\n @Override\n public void setCategoryHrefs(final Set<String> val) {\n categoryUids = val;\n }",
"public void testUpdateUserDefinedSortWithMultipleElementsInList()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tlong listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tlong[] categoryIds = new long[5];\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tcategoryIds[0] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 2);\n\t\tcategoryIds[1] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 3);\n\t\tcategoryIds[2] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 4);\n\t\tcategoryIds[3] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 5);\n\t\tcategoryIds[4] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\n\t\t// Act\n\t\t// This test updates the sort order of category from 3 to 1 (0-based)\n\t\tservice.updateUserDefinedSort(listId, categoryIds[3], 3, 1);\n\n\t\tlong[] expectedCategoryIds = new long[5];\n\t\texpectedCategoryIds[0] = categoryIds[0];\n\t\texpectedCategoryIds[1] = categoryIds[3];\n\t\texpectedCategoryIds[2] = categoryIds[1];\n\t\texpectedCategoryIds[3] = categoryIds[2];\n\t\texpectedCategoryIds[4] = categoryIds[4];\n\n\t\t// now get all categories for activity\n\t\tCursor categoriesToBeUpdatedCursor = dataProvider.query(CategoryColumns.CONTENT_URI,\n\t\t\t\tCATEGORY_PROJECTION, CategoryColumns.ACTIVITY_ID + \" = \" + listId, null,\n\t\t\t\tCategoryColumns.SORT_POSITION);\n\n\t\tlong[] updatedCategoryIds = new long[5];\n\t\tcategoriesToBeUpdatedCursor.moveToFirst();\n\t\twhile (!categoriesToBeUpdatedCursor.isAfterLast())\n\t\t{\n\t\t\tlong catId = categoriesToBeUpdatedCursor.getLong(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns._ID));\n\n\t\t\tint position = categoriesToBeUpdatedCursor.getInt(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns.SORT_POSITION));\n\n\t\t\tupdatedCategoryIds[position - 1] = catId;\n\t\t\tcategoriesToBeUpdatedCursor.moveToNext();\n\t\t}\n\n\t\t// Assert\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tassertEquals(expectedCategoryIds[i], updatedCategoryIds[i]);\n\t}",
"public void setCategory(java.lang.String category) {\n this.category = category;\n }",
"@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }",
"public List<Category> autocompleteCategory(String name) {\n List<Category> categories = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n categories = dbb.autocompleteCategory(name);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return categories;\n }",
"public List<Concept> populateConceptSection(String category){\n\t\tConceptService cs = Context.getConceptService();\n\t\tDeIdentifiedExportService d = Context.getService(DeIdentifiedExportService.class);\n\t\tList<String> list = d.getConceptByCategory(category);\n\t\tInteger temp;\n\t\tList<Concept> conceptList = new Vector<Concept>();\n\t\tfor(int i=0; i<list.size();i++){\n\t\t\tfor (String retval: list.get(i).split(\",\")){\n\t\t\t\ttemp = Integer.parseInt(retval);\n\t\t\t\tconceptList.add(cs.getConcept(temp));\n\t\t\t}\n\t\t}\n\t\tSet set = new HashSet(conceptList);\n\t\tList list1 = new ArrayList(set);\n\t\treturn list1;\n\t}",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void setCategory(String category) {\n this.category = category;\n }",
"public void fixTopics() {\n Map<String, String> topicMap = new HashMap();\n\n try {\n Properties prop = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"Journal.properties\");\n prop.load(inputStream);\n BufferedReader fin = new BufferedReader(new FileReader(prop.getProperty(\"Topics\")));\n String temp;\n\n while (fin.ready()) {\n temp = fin.readLine();\n String[] tTopics = temp.split(\":\");\n String topic = tTopics[0];\n String[] terms = tTopics[1].split(\",\");\n for (String t : terms) {\n topicMap.put(t, topic);\n }\n\n }\n } catch (IOException e) {\n System.out.println(\"loadTopics broke yo\");\n }\n Collection<String> hTopics = new HashSet<>();\n ArrayList<String> newTopics = new ArrayList<>();\n for (String t : this.topics) {\n String temp = topicMap.get(t);\n hTopics.add(temp);\n }\n for (String t : hTopics) {\n newTopics.add(t);\n }\n this.topics = newTopics;\n }",
"public void readFile(String filename){\n\t\ttry{\n\t\t\tBufferedReader bf = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\tString[] categories = new String[5];\n\t\t\tline = bf.readLine();\n\t\t\tint[] pointValues = new int[5];\n\t\t\tboolean FJ = false;\n\t\t\t\n\t\t\t// Read the first line\n\t\t\tint index = 0;\n\t\t\tint catnum = 0;\n\t\t\twhile(catnum < 5){\n\t\t\t\tcategories[catnum] = readWord(line, index);\n\t\t\t\tindex += categories[catnum].length();\n\t\t\t\tif(index == line.length()-1){\n\t\t\t\t\tSystem.out.println(\"Error: Too few categories.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\tfor(int i = 0; i < catnum; i++){\n\t\t\t\t\tif(categories[i].equals(categories[catnum])){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate categories.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(catnum < 4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tcatnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many categories.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tCategory cat1, cat2, cat3, cat4, cat5, cat6;\n\t\t\tcat1 = new Category(categories[0]);\n\t\t\tcat2 = new Category(categories[1]);\n\t\t\tcat3 = new Category(categories[2]);\n\t\t\tcat4 = new Category(categories[3]);\n\t\t\tcat5 = new Category(categories[4]);\n\t\t\tcat6 = new Category(\"FJ\");\n\n\t\t\t// Read the second line\n\t\t\tline = bf.readLine();\n\t\t\t//System.out.println(line);\n\t\t\tindex = 0;\n\t\t\tint pointnum = 0;\n\t\t\twhile(pointnum < 5){\n\t\t\t\tint point = 0;\n\t\t\t\ttry{\n\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\tindex += (readWord(line, index)).length();\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\tSystem.out.println(\"Error: point value not integer.\");\n\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpointValues[pointnum] = point;\n\t\t\t\tfor(int i = 0; i < pointnum; i++){\n\t\t\t\t\tif(pointValues[pointnum] == pointValues[i]){\n\t\t\t\t\t\tSystem.out.println(\"Error: Duplicate point values\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(pointnum <4)\n\t\t\t\t\tindex += 2;\n\t\t\t\tpointnum++;\n\t\t\t}\n\t\t\tif(index < line.length()-1){\n\t\t\t\tSystem.out.println(\"Error: Too many point values.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\t// Read in the questions\n\t\t\tString q=\"\";\n\t\t\tString a=\"\";\n\t\t\tString category=\"\";\n\t\t\tint point=0;\n\t\t\tint colonNumber = 0;\n\t\t\tQuestion question = new Question(0, \"\", \"\");\n\t\t\t\n\t\t\twhile((line = bf.readLine())!= null && line.length() != 0){\n\t\t\t\tindex = 0;\n\t\t\t\t// New question, initialize all vars\n\t\t\t\tif(line.substring(0,2).equals(\"::\")){\n\t\t\t\t\t// Add the previous question\n\t\t\t\t\tif(question.getPoint() != 0){\n\t\t\t\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\t\t\t\tcat1.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\t\t\t\tcat2.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\t\t\t\tcat3.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\t\t\t\tcat4.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\t\t\t\tcat5.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\t\t\t\tcat6.addQuestion(question);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ta=\"\";\n\t\t\t\t\tq=\"\";\n\t\t\t\t\tcategory=\"\";\n\t\t\t\t\tpoint = 0;\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tcolonNumber = 1;\n\t\t\t\t\tquestion = new Question(0, \"\", \"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If FJ cont'd\n\t\t\t\telse{\n\t\t\t\t\tif(category.equals(\"FJ\")){\n\t\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setQuestion(q);\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\ta += readWord(line, index);\n\t\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(colonNumber < 3 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\t\tindex+=2;\n\t\t\t\t\t\t\t\tcolonNumber++;\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// FJ starts\n\t\t\t\tif(readWord(line, index).equals(\"FJ\")){\n\t\t\t\t\tif(FJ){\n\t\t\t\t\t\tSystem.out.println(\"Error: Multiple final jeopardy questions.\");\n\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t}\n\t\t\t\t\tFJ = true;\n\t\t\t\t\tpoint = -100;\n\t\t\t\t\tcategory = \"FJ\";\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tcolonNumber++;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\tq += readWord(line, index);\n\t\t\t\t\tindex += q.length();\n\t\t\t\t\tindex += 2;\n\t\t\t\t\tif(index < line.length()-1)\n\t\t\t\t\t\ta += readWord(line, index);\n\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t}\n\t\t\t\t// Other questions\n\t\t\t\telse{\n\t\t\t\t\twhile(index < line.length()){\n\t\t\t\t\t\t//System.out.println(colonNumber);\n\t\t\t\t\t\tswitch(colonNumber){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tcategory = category + readWord(line, index);\n\t\t\t\t\t\t\tboolean right = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(categories[i].equals(category))\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong category.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += category.length();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tpoint = Integer.parseInt(readWord(line, index));\n\t\t\t\t\t\t\tright = false;\n\t\t\t\t\t\t\tfor(int i = 0; i < 5; i++){\n\t\t\t\t\t\t\t\tif(pointValues[i] == point)\n\t\t\t\t\t\t\t\t\tright = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!right){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Wrong point value.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setPoint(point);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tq = q + readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setQuestion(q);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ta = a+ readWord(line, index);\n\t\t\t\t\t\t\tindex += readWord(line, index).length();\n\t\t\t\t\t\t\tquestion.setAnswer(a);\n\t\t\t\t\t\t\tif(index < line.length()){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tSystem.out.println(\"Error: Format error.\");\n\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(colonNumber < 4 && index < line.length()-1 && line.substring(index, index+2).equals(\"::\")){\n\t\t\t\t\t\t\tindex += 2;\n\t\t\t\t\t\t\tcolonNumber++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add the last question\n\t\t\tif(category.equals(cat1.getName())){\n\t\t\t\tcat1.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat2.getName())){\n\t\t\t\tcat2.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat3.getName())){\n\t\t\t\tcat3.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat4.getName())){\n\t\t\t\tcat4.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(cat5.getName())){\n\t\t\t\tcat5.addQuestion(question);\n\t\t\t}\n\t\t\telse if(category.equals(\"FJ\")){\n\t\t\t\tcat6.addQuestion(question);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Error: Wrong category name.\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tmCategories.add(cat1);\n\t\t\tmCategories.add(cat2);\n\t\t\tmCategories.add(cat3);\n\t\t\tmCategories.add(cat4);\n\t\t\tmCategories.add(cat5);\n\t\t\tmCategories.add(cat6);\n\t\t\t\n\t\t\tbf.close();\n\t\t}\n\t\t\n\t\tcatch(IOException ioe){\n\t\t\tSystem.out.println(ioe);\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}",
"public void setCategories(Set<CategoryRefPathDTO> categories) {\n\t\tthis.categories = categories;\n\t}",
"public void setCategory(String cat)\n\t{\n\t\tif(cat!=null)\n\t\t\tthis.category = cat;\n\t}",
"public void setCategory(String category) {\n this.category = category;\n this.updated = new Date();\n }",
"private void updateCategoryTree() {\n categoryTree.removeAll();\r\n fillTree(categoryTree);\r\n\r\n }",
"@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }",
"public void setMediaCategoryList(List<String> selectedCategoryList) {\n this.selectedCategoryList = selectedCategoryList;\n ArrayList<Media> list = new ArrayList<>();\n List<Media> mediaList = viewModel.getMediaList();\n\n for (Media media : mediaList) {\n List<String> categories = media.getCategories();\n if (categories.containsAll(selectedCategoryList)) {\n list.add(media);\n }\n }\n if (selectedCategoryList.size() == 0) {\n list.clear();\n list.addAll(mediaList);\n }\n mediaCategoryList.clear();\n mediaCategoryList.addAll(list);\n }",
"private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }",
"@PostMapping(\"/saveCategories\")\n public String saveCategories(@ModelAttribute(\"categories\") Categories theCategories) {\n List<Product> products =null;\n if(theCategories.getId()!= 0)\n {\n products= categoriesService.getProducts(theCategories.getId());\n }\n theCategories.setProducts(products);\n categoriesService.saveCategories(theCategories);\t\n return \"redirect:/admin/loaisanpham/list\";\n }",
"private void setSuggestedCategory() {\n if (selectedCategoryKey != null) {\n return;\n }\n if (suggestedCategories != null && suggestedCategories.length != 0) {\n selectedCategoryKey = suggestedCategories[0].getKey();\n selectCategory.setText(suggestedCategories[0].getName());\n }\n }",
"public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }",
"public void setCategoryName(final String categoryName);",
"public void setFiveRandomClues (String category){\n\t\tFile file = new File(\"data/games_module\", category);\n\t\t// writing 5 random clues to the category file chosen if file is empty\n\t\tif (file.length() == 0) {\n\t\t\tList<String> clues = new ArrayList<String>();\n\t\t\tclues = _nzData.get(category);\n\t\t\tCollections.shuffle(clues);\n\t\t\tList<String> temp = new ArrayList<String>();\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\ttemp.add(clues.get(i));\n\t\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/games_module/\\\"%s\\\"\",clues.get(i), category));\n\t\t\t}\n\t\t\t_fiveRandomClues = temp;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\tList<String> temp= new ArrayList<String>();\n\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\ttemp.add(fileLine);\n\t\t\t\t}\n\t\t\t\t_fiveRandomClues = new ArrayList<String>(temp);\n\t\t\t\tmyReader.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"private static ImmutableSet<String> categorizeText(String text) throws IOException {\n ImmutableSet<String> categories = ImmutableSet.of();\n\n try (LanguageServiceClient client = LanguageServiceClient.create()) {\n Document document = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build();\n ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build();\n\n ClassifyTextResponse response = client.classifyText(request);\n\n categories = response.getCategoriesList()\n .stream()\n .flatMap(ReceiptAnalysis::parseCategory)\n .collect(ImmutableSet.toImmutableSet());\n } catch (ApiException e) {\n // Return empty set if classification request failed.\n return categories;\n }\n\n return categories;\n }",
"static public void set_category_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"category name:\"};\n\t\tEdit_row_window.attr_vals = new String[]{Edit_row_window.selected[0].getText(1)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m, \" +\n\t\t\t\t\" curr_cinema_movie_tag mt\" +\n\t\t\t\t\" where mt.movie_id=m.id and mt.tag_id=\"+Edit_row_window.id+\n\t\t\t\t\" order by num_links desc \";\n\n\t\tEdit_row_window.not_linked_query = \" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"movie name\", \"rating\", \"release year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. release year:\";\n\t\tEdit_row_window.linked_category_name = \"MOVIES\";\n\t}",
"private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}",
"public void setCategory(Category cat) {\n this.category = cat;\n }",
"public static void updateCategoryName(Context context, Category category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category.category);\r\n\r\n db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n values,\r\n DbContract.CategoryTable._ID + \" = ?\",\r\n new String[]{Integer.toString(category._id)}\r\n );\r\n db.close();\r\n }",
"@Override\r\n\tpublic void addToMap(Vector<String> categories, String resultCategory) {\r\n\t\tif (categories.isEmpty())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tString actualCategory = categories.remove(0).trim();\r\n\t\tAbsSyntaxTrieNode node = nodeMap.get(actualCategory);\r\n\t\tif (node == null){\r\n\t\t\tif (categories.size() == 0){\r\n\t\t\t\tnode = new SyntaxTrieNodeInter(actualCategory, resultCategory);\r\n\t\t\t}else{\r\n\t\t\t\tnode = new SyntaxTrieNodeInter(actualCategory);\r\n\t\t\t}\r\n\t\t\tnodeMap.put(actualCategory, node);\r\n\t\t}\r\n\t\tnode.addToMap( new Vector<String>(categories), resultCategory);\r\n\r\n\t}",
"public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }",
"public void updateCategory(String[] idPath, String name, String[] parentIDPath) {\n\t\tremoveSubcategory(idPath);\n\t\tcreateCategory(DBUtils.validateAndCreateObjectID(idPath[idPath.length - 1]), name, parentIDPath);\n\t}",
"public void setCategories(List<Category> categories) {\n LayoutInflater inflater = LayoutInflater.from(context);\n\n for (Category category : categories) {\n View categoryView = inflater.inflate(R.layout.bottom_sheet_dialog_category, null);\n\n TextView categoryText = (TextView) categoryView.findViewById(R.id.item_header);\n\n categoryText.setText(category.getName());\n\n rootView.addView(categoryView);\n\n for (Option option : category.getOptions()) {\n View optionView = inflater.inflate(R.layout.bottom_sheet_dialog_item, null);\n ImageView icon = (ImageView) optionView.findViewById(R.id.item_icon);\n\n icon.setImageDrawable(option.getIcon());\n\n TextView text = (TextView) optionView.findViewById(R.id.item_text);\n\n text.setText(option.getName());\n\n optionView.setOnClickListener(option.getListener());\n\n rootView.addView(optionView);\n }\n }\n }",
"@Override\n public boolean updateCategory(Category newCategory)\n {\n // format the string\n String query = \"UPDATE Categories SET CategoryName = '%1$s', Description = '%2$s', CreationDate = '%3$s'\";\n \n query = String.format(query, newCategory.getCategoryName(), newCategory.getDescription(),\n newCategory.getCreationDate());\n \n // if everything worked, inserted id will have the identity key\n // or primary key\n return DataService.executeUpdate(query);\n }",
"@Override\n\tpublic void update(Category entity) {\n\n\t}",
"private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInputStream fisTargetFile = new FileInputStream(new File(foldername+\"\\\\\"+file.getName()));\n\t\t\t\tString fileContents = IOUtils.toString(fisTargetFile, \"UTF-8\");\n\t\t\t\tString[] text=fileContents.split(\"ParseText::\");\n\t\t\t\tif(text.length>1){\n\t\t\t\t\tString snippet=text[1].trim().length()>100 ? text[1].trim().substring(0, 100): text[1].trim();\n\t\t\t\t\tDocument doc=new Document();\n\t\t\t\t\tdoc.setFileName(file.getName().replace(\".txt\", \"\"));\n\t\t\t\t\tdoc.setUrl(text[0].split(\"URL::\")[1].trim());\n\t\t\t\t\tdoc.setText(snippet+\"...\");\n\t\t\t\t\tdocs.add(doc);\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\t\n\t\tDBUtil.insertDocs(docs);\n\t}",
"private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}",
"public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }",
"public void selectCategory() {\n\t\t\r\n\t}",
"private static void idReplace() {\n\t\tList<String> list = FileUtil.FileToList(\"C:/Users/强胜/Desktop/dataCrawler/申请方/翻译后的/去掉过时的/过时的program取代表1013.txt\");\n\t\tMap<String,Integer> map = new HashMap<String,Integer>();\n\t\tfor(String xx : list)\n\t\t\tmap.put(xx.split(\"\\t\")[0], Integer.parseInt(xx.split(\"\\t\")[1]));\n\t\t\n\t\tString url = \"123.57.250.189\";\n\t\tint port = 27017;\n\t\tString dbName = \"dulishuo\";\n\t\tDB db = MongoUtil.getConnection(url, port, dbName);\n\t\t\n\t\tDBCollection offer = db.getCollection(\"offer\"); \n\t DBCursor find = offer.find();\n\t \n\t while(find.hasNext()){\n\t \tSystem.out.println(\"process_____\"+count++);\n\t \tDBObject obj = find.next();\n\t \tif(obj.containsField(\"program_id\")){\n\t \t\tString id = obj.get(\"program_id\").toString();\n\t\t \tif(map.containsKey(id)){\n\t\t \t\ttry{\n\t\t\t \t\t\n\t\t\t \t\tBasicDBObject newDocument = new BasicDBObject(); \n\t\t\t\t\t\tnewDocument.append(\"$set\", new BasicDBObject().append(\"program_id\", map.get(id))); \n\t\t\t\t\t\toffer.update(obj, newDocument);\n\t\t\t \t\t\n\t\t\t \t}catch(Exception e){\n\t\t\t \t\t\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t System.out.println(\"______________---End---------------\");\n\t}",
"@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }",
"public Set<String> getCategory(){return category;}",
"public static void addCategory(Context context, String category) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getWritableDatabase();\r\n\r\n // Don't allow adding if there's already a non-deleted category with that name\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0 AND \" + CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category},\r\n null,\r\n null,\r\n null\r\n );\r\n\r\n if(cursor.getCount() > 0) {\r\n cursor.close();\r\n throw new IllegalArgumentException(\"Category with name already exists\");\r\n }\r\n cursor.close();\r\n\r\n // Check if there's a deleted category that can be re-enabled\r\n ContentValues updateValues = new ContentValues();\r\n updateValues.put(CategoryTable.COLUMN_NAME_IS_DELETED, 0);\r\n\r\n int count = db.update(\r\n DbContract.CategoryTable.TABLE_NAME,\r\n updateValues,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" = ?\",\r\n new String[]{category}\r\n );\r\n if(count > 0) return;\r\n\r\n // Otherwise add it as normal\r\n ContentValues insertValues = new ContentValues();\r\n insertValues.put(CategoryTable.COLUMN_NAME_CATEGORY_NAME, category);\r\n db.insert(CategoryTable.TABLE_NAME, null, insertValues);\r\n db.close();\r\n }",
"public void setName(String ac) {\n categoryName = ac;\n }",
"@Override\n public void setCategory(String category) {\n this.category = category;\n }",
"public synchronized ActionCategories loadMedicalActionCategories()\n\t{\n\t\t// if action categories is null\n\t\tif (medicalActionCategories == null)\n\t\t{\n\t\t\t// create an xml serializator\n\t\t\tSimpleXMLSerializator serializator = new SimpleXMLSerializator();\n\t\t\t// Open categories file\n\t\t\tFile categoriesFile = new File(StorageModule.getInstance().getBasePath() + \"/\" + CATEGORIES_RELATIVE_PATH);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// load medicalactions categories\n\t\t\t\tmedicalActionCategories = (ActionCategories) serializator.deserialize(categoriesFile, ActionCategories.class);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tlog.error(\"An error ocurred while reading categories file.\", e);\n\t\t\t\tmedicalActionCategories = new ActionCategories();\n\t\t\t}\n\t\t}\n\t\treturn medicalActionCategories;\n\t}",
"public static void old_kategorien_aus_grossem_text_holen (String htmlfile) // alt, funktioniert zwar bis auf manche\n\t// dafür müsste man nochmal loopen um dien ächste zeile derü berschrift auch noch abzufangen bei <h1 class kategorie western\n\t// da manche bausteine in die nächste zeile verrutscht sind.\n\t// viel einfacher geht es aus dem inhaltsverzeichnis des katalogs die kategorien abzufangen.\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n // System.out.println(\"Gelesene Zeile: \" + zeile);\n \t\n \t\n \t// 1. Pruefe ob die Zeile eine Kategorie ist: wenn ja Extrahiere diese KATEGORIE aus dem Code:\n \t// Schema <h1 class=\"kategorie-western\"><a name=\"_Toc33522153\"></a>Bescheide\n \t// Rücknahme 44 X\t</h1>\n \t/*if (zeile.contains(\"<h1\"))\n \t\t\t{\n \t\t\t// grussformeln:\n \t\tzeile.replace(\"class=\\\"kategorie-western\\\" style=\\\"page-break-before: always\\\">\",\"\");\n \t\t\n \t\t\t}\n \t*/\n \t// der erste hat immer noch ein page-break before: drinnen; alle anderen haben dann kategorie western ohne drin\n \tif (zeile.contains(\"<h1 class=\\\"kategorie-western\\\"\"))\n \t\t\t/*zeile.contains(\"<h1 class=\\\"kategorie-western\\\">\") /*|| zeile.contains(\"</h1>\")*/\n \t{\n \t\tSystem.out.println (zeile + \"\\n\"); // bis hier werden alle kategorien erfasst !\n \t\t\n \t\t// hier passiert es, dass vllt. die kategorie in die nächste Zeile gerutscht ist:\n \t\t// daher nochmal loopen und mit stringBetween die nächste einfangen:\n \t\t\n \t\tString kategoriename = \"\";\n \t/*\tif (zeile.contains(\"</h1>\") && !zeile.contains(\"<h1 class=\")) // das ist immer der fall wenn es in die nächste zeile rutscht , weil der string zu lang ist:\n \t\t{\n \t\t\t kategoriename = zeile.replace(\"</h1>\", \"\");\n \t\t}\n \t\telse\n \t\t{\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t}*/\n \t\t kategoriename = stringBetween(zeile, \"\\\"></a>\",\"</h1>\");\n \t\t \n \t\t if (! zeile.contains(\"</h1>\")) // dann ist es in die nächste Zeile gerutscht\n \t\t {\n \t\t\t // hole nächste Zeile und vervollständige damit kategorie:\n \t\t }\n\n \t\tif (kategoriename == null || kategoriename ==\"\")\n \t\t{\n \t\t\t// keine kategorie adden (leere ist sinnlos)\n \t\t}\n \t\n \t\t\tif (kategoriename.contains(\"lass=\\\"kategorie-western\\\">\"))\n \t\t\t{\n \t\t\t\tkategoriename.replace(\"lass=\\\"kategorie-western\\\">\", \"\");\n \t\t\t}\n \t\t\n \t\t\t//System.out.println (kategoriename + \"\\n\");\n \t\t/*\tkategoriename.replace(\"lass=\",\"\");\n \t\t\tkategoriename.replace(\"kategorie-western\",\"\");\n \t\t\tkategoriename.replace(\"\\\"\",\"\");\n \t\t\tkategoriename.replace(\">\",\"\");\n \t\t\tkategoriename.replace(\"/ \",\"\");*/\n\t \t\t//mainobject.kategoriencombo.addItem(kategoriename);\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFileWriter fwk1 = new FileWriter (\"kategorien.txt\",true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n \t\t\n \t}\n \t\n\n \n \t// 2. Pruefe ob die Zeile der Name eines Textbausteins ist d.h. Unterkateogrie:\n \t//<p style=\"margin-top: 0.21cm; page-break-after: avoid\"><a name=\"_Toc33522154\"></a>\n \t//Ablehnung erneute Überprüfung</p>\n // System.out.println (\"Ermittle alle Unterkateogrien (d.h. Textbausteinnamen an sich)... 243\\n\");\n\n \tif (zeile.contains(\"<p style=\\\"margin-top: 0.21cm; page-break-after: avoid\\\"><a name=\"))\n \t{\n \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n \t\tif (unterkategorie == null || unterkategorie ==\"\")\n \t\t{\n \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n \t\t}\n \t\telse\n \t\t{\n \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n \t\t\t\n \t\t\t\n\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\t//mainobject.bausteinecombo.addItem(unterkategorie);\n\n \t\t\tcount_unterkategorien = count_unterkategorien+1; // anzahl der bausteine anhand der bausteinnamen ermitteln \n \t\t\t// Schreibe die unter Kategorien in Textfile:\n\t \t\tFileWriter fwk2 = new FileWriter (\"unterkategorien.txt\",true);\n\t \t\tfwk2.write(unterkategorie+\"\\n\");\n\t \t\tfwk2.flush();\n\t \t\tfwk2.close();\n\n \t\t//unterkategorienamen[count_unterkategorien] = unterkategorie;\n \t\t// (= hier unterkateogrienamen)\n \t\t\n \t\t\n \t // parts.length = anzahl der bausteine müsste gleich count_unterkategorien sein.\n \t // jetzt zugehörigen baustein reinschreiben:\n \t // also je nach count_unterkateogerien dann den parts[count] reinschrieben:\n \t /* try {\n \t\t\tfwb.write(parts[count_unterkategorien]);\n \t\t} catch (IOException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\tSystem.out.println(\"503 konnte datei mit baustein nicht schreiben\");\n \t\t}\n \t \n \t */\n \t \n\n \t\t}\n \t\t\n \t\t\n \t\t \n \t} // if zeile contains\n \t\t \n \n }\t// while\n \n } // try\n catch (Exception y)\n {}\n \t\t \n \t\t \n\t \t// <p style=\"margin-left: 0.64cm; font-weight: normal\"> usw... text </p> sthet immer dazwischen\n\t \t/*if (zeile.contains(\"<p style=\\\"margin-left: 0.64cm; font-weight: normal\\\">\"))\n\t \t{\n\t \t\t// manchmal kommt es vor, dass die textbaustein namen also die unterkateogorie über mehrere zeilen geht:\n \t\t\t// dann sollte der zweite teil in der nächsten Zeile auch noch mit angefügt werden:\n \t\t\tString zweiterteil_der_zeile = in.readLine()+1;\n \t\t\tString komplette_zeile_der_unterkategorie = zeile+zweiterteil_der_zeile;\n\t \t\tString unterkategorie = stringBetween(komplette_zeile_der_unterkategorie, \"\\\"></a>\",\"</p>\"); // = textbausteine\n\t \t\tif (unterkategorie == null || unterkategorie ==\"\")\n\t \t\t{\n\t \t\t\t// keine unterkategorie adden (leere ist sinnlos) = keine leeren textbausteine \n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tunterkategorie.replace(\" \", \"\"); // leere raus\n\t \t\t\t\n\t \t\t\t\n\t\t \t\t//System.out.println (kategoriename + \"\\n\");\n\t \t\tmainobject.bausteinecombo.addItem(unterkategorie);\n\t \t\t}\n\t \t}\n\t \t*/\n System.out.println (\"Alle Oberkategorien, Namen erfolgreich ermittelt und eingefügt 239\\n\");\n\n System.out.println (\"Alle Unterkategorien oder Bausteinnamen erfolgreich eingefügt 267\\n\");\n\n \n \n\t}",
"private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }",
"@Override\n\tpublic ZuelResult modifyContentCategory(TbContentCategory contentCategory) throws ServiceException {\n\t\ttry{\n contentCategory.setUpdated(new Date());\n boolean isModified = service.modifyContentCategory(contentCategory);\n if(isModified){ \n return ZuelResult.ok();\n }\n }catch(ServiceException e){\n e.printStackTrace();\n throw e;\n }\n return ZuelResult.error(\"服务器忙,请稍后重试\");\n\t}",
"@Test\n\tpublic void testUpdateCategory() throws Exception {\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.valueOf(1));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\t\tcategory.setName(\"Flammables\");\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.updateCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\t\t\tmockMvc.perform(post(\"/category/v1/_update\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryUpdateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryUpdateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}"
]
| [
"0.76086485",
"0.6376718",
"0.61640257",
"0.614582",
"0.59640115",
"0.5692701",
"0.5692701",
"0.56899935",
"0.5688533",
"0.568219",
"0.55955553",
"0.5558691",
"0.55316174",
"0.55078936",
"0.5493616",
"0.5484121",
"0.5477502",
"0.5376722",
"0.535313",
"0.53037274",
"0.5266787",
"0.5252244",
"0.524913",
"0.5243105",
"0.5221762",
"0.5220354",
"0.52125794",
"0.5211371",
"0.5171175",
"0.51680315",
"0.5159339",
"0.5144333",
"0.51388425",
"0.5134312",
"0.51232207",
"0.5122625",
"0.5115854",
"0.5110569",
"0.5110243",
"0.51064384",
"0.5067767",
"0.5058126",
"0.5043705",
"0.50370497",
"0.5019482",
"0.50173676",
"0.5009643",
"0.5000536",
"0.49977902",
"0.49921775",
"0.49869558",
"0.49842563",
"0.4975358",
"0.49738",
"0.49732938",
"0.49732938",
"0.49732938",
"0.49732938",
"0.49732938",
"0.4957258",
"0.49498954",
"0.49480698",
"0.49458036",
"0.49396434",
"0.49379224",
"0.4926902",
"0.49151137",
"0.49076656",
"0.49050733",
"0.48925343",
"0.48914504",
"0.4887281",
"0.48866037",
"0.48863173",
"0.48783264",
"0.48757696",
"0.4874644",
"0.48740533",
"0.4863592",
"0.48485276",
"0.48476458",
"0.4842552",
"0.48418576",
"0.4839331",
"0.4834877",
"0.4809098",
"0.48021096",
"0.479474",
"0.47888085",
"0.47884923",
"0.4788356",
"0.47858346",
"0.4780723",
"0.47795236",
"0.4778461",
"0.47721896",
"0.47668523",
"0.4759573",
"0.4758852",
"0.47564545"
]
| 0.59404594 | 5 |
TODO Autogenerated method stub | @Override
public void run() {
for (int i = 0; i<100 ; i++) {
pb.setProgress(i/1000.0);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
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.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 |
DFS function returns an array including all substrings derived from s. | static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {
if (map.containsKey(s))
return map.get(s);
LinkedList<String>res = new LinkedList<String>();
if (s.length() == 0) {
res.add("");
return res;
}
for (String word : wordDict) {
if (s.startsWith(word)) {
List<String>sublist = DFS(s.substring(word.length()), wordDict, map);
for (String sub : sublist)
res.add(word + (sub.isEmpty() ? "" : " ") + sub);
}
}
map.put(s, res);
return res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String>res = new LinkedList<String>(); \n\t if (s.length() == 0) {\n\t res.add(\"\");\n\t return res;\n\t } \n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t return res;\n\t}",
"public static Set<String> getAllSubSeq(String s) {\n if (s == null || s.isEmpty()) {\n return null;\n }\n\n int n = s.length();\n if (n > 31) {\n throw new IllegalArgumentException(\"max str length is 31\");\n }\n int total = (int) Math.pow(2, n) - 1;\n Set<String> set = new HashSet<String>(total);\n\n boolean[] mask = new boolean[n];\n set.add(s);\n\n // let get all other combinations except of \"all false and all true\" masks\n for (int i = 1; i < total; i++) {\n nextMask(mask);\n String subSeq = getSubseq(s, mask);\n set.add(subSeq);\n }\n return set;\n }",
"List<String> DFS(String s, List<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String> res = new LinkedList<String>(); \n\t if (s.length() == 0) { //递归结束条件\n\t res.add(\"\");\n\t return res;\n\t }\n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t \n\t return res;\n\t}",
"public boolean dfs(String s, Set<String> dic) {\n if(s.equals(\"\")) return true;\n for(int i=0; i<s.length(); i++) {\n String temp = s.substring(0, i+1);\n if(dic.contains(temp)) {\n if(dfs(s.substring(i+1), dic)) return true;\n }\n }\n return false;\n }",
"public List<Integer> locate(String s) {\r\n return depthFirstSearch(s);\r\n }",
"void processDFS(int offset, String str) {\n if (offset == 0) {\n wordOut.add(str.strip());\n }\n ArrayList<Integer> arr = dp[offset];\n for (int iStart : arr) {\n String strWord = sentence.substring(iStart, offset);\n strWord = strWord + \" \" + str;\n processDFS(iStart, strWord);\n }\n }",
"public ArrayList<String> getSubset(String s) {\n\n\t int length = s.length();\n\t int[] mult = new int[length];\n\t \n\t char[] tempchar = new char[length];\n\t for (int i = 0; i < length; i++) {\n\t\t tempchar[i] = s.charAt(i);\n\t }\n\t \n\t for (int i = 0; i < length; i++) {\n\t\t for (int j = i; j > 0; j--) {\n\t\t\t if (tempchar[j] < tempchar[j-1]) {\n\t\t\t\t exchange(tempchar[j], tempchar[j-1]);\n\t\t\t }else {\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t String unique = \"\";\n\t int count = 1;\n\t int count_l = 0;\n\t int i = 0, j = 1;\n\t unique += tempchar[0];\n\t while (j < length) {\n\t\t if (tempchar[i] == tempchar[j]) {\n\t\t\t count++;\n\t\t\t i++;\n\t\t\t j++;\n\t\t }else {\n\t\t\t mult[count_l] = count;\n\t\t\t count_l++;\n\t\t\t count = 1;\n\t\t\t unique += tempchar[j];\n\t\t\t i++;\n\t\t\t j++;\n\t\t }\n\t }\n\t \n\t return allSubsets(unique, mult, 0);\n\t}",
"public int countSubstrings(String s) {\n int l = s.length();\n cache = new int[l][l];\n\n for (int[] is : cache) {\n Arrays.fill(is, -1);\n }\n\n for (int i = 0; i < l; i++) {\n cache[i][i] = 1;\n }\n\n for (int i = 0; i < l; i++) {\n for (int j = i + 1; j < l; j++) {\n char c1, c2;\n c1 = s.charAt(i);\n c2 = s.charAt(j);\n if (c1 == c2) {\n if (j == i + 1 && cache[i][j] == -1) {\n cache[i][j] = 1;\n } else if (cache[i][j] == -1) {\n cache[i][j] = solve(s, i + 1, j - 1);\n }\n } else {\n cache[i][j] = 0;\n }\n }\n }\n\n int total = 0;\n\n for (int[] is : cache) {\n for (int i : is) {\n if (i > 0) {\n total += i;\n }\n }\n }\n\n return total;\n }",
"public static HashSet<String> getAllSegs(String s, boolean allowUnknowns) {\n int len = s.length();\n //handle strings that are too long for full analysis\n if (len>25) {\n boolean found = false;\n String beg=\"\";\n String mid=\"\";\n String end=\"\";\n for (int i=len; i>=1 && !found; i--) {\n for (int j=0; i+j<=len && !found; j++) {\n beg = s.substring(0,j);\n mid = s.substring(j,j+i);\n end = s.substring(j+i,len);\n if (hasMatch(mid,SAFEDICT)) {\n System.out.println(mid);\n found = true;\n }\n }\n }\n HashSet<String> begSegs = getAllSegs(beg, allowUnknowns);\n HashSet<String> endSegs = getAllSegs(end, allowUnknowns);\n HashSet<String> segs = new HashSet<String>();\n segs.addAll(concat(begSegs,mid,endSegs,beg.length(),end.length()));\n return segs;\n } else {\n return getAllSegsDyn(s, new int[len+1][len+1], 0, len, allowUnknowns);\n }\n }",
"public int countSubstrings_dp(String s) {\n\t\tint n = s.length();\n\t\tint res = 0;\n\t\tboolean[][] dp = new boolean[n][n];\n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tdp[i][j] = s.charAt(i) == s.charAt(j) \n\t\t\t\t\t\t&& (j - i + 1 < 3 || dp[i + 1][j - 1]);\n\t\t\t\t\n\t\t\t\tif (dp[i][j])\n\t\t\t\t\t++res;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"public static ArrayList<ArrayList<String>> partition(String s) {\r\n\t\tArrayList<ArrayList<String>> result = new ArrayList<ArrayList<String>>();\r\n\t\tif (s == null || s.length() == 0) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tArrayList<String> partition = new ArrayList<String>();// track each possible partition\r\n\t\taddPalindrome(s, 0, partition, result);\r\n\t\treturn result;\r\n\t}",
"private void dfs(String s, int leftCount, int rightCount, int openCount, int index, StringBuilder sb, Set<String> res) {\n if (index == s.length()) {\n if (leftCount == 0 && rightCount == 0 && openCount == 0) res.add(sb.toString());\n return;\n }\n if (leftCount < 0 || rightCount < 0 || openCount < 0) return;\n int len = sb.length();\n if (s.charAt(index) == '(') {\n dfs(s, leftCount - 1, rightCount, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount + 1, index + 1, sb.append('('), res);\n } else if (s.charAt(index) == ')') {\n dfs(s, leftCount, rightCount - 1, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount - 1, index + 1, sb.append(')'), res);\n } else {\n dfs(s, leftCount, rightCount, openCount, index + 1, sb.append(s.charAt(index)), res);\n }\n sb.setLength(len);\n }",
"public boolean serch(String word){\n return searchDFS(word, 0, root);\n}",
"List<List<Node>> findUndirectedPaths(Node s, Node d) {\n\t\tList<List<Node>> paths = new ArrayList<>();\n\t\tpath(s, d, new HashSet<>(), new ArrayList<>(), paths);\n System.out.println(\"Computed paths: \" + paths);\n return paths;\n\t}",
"private List<Integer> depthFirstSearch(String sequence) {\r\n LinkedList<Integer> stack = new LinkedList<Integer>();\r\n LinkedList<Integer> wordPos = new LinkedList<Integer>();\r\n List<Integer> neighbors = null;\r\n //string pos counter\r\n int c = 0;\r\n int index = -1;\r\n //find starting pos\r\n for (int i = 0; i < squareDimension * squareDimension; i++) {\r\n if (sequence.toUpperCase().startsWith(this.elementAtPos(i))) {\r\n this.clearMarks();\r\n wordPos.clear();\r\n stack.clear();\r\n //depth-first search\r\n stack.push(i);\r\n togglePosMark(i);\r\n wordPos = (LinkedList<Integer>) \r\n dfsRecursive(stack, sequence.substring(\r\n elementAtPos(i).length(), sequence.length())\r\n .toUpperCase(), elementAtPos(i).length(), \r\n i, sequence.length());\r\n if (wordPos.size() != 0) {\r\n return wordPos;\r\n }\r\n }\r\n }\r\n //no result so return empty list\r\n return new LinkedList<Integer>();\r\n }",
"public List<List<String>> partition(String s) {\n if(s == null || s.length() == 0){\n return output;\n }\n \n helper(s, 0, new ArrayList<String>());\n \n return output;\n }",
"public static ArrayList<String> permutations(String s) {\r\n ArrayList<String> list = new ArrayList<>();\r\n permutations(\"\", s, list);\r\n return list;\r\n }",
"public int countSubstrings(String s) {\n int count =0;\n int n = s.length();\n boolean[][] isPall = new boolean[n][n];\n \n for(int len =0;len<n;len++){\n \n for(int i=0,j=len;j<n;i++,j++){\n if(len == 0){\n isPall[i][j] = true;\n }\n else if(len == 1){\n isPall[i][j] = s.charAt(i) == s.charAt(j);\n }\n else{\n isPall[i][j] = (s.charAt(i) == s.charAt(j) &&\n isPall[i+1][j-1]);\n }\n \n if(isPall[i][j]){\n count++;\n }\n }\n \n } \n return count;\n }",
"public String DFS(int g) {\n\t\t//TODO\n\t}",
"public List<List<String>> partition(String s) {\n List<List<String>> res = new ArrayList<>();\n doSeparate(res,new ArrayList<>(),0,s);\n return res;\n }",
"public static int[] dfs_Stack(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tStack <Integer> dfs = new Stack<Integer>();\n\n\t\tdfs.push(s);\n\t\tvisited[s] = true;\n\t\twhile(!dfs.isEmpty()){\n\t\t\ts = dfs.pop();\n\t\t\tfor(gNode t=G[s]; t!= null; t=t.dest){\n\t\t\t\tif(!visited[t.item]){\t\t//once an item has been visited, set it equal to true\n\t\t\t\t\tvisited[t.item] = true;\n\t\t\t\t\tpath[t.item] = s;\t\t//change the int value of the path\n\t\t\t\t\tdfs.push(t.item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn path;\n\n\n\t}",
"Set<String> dfsTraversal(Graph graph, String root) {\n Set<String> seen = new LinkedHashSet<String>();\n Stack<String> stack = new Stack<String>();\n stack.push(root);\n\n while (!stack.isEmpty()) {\n String node = stack.pop();\n if (!seen.contains(node)) {\n seen.add(node);\n for (Node n : graph.getAdjacentNodes(node)) {\n stack.push(n.data);\n }\n\n }\n }\n\n return seen;\n }",
"public static String[] digraphGenerator(String str)\n\t{\n\t\tString plainText = str.replaceAll(\"\\\\s+\",\"\"); // removes spaces\n\t\tint c1 = 0;\n\t\tint c2 = 1;\n\t\twhile( c2 > -6 )\n\t\t{\n\t\t\tif (plainText.charAt(c1) == plainText.charAt(c2))\n\t\t\t{\n\t\t\t\tplainText = plainText.substring(0, c2) + \"q\" + plainText.substring(c2, plainText.length());\n\t\t\t\tc1-=2;\n\t\t\t\tc2-=2;\n\t\t\t}\n\t\t\tc1+=2;\n\t\t\tc2+=2;\n\t\t\tif (c2 >= plainText.length())\n\t\t\t{\n\t\t\t\tif (plainText.length() % 2 == 1)\n\t\t\t\t{\n\t\t\t\t\tplainText += \"q\";\n\t\t\t\t}\n\t\t\t\tString[] blockArray = plainText.split(String.format(\"(?<=\\\\G.{%1$d})\", 2)); // splits the string into groups of 2\n\t\t\t\treturn blockArray;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private void dfs(int start, int end, String str, String s, List<Integer>[] cache, LinkedList<String> res) {\n\t\tif (start == -1) {\n\t\t\tres.add(str.substring(1));\n\t\t} else {\n\t\t\tfor (int n : cache[start]) {\n\t\t\t\tdfs(n, start, \" \" + s.substring(start, end) + str, s, cache, res);\n\t\t\t}\n\t\t}\n\t}",
"public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }",
"public void printAllPaths(int s, int d)\n {\n boolean[] isVisited = new boolean[v];\n ArrayList<Integer> pathList = new ArrayList<>();\n\n //add source to path[]\n pathList.add(s);\n\n //Call recursive utility\n printAllPathsUtil(s, d, isVisited, pathList);\n }",
"public List<String> decode(String s) {\n List<String> res = new ArrayList<String>();\n int i = 0;\n while(i < s.length())\n {\n int pre = i;\n while(s.charAt(i)!='/') ++i;\n int len = Integer.valueOf(s.substring(pre,i));\n ++i;\n res.add(s.substring(i,i+len));\n i = i+len;\n }\n return res;\n }",
"private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }",
"public static TreeNode<String> treeOf(String s) {\n TreeNode<String> t = null;\n for (char c : s.toCharArray()) {\n t = insert(t, String.valueOf(c));\n }\n return t;\n }",
"private void helper(String s, int index, List<String> path){\n //base condition to stop recursion\n //when there is no substring to process, add the path to output\n if(index == s.length()){\n output.add(new ArrayList<String>(path));\n return;\n }\n \n //logic\n for(int i=index+1; i <= s.length(); i++){\n /* Generate all possible substrings that start from the current index\n * For each substring, check if it is a palindrome. \n * For each palindromic substring, call the helper function recursively to generate substrings for rest of the string\n */\n String substr = s.substring(index, i);\n if(isPalindrome(substr)){\n path.add(substr);\n helper(s, i, path);\n path.remove(path.size()-1);\n }\n }\n }",
"public String dfs(TrieNode root, String str){\n TrieNode t = root;\n for(char c : str.toCharArray()){\n if(t.isword)\n return t.word;\n else if(t.children[c - 'a'] == null)\n return null;\n t = t.children[c-'a'];\n }\n return null;\n }",
"static ArrayList<String> powerSet(String s)\n {\n // add your code here\n ArrayList<String> arr = new ArrayList<String>();\n String op = \"\";\n solve(s,op,arr);\n Collections.sort(arr);\n return arr;\n \n }",
"public static ArrayList<String> getPerms(String s){\n\t\tArrayList<String> permutations = new ArrayList<String>();\n\t\t\n\t\tif(s==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(s.length()==0){\n\t\t\tpermutations.add(\"\");\n\t\t\treturn permutations;\n\t\t}\n\t\t\n\t\t//firstly, choose the first char\n\t\tchar first = s.charAt(0);\n\t\t\n\t\t//store the remainder\n\t\tString remainder = s.substring(1);\n\t\t\n\t\t\n\t\t//using recursion\n\t\tArrayList<String> words = getPerms(remainder);\n\t\t\n\t\t//adding the first char to the result of the getPerms(remainder)\n\t\tfor(String word:words){\n\t\t\tfor(int i=0;i<=word.length();i++){\n\t\t\t\tpermutations.add(insertCharAt(word,first,i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn permutations;\n\t}",
"private void nonRecursiveDFS(TIntIterator[] adj, int s) {\r\n validateVertex(s);\r\n\r\n // depth-first search using an explicit stack\r\n final TIntStack stack = new TIntArrayStack();\r\n marked[s] = true;\r\n id[s] = count;\r\n size[count]++;\r\n stack.push(s);\r\n while (0 < stack.size()) {\r\n int v = stack.peek();\r\n if (adj[v].hasNext()) {\r\n int w = adj[v].next();\r\n if (!marked[w]) {\r\n // discovered vertex w for the first time\r\n marked[w] = true;\r\n id[w] = count;\r\n size[count]++;\r\n stack.push(w);\r\n }\r\n } else {\r\n stack.pop();\r\n }\r\n }\r\n }",
"public static String[] variableList(String s) {\n String[] vl = null;\n if (s == null) {\n return vl;\n }\n String st = s.trim();\n if (st.length() == 0) {\n return new String[0];\n }\n if (st.charAt(0) == '(') {\n st = st.substring(1);\n }\n if (st.charAt(st.length() - 1) == ')') {\n st = st.substring(0, st.length() - 1);\n }\n st = st.replaceAll(\",\", \" \");\n List<String> sl = new ArrayList<String>();\n Scanner sc = new Scanner(st);\n while (sc.hasNext()) {\n String sn = sc.next();\n sl.add(sn);\n }\n vl = new String[sl.size()];\n int i = 0;\n for (String si : sl) {\n vl[i] = si;\n i++;\n }\n return vl;\n }",
"private void dfs(String source) {\n visited.add(source);\n\n System.out.println(source);\n\n for (Object vertex : graph.get(source)) {\n if (!visited.contains(vertex))\n dfs((String) vertex);\n }\n }",
"public static void dfsRecursion(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tvisited[s] =true;\n\t\tfor(gNode t = G[s]; t!=null; t=t.dest){\n\t\t\tif(!visited[t.item]){\n\t\t\t\tpath[t.item]=s;\n\t\t\t\tdfsRecursion(G, visited, path, t.item);\n\t\t\t}\n\t\t}\t\n\t}",
"public CircularSuffixArray(String s){\n \t\ttext = s;\n \t\tlength = s.length();\n \t\tthis.csa = new int[length];\n \t\tfor (int i = 0; i < length; i++) {\n \t\t\tcsa[i] = i;\n \t\t}\n \t\t\n \t\tsort(0, length - 1, 0);\n \t}",
"public final int[][] solve(final Point s, final char[][] g) {\n visited = new boolean[g.length][g[0].length];\n stack.push(s);\n Point top;\n while (!stack.isEmpty()) {\n top = (Point) stack.peek();\n int i = top.x;\n int j = top.y;\n if (g[i][j] == 'E') {\n break;\n }\n visited[i][j] = true;\n if (i - 1 >= 0 && isValid(i - 1, j, g)) {\n stack.push(new Point(i - 1, j));\n } else if (j + 1 < m && isValid(i, j + 1, g)) {\n stack.push(new Point(i, j + 1));\n } else if (i + 1 < n && isValid(i + 1, j, g)) {\n stack.push(new Point(i + 1, j));\n } else if (j - 1 >= 0 && isValid(i, j - 1, g)) {\n stack.push(new Point(i, j - 1));\n } else {\n stack.pop();\n }\n }\n if (stack.size() == 0) {\n return null;\n }\n int[][] ret = new int[stack.size()][2];\n for (int i = stack.size() - 1; i >= 0; i--) {\n ret[i][0] = ((Point) stack.peek()).x;\n ret[i][1] = ((Point) stack.pop()).y;\n }\n return ret;\n }",
"public int countDistinct(String s) {\n\t\tTrie root = new Trie();\n\t\tint result = 0;\n for (int i = 0; i < s.length(); i++) {\n \tTrie cur = root;\n \tfor (int j = i; j < s.length(); j++) {\n \t\tint idx = s.charAt(j) - 'a';\n \t\tif (cur.arr[idx] == null) {\n \t\t\tresult++;\n \t\t\tcur.arr[idx] = new Trie();\n \t\t}\n \t\tcur = cur.arr[idx];\n \t}\n }\n return result;\n }",
"public void doDfsIterative(Graph g, int s) {\n boolean[] myVisited = new boolean[8];\n Stack<Integer> stack = new Stack<>();\n stack.push(s);\n myVisited[s] = true;\n while (!stack.isEmpty()) {\n int top = stack.pop();\n System.out.print(\"[\" + top + \"] \");\n for (int e : g.adj[top]) {\n if (!myVisited[e]) {\n stack.push(e);\n myVisited[e] = true;\n }\n }\n }\n\n }",
"public int countSubstrings(String s) {\n int cnt = 0;\n\n char[] str = s.toCharArray();\n\n\n for(int j=0; j<2; j++) {\n for(int i=0; i< str.length; i++) {\n int left = i;\n int right = i+j;\n\n while(left>=0 && right<str.length && str[left] == str[right]) {\n cnt++;\n left--;\n right++;\n }\n\n }\n }\n\n return cnt;\n }",
"@Test\n public void dfsRecursiveTest() {\n Map<String, List<String>> graph = new HashMap<>();\n graph.put(\"A\", Lists.newArrayList(\"B\", \"S\"));\n graph.put(\"B\", Lists.newArrayList(\"A\"));\n graph.put(\"C\", Lists.newArrayList(\"D\", \"E\", \"F\", \"S\"));\n graph.put(\"D\", Lists.newArrayList(\"C\"));\n graph.put(\"E\", Lists.newArrayList(\"C\", \"H\"));\n graph.put(\"F\", Lists.newArrayList(\"C\", \"G\"));\n graph.put(\"G\", Lists.newArrayList(\"F\", \"H\", \"S\"));\n graph.put(\"H\", Lists.newArrayList(\"E\", \"G\"));\n graph.put(\"S\", Lists.newArrayList(\"A\", \"C\", \"G\"));\n\n List<String> traversal = new DFSRecursive().runDFS(\"A\", graph);\n\n Assert.assertEquals(Lists.newArrayList(\"A\", \"B\", \"S\", \"C\", \"D\", \"E\", \"H\", \"G\", \"F\"), traversal);\n }",
"private static Character[] stringToArray(String s) {\n\t\tint len = s.length();\n\t\tCharacter[] testArray = new Character[len];\n\t\tfor(int i = 0; i < len; i++) {\n\t\t\ttestArray[i] = s.charAt(i);\n\t\t}\n\t\tassert(testArray.length == s.length());\n\t\treturn testArray;\n\t}",
"public List<String> removeInvalidParentheses(String s) {\n int leftCount = 0;\n int rightCount = 0;\n int openCount = 0;\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if ( c == '(') leftCount++;\n if ( c == ')') {\n if (leftCount > 0) leftCount--;\n else rightCount++;\n }\n }\n Set<String> res = new HashSet<>();\n dfs(s, leftCount, rightCount, 0, 0, new StringBuilder(), res);\n return new ArrayList<String>(res);\n }",
"static int lcs(String s, String t)\n{\n\tint n = s.length(), m = t.length();\n\tint[][] dp = new int[n+1][m+1];\n\tfor(int i = 1; i<=n; i++)\n\t\tfor(int j = 1; j<=m; j++)\n\t\t{\n\t\t\tdp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);\n\t\t\tint cur = (s.charAt(i-1) == t.charAt(j-1)) ? 1 : 0;\n\t\t\tdp[i][j] = Math.max(dp[i][j], cur + dp[i-1][j-1]);\n\t\t}\n\treturn dp[n][m];\n}",
"private void dfs(Node s, HashSet<Integer> visited) {\n\t\tif(visited.contains(s.id)) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(s.id);\n\t\tvisited.add(s.id);\n\t\tfor(Node n :s.adj) {\n\t\t\tdfs(n,visited);\n\t\t}\n\t}",
"public static int[] manacherEven(String s) {\n int n = s.length();\n int[] ans = new int[n];\n for (int i = 0, l = 0, r = -1; i < n; i++) {\n int k = i > r ? 0 : Math.min(ans[l + r - i + 1], r - i + 1);\n while (i - k - 1 >= 0 && i + k < n && s.charAt(i - k - 1) == s.charAt(i + k)) k++;\n ans[i] = k--;\n if (i + k > r) {\n l = i - k - 1;\n r = i + k;\n }\n }\n return ans;\n }",
"public List<Edge> breadthFirstTraverse(String v) {\n int start = indexOf(v);\n if (start == -1) return new LinkedList<>();\n\n List<Edge> path = new LinkedList<>();\n Queue<Integer> queue = new Queue<>();\n boolean[] visited = new boolean[vertexes.length];\n\n queue.enQueue(start);\n while(!queue.isEmpty()) {\n start = queue.deQueue();\n visited[start] = true;\n\n for (int i: this.heads[start]) {\n if (!visited[i]) { // not visited yet\n visited[i] = true;\n path.add(new Edge(start, i));\n\n queue.enQueue(i); // add to the queue for the next loop\n }\n }\n }\n\n return path;\n }",
"public List<String> decode(String s) {\n \tint i=0;\n List<String> result = new ArrayList<String>();\n while(i<s.length()){\n int j=i+1;\n while(s.charAt(j)!='[') j++;\n \tString n=s.substring(i, j);\n int t=Integer.valueOf(n);\n System.out.print(t);\n result.add(s.substring(i+n.length()+1, i+n.length()+1+t));\n \n i=i+n.length()+1+t+1;\n }\n return result;\n }",
"public boolean dfs_iterative_util(LinkedList<Integer>[] graph, boolean[] visited, int s){\n Stack<Integer> fringe = new Stack<Integer>();\n Set<Integer> currStack = new HashSet<Integer>();\n \n fringe.push(s);\n currStack.add(s);\n \n while(!fringe.isEmpty()){\n int curr = fringe.pop();\n if(currStack.contains(curr))\n return false;\n visited[curr] = true;\n currStack.add(curr);\n if(graph[curr] != null){\n Iterator<Integer> itr = graph[curr].iterator();\n while(itr.hasNext()){\n int n = itr.next();\n \n if(!visited[n]){\n fringe.push(n);\n }\n }\n currStack.remove(curr);\n }\n \n }\n \n return true;\n }",
"public static int[] findNumsOfRepsv2(String s, char[] c) {\n int[] sums = new int[c.length];\n HashMap<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++){\n if (!map.containsKey(s.charAt(i))){\n map.put(s.charAt(i), 1);\n } else {\n int sum = map.get(s.charAt(i));\n map.put(s.charAt(i), sum + 1);\n }\n }\n for (int j = 0; j < c.length; j++){\n int sum;\n if (!map.containsKey(c[j])) {\n sums[j] = 0;\n } else {\n sums[j] = map.get(c[j]);\n }\n }\n return sums;\n }",
"public ArrayList<String> depthFirstSearch(Character sourceId, Character destinationId) {\n // Safety check first if the hashmap contains the key\n if(!graph.containsKey(sourceId) || !graph.containsKey(destinationId)) {\n throw new NullPointerException(\"The graph does not contain the source or the destination node ID\");\n }\n\n // Initialize empty array list of paths\n paths = new ArrayList<>();\n\n // Get the node from the graph\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n // Mark the visited nodes in a HashSet so that it will not re-visit\n HashSet<Character> visited = new HashSet<>();\n\n depthFirstSearch(sourceNode, destinationNode, \"\", visited);\n\n // Call the private recursive function\n return paths;\n }",
"public List<Integer> findSubstring(String s, String[] words) {\n if (s == null || s.isEmpty() || words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n List<Integer> res = new ArrayList<>();\n int size = words.length;\n int length = words[0].length();\n\n if (s.length() < size * length) {\n return new ArrayList<>();\n }\n\n Map<String,Integer> covered = new HashMap<>();\n\n for (int j=0; j<size; j++) {\n if (s.indexOf(words[j]) < 0) {\n return res;\n }\n\n covered.compute(words[j], (k, v) -> v != null ? covered.get(k)+1 : 1);\n }\n\n int i=0;\n int sLength = s.length();\n while(sLength -i >= size * length){\n Map<String, Integer> temp = new HashMap<>(covered);\n\n for (int j=0; j<words.length; j++){\n String testStr = s.substring(i + j*length, i + (j+1)*length);\n\n if (temp.containsKey(testStr)){\n if (temp.get(testStr) == 1)\n temp.remove(testStr);\n else\n temp.put(testStr, temp.get(testStr)-1);\n }\n else {\n break;\n }\n }\n\n if (temp.size() == 0) {\n res.add(i);\n }\n\n i++;\n }\n return res;\n }",
"public List<Node> findShortestPath(Node s, Node t);",
"public static int[] lcp(int[] sa, CharSequence s) {\n int n = sa.length;\n int[] rank = new int[n];\n for (int i = 0; i < n; i++)\n rank[sa[i]] = i;\n int[] lcp = new int[n - 1];\n for (int i = 0, h = 0; i < n; i++) {\n if (rank[i] < n - 1) {\n for (int j = sa[rank[i] + 1]; Math.max(i, j) + h < s.length()\n && s.charAt(i + h) == s.charAt(j + h); ++h)\n ;\n lcp[rank[i]] = h;\n if (h > 0)\n --h;\n }\n }\n return lcp;\n }",
"public String findAllSubstring(String s) {\n Set<String> set = new HashSet<>();\n String res = \"\";\n int max = -1;\n\n for (int i = 0; i < s.length(); i++) {\n String cur = \"\";\n for (int j = i; j < s.length(); j++) {\n cur += s.charAt(j);\n if (set.contains(cur) && cur.length() > max) {\n res = cur;\n max = cur.length();\n } else {\n set.add(cur);\n }\n }\n }\n return res;\n }",
"public TermToVertexCount[] getSubTermVertexMappings(String term)\n {\n /* String is not valid as-is.\n * \n * Replace and split words into parts.\n */\n term = term.replace('-', ' ');\n String [] arr = term.split(\" \");\n\n /* Remove common words */\n for(int i = 0; i < arr.length; i++)\n {\n if(arr[i].equals(\"and\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"or\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"to\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"be\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"the\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"a\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"of\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"on\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"in\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"for\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"with\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"by\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"into\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"an\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"is\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"no\"))\n {\n arr[i] = \"\";\n }\n }//end: for(i)\n\n /* Create String array without common terms */\n int size = 0;\n for(int i = 0; i < arr.length; i++)\n {\n if(!arr[i].equals(\"\") && stem)\n { // Stem if required\n arr[i] = PorterStemmerTokenizerFactory.stem(arr[i]);\n }\n \n // Check for valid term\n if(!arr[i].equals(\"\") && getVertexMappings(arr[i]) != null)\n {\n size++;\n }\n }//end: for(i)\n \n if(size == 0)\n { /* No valid terms found */\n return null;\n }\n \n /* At least one valid term was found */\n TermToVertexCount[] words = new TermToVertexCount[size];\n int pos = 0;\n \n for(int i = 0; i < arr.length; i++)\n {\n // Check for valid term\n if(!arr[i].equals(\"\"))\n {\n // Get mappings for sub-term\n TermToVertexCount[] temp = getVertexMappings(arr[i]);\n \n if(temp != null)\n {\n words[pos] = temp[0];\n pos++;\n }//end: if(temp)\n \n }//end: if(!arr[i])\n }//end: for(i)\n \n return words; \n }",
"public String[] findPath(String[] dictionary, String startWord, String endWord) {\n // Use A queue to save all the words to check and use BFS\n LinkedList<String> queue = new LinkedList<>();\n queue.addFirst(startWord);\n // Use an ArrayList to save the words visited\n ArrayList<String> visited = new ArrayList<>();\n // Use an ArrayList to save the parents of the words (in visited)\n ArrayList<Integer> parent = new ArrayList<>();\n parent.add(-1);\n int index = 0;\n String current;\n boolean founded = false;\n while (!queue.isEmpty()){\n current = queue.removeFirst(); //Remove the first word\n int currentI = visited.size(); // Get index for saving parent\n visited.add(current);\n //Check all available words and save to the arrayList\n for (int i = 0; i < current.length(); i++) {\n //Replace from the first letter\n for (char j = 'A'; j <= 'Z'; j++) {\n char[] neww = current.toCharArray();\n neww[i] = j;\n String newWord = String.valueOf(neww);\n //Check if the new word is a valid word\n if (checkDict(newWord,dictionary)){\n //Check if visited or in queue\n if (visited.contains(newWord)||queue.contains(newWord)) continue;\n //Add into queue\n queue.addLast(newWord);\n //Record parents\n parent.add(currentI);\n //Check if equals to end\n if (newWord.compareTo(endWord)==0) {\n founded = true;\n break;\n }\n }\n }\n if (founded) break;\n }\n if (founded) break;\n }\n if (founded){\n LinkedList<Integer> stack = new LinkedList<>();\n stack.addFirst(parent.get(parent.size()-1));\n while (parent.get(stack.getFirst())!=-1){\n stack.addFirst(parent.get(stack.getFirst()));\n }\n int size = stack.size();\n String result[] = new String[size+1];\n result[0] = startWord;\n stack.removeFirst();\n for (int i = 1; i <size; i++) {\n result[i] = visited.get(stack.removeFirst());\n }\n result[size] = endWord;\n return result;\n }\n return new String[0];\n }",
"public static List<String> parseMangledNestings(String s) {\n\t\tList<String> results = new ArrayList<>();\n\t\tMatcher m = MANGLED_NESTING_REGEX.matcher(s);\n\t\tif (!m.matches()) {\n\t\t\treturn results;\n\t\t}\n\t\ts = m.group(2);\n\n\t\tint cp = 0;\n\t\twhile (cp < s.length()) {\n\t\t\tint start = cp;\n\t\t\twhile (Character.isDigit(s.charAt(cp)) && cp < s.length()) {\n\t\t\t\tcp++;\n\t\t\t}\n\t\t\tif (start == cp) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint len = Integer.parseInt(s.substring(start, cp));\n\t\t\tif (cp + len <= s.length()) {\n\t\t\t\tString name = s.substring(cp, cp + len);\n\t\t\t\tresults.add(name);\n\t\t\t}\n\t\t\tcp += len;\n\t\t}\n\t\treturn results;\n\t}",
"private int[] computeLspTable(String pattern) {\n\t\tint lsp[] = new int[pattern.length()];\n\t\tlsp[0] = 0;\n\t\tfor (int i = 1; i < pattern.length(); i++) {\n\t\t\tint j = lsp[i - 1];\n\t\t\twhile (j > 0 && pattern.charAt(i) != pattern.charAt(j)) {\n\t\t\t\tj = lsp[j - 1]; // in worst case, this instruction will be called (pattern.length - 1) times\n//\t\t\t\tSystem.out.print(j + \",\");\n\t\t\t}\n\t\t\tif (pattern.charAt(i) == pattern.charAt(j)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tlsp[i] = j;\n\t\t}\n\t\treturn lsp;\n\t\t\n//\t a a a a b\n//\t 0 1 2 3 0\n\t \n//\t a b c a b c a c a //abcdbcddd\n//\t 0 0 0 1 2 3 4 0 1\n\t \n//\t a b c d b c d d d //abcdbcddd\n//\t 0 0 0 0 0 0 0 0 0\n//\t a b a b a b c\n//\t 0 0 1 2 3 4 0\n\t}",
"public static void botched_dfs2(Graph g, int s) {\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n System.out.println(s);\n visited[s] = true;\n while (!stack.empty()) {\n int u = stack.pop();\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n System.out.println(e.to);\n visited[e.to] = true;\n stack.push(e.to);\n }\n }\n }",
"public static int[] findNumsOfRepsv1(String s, char[] c){\n int[] sums = new int[c.length]; // 1\n for (int i = 0; i < s.length(); i++){ // 1, n+1, n\n for(int j = 0; j < c.length; j++){ // n, n*m + 1, n*m\n if (s.charAt(i) == c[j]){ // n*m\n sums[j] = sums[j] + 1; // n*m\n }\n }\n }\n return sums; // 1\n }",
"static void subsequence(String str)\n {\n // iterate over the entire string\n for (int i = 0; i < str.length(); i++) {\n \n // iterate from the end of the string\n // to generate substrings\n for (int j = str.length(); j > i; j--) {\n String sub_str = str.substring(i, j);\n \n if (!st.contains(sub_str))\n st.add(sub_str);\n \n // drop kth character in the substring\n // and if its not in the set then recur\n for (int k = 0; k < sub_str.length(); k++) {\n StringBuffer sb = new StringBuffer(sub_str);\n \n // drop character from the string\n sb.deleteCharAt(k);\n if (!st.contains(sb)) {\n \tsubsequence(sb.toString());\n }\n }\n }\n }\n }",
"public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }",
"public int findContentChildren(int[] g, int[] s) {\n \n Arrays.sort(g);\n Arrays.sort(s);\n int indexG = 0, indexS = 0, ans = 0;\n while(indexG < g.length && indexS < s.length) {\n if(s[indexS] >= g[indexG]) {\n indexS++;\n indexG++;\n ans++;\n } else {\n indexS++;\n }\n }\n return ans;\n }",
"public static void dfs(Node n,String ch){\n Stack<Node> st=new Stack(); // stack for storing path\n int freq=n.freq; // recording root freq to avoid it adding in path encoding\n find_path_and_encode(st,n,ch,freq);\n }",
"public int countBinarySubstrings(String s) {\n int result = 0;\n int[] count = new int[2];\n int cur = s.charAt(0) - '0';\n count[cur]++;\n for (int i = 1; i < s.length(); i++) {\n \tchar c = s.charAt(i);\n \tif (c - '0' == cur) count[cur]++;\n \telse {\n \t\tresult += Math.min(count[0], count[1]);\n \t\tcur = c - '0';\n \t\tcount[cur] = 1;\n \t}\n }\n result += Math.min(count[0], count[1]);\n return result;\n }",
"public int minCut2(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n // List<List<String>> res = new ArrayList<>();\n helper2(s, 0, cut, dp, 0);\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }",
"public String[] findTreeLocation(String s){\n for (TreeInfo t : TreeInfo.values()){\n if(t.getTreeType().contains(s)){\n return t.getTreeLocation();\n }\n }\n return null;\n }",
"public void bfs(int s) {\n boolean[] visited = new boolean[v];\n int level = 0;\n parent[s] = 0;\n levels[s] = level;\n Queue<Integer> queue = new LinkedList<>();\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()){\n Integer next = queue.poll();\n System.out.print(next+\", \");\n Iterator<Integer> it = adj[next].listIterator();\n\n while (it.hasNext()){\n Integer i = it.next();\n if(!visited[i]){\n visited[i] = true;\n levels[i] = level;\n parent[i] = next;\n queue.add(i);\n }\n }\n\n level++;\n }\n }",
"public int countBinarySubstrings(String s) {\n\n int pre = 0, cur = 1, res = 0;\n for (int i = 1; i < s.length(); i++) {\n if (s.charAt(i) == s.charAt(i - 1)) {\n cur++;\n } else {\n res += Math.min(cur, pre);\n pre = cur;\n cur = 1;\n }\n }\n res += Math.min(cur, pre);\n return res;\n }",
"@Override\n\tpublic Set<NFAState> eClosure(NFAState s) {\n\t\tSet<NFAState> visited = new TreeSet<NFAState>();\n\t\t//invoke recursive helper\n\t\tvisited = eClosureHelper(s, visited);\n\t\t\n\t\treturn visited;\n\t}",
"@Override\r\n\tpublic Set<NFAState> eClosure(NFAState s) {\r\n\t\tSet<NFAState> l = new HashSet<>();\r\n\t\treturn depthFirstSearch(l, s);\r\n\t}",
"boolean dfs(char[][] board, boolean[][] visited, int i, int j,String word, int k) {\n\t\t if(k==word.length()) return true;\n\t\t if(i<0||i>=board.length||j<0||j>=board[0].length) return false;\n\t\t if(visited[i][j]) return false;\n\t\t if(board[i][j]!=word.charAt(k)) return false;\n\t\t \n\t\t visited[i][j]=true;\n\t\t if(dfs(board,visited,i-1,j,word,k+1)) return true;\n\t\t if(dfs(board,visited,i+1,j,word,k+1)) return true;\n\t\t if(dfs(board,visited,i,j-1,word,k+1)) return true;\n\t\t if(dfs(board,visited,i,j+1,word,k+1)) return true;\n\t\t visited[i][j]=false;\n\t\t \n\t\treturn false;\n\t}",
"public int minCut1(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n List<List<String>> res = new ArrayList<>();\n helper1(s, 0, cut, dp, res, new ArrayList<>());\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }",
"public List<String> findRepeatedDnaSequences(String s) {\n if (s == null) return null;\n HashSet<String> result = new HashSet<String>();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < s.length() - 9; ++i) {\n String seq = s.substring(i, i + 10);\n int code = encode(seq);\n if (!set.contains(code)) {\n set.add(code);\n } else {\n result.add(seq);\n }\n }\n return new ArrayList<String>(result);\n }",
"public List<String> findRepeatedDnaSequences2(String s) {\n if(s == null || s.length() <= 10){\n return new ArrayList<String>();\n }\n \n int n = s.length();\n Set<String> visited = new HashSet<String>();\n Set<String> duplicated = new HashSet<String>();\n \n for(int i = 0; i <= n - 10; ++i){\n String subStr = s.substring(i, i + 10);\n \n if(!visited.add(subStr)) {\n \tduplicated.add(subStr);\n }\n }\n \n return new ArrayList<String>(duplicated);\n }",
"public static void botched_dfs3(Graph g, int s) {\n int cpt = 0;\n\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n while (!stack.empty()) {\n System.out.println(\"Capacité : \" + stack.capacity());\n int u = stack.pop();\n if (!visited[u]) {\n visited[u] = true;\n System.out.println(u);\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n stack.push(e.to);\n cpt++;\n }\n }\n }\n }",
"public List<String> removeInvalidParentheses(String s) {\n Set<String> visited = new HashSet<>();\n List<String> ans = new ArrayList<>();\n\n Queue<String> queue = new LinkedList<>();\n visited.add(s);\n queue.offer(s);\n\n while (!queue.isEmpty() && ans.isEmpty()) {\n List<String> curSteps = new ArrayList<>();\n int size = queue.size();\n\n while (size > 0) {\n curSteps.add(queue.poll());\n size--;\n }\n\n for(String cur : curSteps) {\n\n if (isValid(cur)) {\n ans.add(cur);\n }\n\n for(int i = 0; i < cur.length(); i++) { // remove ith char\n String next = cur.substring(0, i) + cur.substring(i + 1);\n if (!visited.contains(next)) {\n visited.add(next);\n queue.offer(next);\n }\n }\n }\n }\n\n return ans;\n }",
"public String[] convertSentToArrayOfWords(String s){\n\t\tString [] arr = s.split(\" \");\n\n\t\treturn arr;\n\t}",
"public List<Integer> partitionLabelsSlow(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n boolean endReached = false;\n\n int start=0, end, extendedEnd;\n\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = S.lastIndexOf(startCharacter);\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n if(S.lastIndexOf(S.charAt(i)) > end) {\n extendedEnd = S.lastIndexOf(S.charAt(i));\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }",
"public int countSubstrings_dp2(String s) {\n\t\tint sLen = s.length();\n\t\tchar[] cArr = s.toCharArray();\n\n\t\tint totalPallindromes = 0;\n\t\tboolean[][] dp = new boolean[sLen][sLen];\n\n\t\t// Single length pallindroms\n\t\tfor (int i = 0; i < sLen; i++) {\n\t\t\tdp[i][i] = true;\n\t\t\ttotalPallindromes++;\n\t\t}\n\n\t\t// 2 length pallindromes\n\t\tfor (int i = 0; i < sLen - 1; i++) {\n\t\t\tif (cArr[i] == cArr[i + 1]) {\n\t\t\t\tdp[i][i + 1] = true;\n\t\t\t\ttotalPallindromes++;\n\t\t\t}\n\t\t}\n\n\t\t// Lengths > 3\n\t\tfor (int subLen = 2; subLen < sLen; subLen++) {\n\t\t\tfor (int i = 0; i < sLen - subLen; i++) {\n\t\t\t\tint j = i + subLen;\n\n\t\t\t\tif (dp[i + 1][j - 1] && cArr[i] == cArr[j]) {\n\t\t\t\t\tdp[i][j] = true;\n\t\t\t\t\ttotalPallindromes++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn totalPallindromes;\n\t}",
"static int[] bfs(int n, int m, int[][] edges, int s) {\r\n \r\n HashSet<Integer> aList[] = new HashSet[n];\r\n // Array of the nodes of the tree\r\n\r\n Queue<Integer> bfsQueue = new LinkedList();\r\n\r\n boolean visited[] = new boolean[n];\r\n // check if a node is visited or not\r\n\r\n\r\n int cost[] = new int[n];\r\n // cost to travel from one node to other\r\n\r\n for (int i = 0; i < n; i++) {\r\n // intialising the values\r\n visited[i] = false;\r\n cost[i] = -1;\r\n\r\n aList[i] = new HashSet<Integer>();\r\n // Each element of aList is a Set\r\n // To store the neighbouring nodes of a particular node\r\n }\r\n\r\n for (int i = 0; i < m; i++) {\r\n // let node[i] <--> node[j]\r\n\r\n // adding node[j] to neighbours list of node[i]\r\n aList[edges[i][0] - 1].add(edges[i][1] - 1);\r\n\r\n // adding node[i] to neighbours list of node[j]\r\n aList[edges[i][1] - 1].add(edges[i][0] - 1);\r\n }\r\n\r\n //\r\n s = s - 1;\r\n bfsQueue.add(s);\r\n visited[s] = true;\r\n cost[s] = 0;\r\n //\r\n \r\n \r\n while (!bfsQueue.isEmpty()) {\r\n \r\n int curr = bfsQueue.poll();\r\n // takes the last element of the queue\r\n \r\n for (int neigh : aList[curr]) { // iterating the neighbours of node 'curr'\r\n if (!visited[neigh]) { // checking if node neigh id already visited during the search\r\n visited[neigh ] = true;\r\n bfsQueue.add(neigh); //add the node neigh to bfsqueue\r\n cost[neigh] = cost[curr] + 6; \r\n }\r\n }\r\n }\r\n\r\n int result[] = new int[n-1];\r\n\r\n for (int i=0, j=0; i<n && j<n-1; i++, j++) {\r\n if (i == s){\r\n i++;\r\n }\r\n result[j] = cost[i];\r\n }\r\n \r\n return result;\r\n }",
"int[] parse(String re, int s, int t)\r\n\t{\r\n\t\tint [] st;\r\n\t\tint i;\r\n\t\t\r\n\t\t//single symbol\r\n\t\tif (s==t)\r\n\t\t{\r\n\t\t\tst=new int[2];\r\n\t\t\tst[0]=incCapacity();\r\n\t\t\tst[1]=incCapacity();\r\n\t\t\tif (re.charAt(s)=='e') //epsilon\r\n\t\t\t\taddEdge(st[0],symbol,st[1]);\r\n\t\t\telse addEdge(st[0],re.charAt(s)-'0',st[1]);\r\n\t\t\treturn st;\r\n\t\t}\r\n\t\t\r\n\t\t//(....)\r\n\t\tif ((re.charAt(s)=='(')&&(re.charAt(t)==')'))\r\n\t\t{\r\n\t\t\tif (next[s]==t)\r\n\t\t\t\treturn parse(re,s+1,t-1);\r\n\t\t}\r\n\t\t\r\n\t\t//RE1+RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='+'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = union(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//RE1.RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='.'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = concat(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//(RE)*\r\n\t\tassert(re.charAt(t)=='*');\r\n\t\tint [] st1=parse(re,s,t-1);\r\n\t\tst=clo(st1[0],st1[1]);\r\n\t\treturn st; \r\n\t}",
"public int countSubstrings_Memo(String s) {\n\t\tint n = s.length(), count = n;\n\t\t\n\t\tBoolean[][] mem = new Boolean[n][n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tfor (int j = i + 1; j < n; j++)\n\t\t\t\tif (isPal_Memo(i, j, s, mem))\n\t\t\t\t\tcount++;\n\t\treturn count;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString str = \"abccbc\";\n\t\t\n\t\tlong[][] dp = new long[str.length()][str.length()];\t\n\t\t\n\t\tfor (int g=0 ; g<str.length() ; g++) {\n\t\t\t\n\t\t\tfor (int i=0 , j=g ; j<str.length() ; i++ , j++) {\n\t\t\t\tif (g == 0) dp[i][j] = 1;\n\t\t\t\t\n\t\t\t\telse if (g == 1) dp[i][j] = (str.charAt(i) == str.charAt(j)) ? 3 : 2;\n\t\t\t\t\n\t\t\t\telse dp[i][j] = (str.charAt(i) == str.charAt(j)) ? (dp[i][j-1] + dp[i+1][j] + 1) : (dp[i][j-1] + dp[i+1][j] - dp[i+1][j-1]);\n\t\t\t\t\n\t\t\t\t//if (dp[i][j] && str.substring(i, j+1).length() > result.length()) result = str.substring(i, j+1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(dp[0][str.length()-1]);\n\t}",
"public List<List<String>> groupAnagrams_var2(String[] strs) {\n Map<Map<Character, Integer>, List<String>> map = new HashMap<>();\n for (String currStr : strs) {\n Map<Character, Integer> currMap = new HashMap<>();\n for (int i = 0; i < currStr.length(); i++)\n currMap.put(currStr.charAt(i), currMap.getOrDefault(currStr.charAt(i), 0) + 1);\n map.computeIfAbsent(currMap, k -> new LinkedList<>()).add(currStr);\n }\n\n return new LinkedList<>(map.values());\n }",
"public List<String> letterCasePermutation(String S) {\n List<String> ans = new ArrayList<>();\n backtrack(ans, 0, S.toCharArray());\n return ans;\n }",
"public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }",
"public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}",
"public int countSubstrings_brute_force(String s) {\n\t\tint ans = 0;\n\n for (int start = 0; start < s.length(); ++start)\n for (int end = start; end < s.length(); ++end) \n ans += isPal_brute_force(s, start, end) ? 1 : 0;\n\n return ans;\n\t}",
"public DigraphDFS(Digraph G, int s) {\n\t\t// TODO Auto-generated constructor stub\n\t\tthis.s = s;\n\t\tdfs(G, s);\n\t}",
"public static String[] split(String s) {\n int cp = 0; // Cantidad de palabras\n\n // Recorremos en busca de espacios\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') { // Si es un espacio\n cp++; // Aumentamos en uno la cantidad de palabras\n }\n }\n\n // \"Este blog es genial\" tiene 3 espacios y 3 + 1 palabras\n String[] partes = new String[cp + 1];\n for (int i = 0; i < partes.length; i++) {\n partes[i] = \"\"; // Se inicializa en \"\" en lugar de null (defecto)\n }\n\n int ind = 0; // Creamos un índice para las palabras\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') { // Si hay un espacio\n ind++; // Pasamos a la siguiente palabra\n continue; // Próximo i\n }\n partes[ind] += s.charAt(i); // Sino, agregamos el carácter a la palabra actual\n }\n return partes; // Devolvemos las partes\n }",
"public int countBinarySubstrings(String s) {\n\t int total = 0;\n\t for (int i=0; i < s.length(); i++) {\n\t for (int len=2; i+len <= s.length(); len +=2) {\n\t int zeroes=0, ones=0;\n\t for (int j=i; j < i+len; j++) {\n\t if (s.charAt(j) == '1') {\n\t ones ++;\n\t } else {\n\t zeroes++;\n\t }\n\t }\n\t if (zeroes != 0 && zeroes == ones) {\n\t total++;\n\t }\n\t }\n\t }\n\t return total;\n\t }",
"public void dfs(ArrayList<String> ans, String digits, int level, String str) {\n\t\tif (level == digits.length()) {\n ans.add(str);\n return;\n }\n \n \n //change it to ASCII code, and then get the string\n String letters = mapping[digits.charAt(level) - '0'];\n \n for (int i = 0; i < letters.length(); i++) {\n \tdfs(ans, digits, level+1, str+letters.charAt(i));\n }\n }",
"public List<String> decode(String s) {\n List<String> ans = new ArrayList<String>();\n int l = 0, r = 0;\n while (r < s.length()) {\n while (s.charAt(r) != '@') r++;\n int len = Integer.parseInt(s.substring(l, r++));\n ans.add(s.substring(r, r+len)); \n l = r = r+len;\n }\n \n return ans;\n }",
"public List<String> decode(String s) {\n List<String> words = new ArrayList<>();\n if (s.length() == 0) return words;\n int i = 0;\n while (i < s.length()) {\n int d = s.indexOf(\"#\", i);\n int len = Integer.parseInt(s.substring(i , d));\n i = d + 1 + len;\n words.add(s.substring(d + 1, i));\n }\n return words;\n }",
"public List<String> restoreIpAddresses(String s) {\n backtracking(1, s, 0);\n return ans;\n }",
"public Set<Integer> computeSuffixTreeEdges(final String text) {\n final Set<Integer> result = new LinkedHashSet();\n // Implement this function yourself\n final Node root = buildTree(patterns);\n final int length = text.length();\n for (int idx = 0; idx < length; idx++) {\n computeSuffixTree(text, idx, idx, root, result);\n }\n return result;\n }"
]
| [
"0.6156624",
"0.6106537",
"0.6105959",
"0.582615",
"0.5817731",
"0.58174735",
"0.5781247",
"0.5760028",
"0.5731743",
"0.57213354",
"0.567966",
"0.567438",
"0.5642325",
"0.56204635",
"0.5602179",
"0.55395424",
"0.5523105",
"0.54876137",
"0.5477179",
"0.54628694",
"0.54465604",
"0.5424718",
"0.5420539",
"0.54155284",
"0.53872055",
"0.5366767",
"0.53523844",
"0.5350751",
"0.5346487",
"0.5337017",
"0.5327895",
"0.5283707",
"0.528023",
"0.52762187",
"0.52745855",
"0.5269658",
"0.52477866",
"0.52441895",
"0.523302",
"0.5226046",
"0.51984805",
"0.51979595",
"0.51855683",
"0.51690805",
"0.51650673",
"0.5163599",
"0.5160919",
"0.51516575",
"0.51298606",
"0.5113404",
"0.51072776",
"0.50875884",
"0.507781",
"0.5077082",
"0.50667024",
"0.50645083",
"0.50430405",
"0.5014549",
"0.5011583",
"0.50105965",
"0.50082535",
"0.5007568",
"0.49840528",
"0.49779904",
"0.49761325",
"0.4959048",
"0.49537474",
"0.49536428",
"0.4953571",
"0.49533647",
"0.49493158",
"0.49480283",
"0.4939494",
"0.49206614",
"0.4905858",
"0.48988414",
"0.4897087",
"0.48939687",
"0.48904824",
"0.48891997",
"0.48842683",
"0.4881894",
"0.48782414",
"0.48775405",
"0.4865615",
"0.48635772",
"0.48622",
"0.486004",
"0.4859225",
"0.48548874",
"0.4849645",
"0.48485062",
"0.48469308",
"0.4839613",
"0.48393524",
"0.48334157",
"0.48286304",
"0.48231477",
"0.48229402",
"0.4820764"
]
| 0.6283376 | 0 |
custom cache : can be usd to ipmlement different types of cache | public interface CustomCache<K, V> {
/**
* gets a value by key
* returns null if key is expired
*
* @param key
* @return
*/
V get(K key);
/**
* puts into cache with given ttl
*
* @param key
* @param value
*/
void put(K key, V value);
/**
* averages out the non expired values in cache.
* to be discussed in interview
*
* @return
*/
double average();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ContentCache extends DataCache {\r\n String getValue(String code, Locale locale);\r\n\r\n Boolean containsLocale(Locale locale);\r\n\r\n Boolean containsCodeForLocale(String code, Locale locale);\r\n\r\n Map<String, Map<String, String>> getCachedData();\r\n}",
"public interface ICache {\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object get(String key);\n\t\n\t\n\t\n\t/**\n\t * <p>\n\t * \n\t * @param key\n\t * @return old cache object \n\t */\n\tpublic Object put(String key,Object value);\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key quietly,\n\t * without update the statistic data\n\t * @param key\n\t * @return\n\t */\n\tpublic Object getQuiet(String key);\n\t\n\t\n\t/**\n\t * <p>\n\t * remove the cached object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object remove(String key);\n\t\n\t/**\n\t * <p>\n\t * free specied size mem\n\t * @param size unit in Byte\n\t * @return\n\t */\n\tpublic long free(long size);\n\t\n\t\n\t/**\n\t * <p>\n\t * flush to the underly resource\n\t */\n\tpublic void flush();\n\t\n}",
"public interface Cache<K,V> {\n\t/**\n\t * Returns the object for the given id from cache, null if no object is in cache.\n\t *\n\t * @param id the id to retrieve\n\t * @return a V object.\n\t */\n\tV get(K id);\n\t\n\t/**\n\t * Puts the cacheable object in cache.\n\t *\n\t * @param id the object id\n\t * @param cacheable the object to cache.\n\t */\n\tvoid put(K id, V cacheable);\n\n\t/**\n\t * Removes an object from the cache.\n\t *\n\t * @param id cache object id.\n\t */\n\tvoid remove(K id);\n\t\n\t/**\n\t * Clears the cache.\n\t */\n\tvoid clear();\n\n\t/**\n\t * Returns the cache stats.\n\t *\n\t * @return a {@link net.anotheria.moskito.core.predefined.CacheStats} object.\n\t */\n\tCacheStats getCacheStats();\n\n /**\n * Return all elements from cache.\n *\n * @return collection\n */\n Collection<V> getAllElements();\n\t\n}",
"public interface ContentCache extends Cache<List<byte[]>>{\n int notCacheSize();\n}",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"public interface EzyerCache {\n class PersistentObject {\n public final byte[] mData;\n public final String mKey;\n public final long mExpireTimeMillis;\n\n public PersistentObject(byte[] data, String key, long expireTimeMillis) {\n mData = data;\n mKey = key;\n mExpireTimeMillis = expireTimeMillis;\n }\n }\n\n class ValueObject {\n public final byte[] mData;\n public final String mKey;\n public final boolean mIsExpired;\n\n public ValueObject(byte[] data, String key, boolean isExpired) {\n mData = data;\n mKey = key;\n mIsExpired = isExpired;\n }\n }\n\n ValueObject get(String key);\n\n List<ValueObject> get(String key, int start, int end);\n\n void set(PersistentObject po);\n\n void add(PersistentObject po);\n\n void remove(String key);\n\n boolean isExpired(String key);\n\n void clear();\n}",
"public interface Cache {\r\n\r\n public Object get( Object key);\r\n public void put( Object key, Object value);\r\n}",
"public interface Cache {\n void put(String key, Object value);\n\n Object get(String key);\n}",
"public interface IBaseCache<T> {\n\n void setById(String id, T o);\n\n void setById(String id, T o, int timeout);\n\n void set(String key, T o);\n\n void set(String key, T o, int timeout);\n\n T getById(String id);\n\n T get(String key);\n\n void setList(List<T> list);\n\n void setList(List<T> list, int timeout);\n\n boolean hasList();\n\n List<T> getList();\n\n void setList(String key, List<T> list);\n\n void setList(String key, List<T> list, int timeout);\n\n boolean hasList(String key);\n\n List<T> getList(String key);\n\n boolean hasKeyById(String id);\n\n boolean hasKey(String key);\n\n void deleteKeyById(String id);\n\n void deleteKey(String key);\n\n void deleteList();\n\n void deleteList(String key);\n\n void deleteAllEntityKeys();\n\n\n}",
"public interface Cache<K, V> {\n\n /**\n * 通过键值获取获取缓存值\n *\n * @param k k\n * @return\n */\n V get(K k);\n\n /**\n * 通过键值刷新缓存值\n *\n * @param k k\n */\n void refresh(K k);\n}",
"@Override\n\t\t\t\tprotected void setCache(List<E> cache) {\n\t\t\t\t}",
"public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }",
"public interface Caching {\n\t\n\t/**\n\t * ititialize resources for a cache\n\t *\n\t */\n\tvoid init();\n\t\n\t/**\n\t * clear cache\n\t *\n\t */\n\tvoid clear();\n\n}",
"interface Cache {\n\n /** @return A cache entry for given path string or <code>null</code> (if file cannot be read or too large to cache).\n * This method increments CacheEntry reference counter, caller must call {@link #checkIn(CacheEntry)} to release returned entry (when not null). */\n CacheEntry checkOut(CacheEntryLoader cacheEntryLoader);\n\n /**\n * Method to release cache entry previously obtained from {@link #checkOut(CacheEntryLoader)} call.\n * This method decrements CacheEntry reference counter.\n */\n void checkIn(CacheEntry key);\n\n /** Invalidates cached entry for given path string (if it is cached) */\n void invalidate(String pathString);\n\n void rename(String fromPathString, String toPathString);\n\n// /** Preload given file path in cache (if cache has vacant spot). Preloading happens in background. Preloaded pages initially have zero reference counter. */\n// void preload (String pathString);\n\n /** Clears the cache of all entries (even if some entries are checked out) */\n void clear();\n\n /** Allocates entry of given size for writing.\n * It will not be visible to others until caller calls {@link #update(String, CacheEntry)}.*/\n CacheEntry alloc(long size);\n\n /** Registers recently writtien cache entry as available for reading */\n void update(String pathString, CacheEntry cacheEntry);\n}",
"@Override\r\n public void setCaching(int parseInt) {\n\r\n }",
"public interface ArticlesCache {\n}",
"StoreResponse set(CACHE_ELEMENT e);",
"StoreResponse add(CACHE_ELEMENT e);",
"DataElement getFromCache(String dataElementName);",
"public interface Cache<K, V> {\n\n public V get(K key);\n\n public void put(K key, V value);\n\n public void remove(K key);\n\n}",
"public interface TypedCache<T> extends WritableCache<T>, ObservableWriteOperation<T>, BaseCache {\n @Nullable\n T find(long id);\n\n @NonNull\n Observable<? extends T> observeById(long id);\n\n @NonNull\n Observable<? extends T> observeById(T element);\n}",
"interface ICacheUtil {\n void put(Object key, Object value, long expiredTime, TimeUnit unit);\n Object get(Object key);\n void remove(Object key);\n void clear();\n boolean isExists(Object key);\n}",
"Cache<String, YourBean> getMyCache() {\n\treturn myCache;\n }",
"public interface ImageCache {\n public Bitmap get(String url);\n public void put(String url,Bitmap bitmap);\n}",
"public interface Cache<K,E> {\n\tpublic E getCacheEntry(K id);\n\t\n\tpublic boolean addCacheEntry(K id, E entry);\n\t\n\tpublic void removeCacheEntry(K id);\n\t\n\tpublic Stream<E> getAllEntries();\n}",
"public interface ICacheManager {\n\tpublic Boolean init();\n public IBoardAgent getBoard(String stGameId);\n public void loadBoardFromFile(String stGameId, String stBoardName);\n public SortedMap<String, Pair<String, Integer>> getPossiblePlayerInEachBoard();\n}",
"public void setCached() {\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"@Override\n public ICacheElement<K, V> getCacheElement( final K name )\n {\n return this.getCacheControl().get( name );\n }",
"public interface ImageCache {\r\n\tpublic Bitmap getBitmap(String url);\r\n\r\n\tpublic void putBitmap(String url, Bitmap bitmap);\r\n\r\n\tpublic void clear();\r\n}",
"void cache(String key, T value) throws IOException;",
"public interface ICustomerCache {\n Object get(String key);\n\n Object set(String key, Object o);\n\n Object set(String key, int exp, Object o);\n\n OperationFuture<Boolean> delete(String key);\n\n void replace(String key, Object o);\n\n void destroy();\n}",
"public interface ILeveledCache<K, V> extends ICache<K, V>{\n void reCache() throws IOException, ClassNotFoundException;\n Map<K, V> add(K key, V object) throws IOException, ClassNotFoundException;\n List<K> sortedKeys();\n int maxLevel1size();\n Set<K> level1keys();\n}",
"StoreResponse replace(CACHE_ELEMENT e);",
"public CacheStrategy getCacheStrategy();",
"public interface TAFSCacheInterface\n{\n//\tabstract void ConnectCache() throws IOException;\n//\tabstract void DisconnectCache();\n//\tabstract byte[] GetFileFromCache(String inFileName);\n//\tabstract void PutFileInCache(String inFileName, byte[] inFileBytes);\n}",
"public interface PermissionService {\n\n @Caching()\n public SysPermission findByUrl(String url);\n\n}",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"public interface UserEntityCache {\n int getHitCount();\n int getMissCount();\n\n void put(long key, CacheElement<UserEntity> cacheElement);\n\n CacheElement<UserEntity> get(long key);\n}",
"@Test\n public void simpleAPIWithGenericsAndNoTypeEnforcement() {\n\n MutableConfiguration config = new MutableConfiguration<String, Integer>();\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n\n //Types are restricted\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n assertTrue(cache.remove(tonto.getName()));\n\n }",
"interface Cache<T extends Parcelable, K> {\n void put(final T t, final K k);\n\n T getKey(int pos);\n\n /**\n * Returns a random key from key-value pairs stored in the cache.\n * @return a random quote\n */\n T getRandomKey();\n}",
"public interface SquadAttentionLocalCache extends LocalCache {\n\n /**\n * 缓存内容排序\n * \n * @param category 缓存类型\n * @param orderByStr 排序变量\n * @param orderByType 排序方式\n * @param count 取多少条\n * @return\n */\n public List<AttentionCache> sort(LocalCacheEnum category, String orderByStr,\n CacheOrderByEnum orderByType, int count);\n\n}",
"protected final void addCache(Cache cache)\r\n/* 33: */ {\r\n/* 34:59 */ this.cacheMap.put(cache.getName(), cache);\r\n/* 35:60 */ this.cacheNames.add(cache.getName());\r\n/* 36: */ }",
"public interface CacheManager extends AutoCloseable {\n /**\n * @param conf the Alluxio configuration\n * @return an instance of {@link CacheManager}\n */\n static CacheManager create(AlluxioConfiguration conf) throws IOException {\n // TODO(feng): make cache manager type configurable when we introduce more implementations.\n return new NoExceptionCacheManager(LocalCacheManager.create(conf));\n }\n\n /**\n * Puts a page into the cache manager. This method is best effort. It is possible that this put\n * operation returns without page written.\n *\n * @param pageId page identifier\n * @param page page data\n * @return true if the put was successful, false otherwise\n */\n boolean put(PageId pageId, byte[] page);\n\n /**\n * Wraps the page in a channel or null if the queried page is not found in the cache or otherwise\n * unable to be read from the cache.\n *\n * @param pageId page identifier\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId);\n\n /**\n * Wraps a part of the page in a channel or null if the queried page is not found in the cache or\n * otherwise unable to be read from the cache.\n *\n * @param pageId page identifier\n * @param pageOffset offset into the page\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId, int pageOffset);\n\n /**\n * Deletes a page from the cache.\n *\n * @param pageId page identifier\n * @return true if the page is successfully deleted, false otherwise\n */\n boolean delete(PageId pageId);\n}",
"CloudCache getCache(String cacheName);",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public void setCache(final ICache < ICacheKey < String >, Object > theCache) {\r\n this.cache = theCache;\r\n }",
"@Override\n public boolean isCaching() {\n return false;\n }",
"@Override\n public CacheAPI getCacheAPI() {\n return null;\n }",
"public interface TaskCache {\n /**\n * Gets an {@link Object} which will emit a {@link TaskEntity}.\n *\n * @param userId The id used to get data.\n */\n List<TaskEntity> get(int userId);\n\n /**\n * Puts and element into the cache.\n *\n * @param userEntity The task data to save.\n */\n void put(TaskEntity userEntity);\n\n /**\n * Checks if an element (User) exists in the cache.\n *\n * @param userId The id used to get data.\n * @return true if the element is cached, otherwise false.\n */\n boolean isCached(int userId);\n\n /**\n * Checks if the cache is expired.\n * @param userId The id used to get data.\n * @return true, the cache is expired, otherwise false.\n */\n boolean isExpired(int userId);\n\n /**\n * Evict all elements of the cache.\n *\n * @param userId The id used to get data.\n */\n void evictAll(int userId);\n\n /**\n * Change task status\n *\n * @param idTask task to update.\n */\n void refresh(int idTask);\n}",
"PortalCacheModel getCacheModel();",
"public interface CacheIndex {\n \n /**\n * Puts index on indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void put(Object indexedKey, Object key);\n \n /**\n * Removes the index from indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void remove(Object indexedKey, Object key);\n \n /**\n * Equals to.\n *\n * @param expectedValue the expected value\n * @return the list\n */\n List<Object> equalsTo(Object expectedValue);\n \n /**\n * Less than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThan(Object value);\n \n /**\n * Less than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThanOrEqualsTo(Object value);\n \n /**\n * Greater than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThan(Object value);\n \n /**\n * Greater than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThanOrEqualsTo(Object value);\n \n /**\n * Between.\n *\n * @param lowerBound the lower bound\n * @param upperBound the upper bound\n * @return the list\n */\n List<Object> between(Object lowerBound, Object upperBound);\n \n}",
"private <K extends Resource> K addToCache(K res, String uri) {\n\t\tif (res == null)\n\t\t\tnegCache.put(uri, null);\n\t\treturn res;\n\t}",
"StoreResponse append(CACHE_ELEMENT element);",
"@Override\n\tpublic void setCaching(boolean caching) {\n\t\t\n\t}",
"public void cacheResult(VcmsArticleType vcmsArticleType);",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"public interface DicMapper {\n \n @InvalidateSingleCache(namespace = \"DicValues\")\n int deleteByPrimaryKey(@ParameterValueKeyProvider DicValues key) throws DataAccessException;\n\n @CachePut(value = \"DicValues\")\n int insertSelective(DicValues record) throws DataAccessException;\n\n @ReadThroughSingleCache(namespace =\"DicValues\", expiration = 30)\n DicValues selectByPrimaryKey(DicValues key) throws DataAccessException;\n\n @UpdateSingleCache(namespace = \"DicValues\", expiration = 30)\n int updateByPrimaryKeySelective(DicValues record) throws DataAccessException;\n\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAll(DicValues record) throws DataAccessException;\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAllByPage(Map<String, Object> map) throws DataAccessException;\n /**\n * \n * @param 张宇超\n * @return\n * @throws DataAccessException\n */\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAllByPageAndType(Map<String, Object> map) throws DataAccessException;\n \n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> searchAll(DicValues record) throws DataAccessException;\n\n \n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> searchAllByPage(Map<String, Object> map) throws DataAccessException;\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicTypes> selectAllDicTypes(Map<String, Object> map) throws DataAccessException;\n \n int selectCount(DicValues record) throws DataAccessException;\n \n DicTypes selectDicTypesByKey(String dicType);\n //批量插入\n int insertBatch(List<DicValues> list);\n\n}",
"public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }",
"public interface HomeCache {\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n}",
"public interface CacheInvalidationStrategyIF {\n\t\n}",
"private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }",
"@Test\n public void simpleAPINoGenericsAndNoTypeEnforcementStoreByValue() {\n\n MutableConfiguration config = new MutableConfiguration();\n Cache cache = cacheManager.createCache(cacheName, config);\n Identifier2 one = new Identifier2(\"1\");\n\n //can put different things in\n //But not non-serializable things\n //cache.put(one, \"something\");\n cache.put(1L, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n assertNotNull(cache.get(1L));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(1L));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"public ExprMatrix withCache();",
"protected abstract Collection<Cache> loadCaches();",
"public PojoCache getPojoCache();",
"public interface CacheProviders {\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getTopics(Observable<List<Topic>> topics, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserCreateTopics(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserFavorites(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<TopicDetail>> getTopicDetail(Observable<TopicDetail> topic, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<UserDetailInfo>> getUserInfo(Observable<UserDetailInfo> user, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<News>>> getNews(Observable<List<News>> news, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Notification>>> getNotifications (Observable<List<Notification>> notifications, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Site>>> getSite(Observable<List<Site>> sites, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<UserInfo>>> getUserFollowing(Observable<List<UserInfo>> users, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<com.example.bill.epsilon.bean.topic.Reply>>> getUserReplies(Observable<List<com.example.bill.epsilon.bean.topic.Reply>> replies, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<TopicReply>>> getReplies(Observable<List<TopicReply>> replies, DynamicKeyGroup idAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Node>>> readNodes(Observable<List<Node>> nodes, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<NewsNode>>> readNewsNodes(Observable<List<NewsNode>> nodes, EvictProvider evictProvider);\n}",
"public interface RedisCacheService {\n void put(Object key , Object value);\n Object get(Object key);\n}",
"public interface CacheConstants {\n\tpublic static final String LINE_SEPARATOR = System.getProperty(\"line.separator\");\n\tpublic final static String FIELD_SEPARATOR = \"@@\";\n\tpublic final static String SAVE = \"SAVE\";\n\tpublic final static String SAVE_OR_UPDATE = \"SAVE_OR_UPDATE\";\n\tpublic final static String UPDATE = \"UPDATE\";\n\tpublic final static String DELETE = \"DELETE\";\n\t\n\t/**\n\t * SiteGlobal cache is used for the whole site whose items are for separate purposes like:\n\t */\n\tpublic interface SiteGlobal {\n\t\tpublic final static String SITE_GLOBAL_CACHE = \"site.global.cache\";\n\t}\n\t\n\tpublic interface AcRoleDAO{\n\t\tpublic final static String FIND_PARENT_ROLES_CACHE = \"AcRoleDAO.findParentRoles.cache\";\n\t}\n\t\n\tpublic interface AcPermissionDAO{\n\t\tpublic final static String FIND_PERMISSIONS_FOR_ROLE_CACHE = \"AcPermissionDAO.findPermissionsForRole.cache\";\n\t}\n\t\n\tpublic interface MailUtil {\n\t\tpublic final static String GET_MAIL_SENDER_CACHE = \"MailUtil.getMailSender.cache\";\n\t}\n}",
"public void setCache(Cache cache) {\n this.cache = cache;\n }",
"public interface QueryCache {\n IQ get(InputQuery inputQuery);\n\n void put(InputQuery inputQuery, IQ executableQuery);\n\n void clear();\n}",
"public void cacheResult(DataEntry dataEntry);",
"StoreResponse prepend(CACHE_ELEMENT element);",
"public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }",
"@Override\n\tpublic boolean isCaching() {\n\t\treturn false;\n\t}",
"public Cache.Entry get(String param1) {\n }",
"private boolean updateCache(String type) {\n\t\treturn false;\n\t}",
"public interface DataCache {\n LiveData<List<News>> getNews();\n LiveData<NewsDetail> getNewsDetail(String id);\n void setNewsList(LiveData<List<News>> newsList);\n void setNewsDetail(String id, LiveData<NewsDetail> detail);\n }",
"public AbstractCache() {\n }",
"protected Cache cache(RequestContext ctx) {\n String serviceId = serviceId(ctx);\n if (serviceId != null) {\n return cacheManager.getCache(serviceId);\n }\n return null;\n }",
"@Test\n public void simpleAPINoGenericsAndNoTypeEnforcementStoreByReference() {\n\n MutableConfiguration config = new MutableConfiguration().setStoreByValue(false);\n Cache cache = cacheManager.createCache(cacheName, config);\n Identifier2 one = new Identifier2(\"1\");\n\n //can put different things in\n cache.put(one, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n Identifier2 one_ = new Identifier2(\"1\");\n Assert.assertEquals(one, one_);\n Assert.assertEquals(one.hashCode(), one_.hashCode());\n assertNotNull(cache.get(one_));\n assertNotNull(cache.get(one));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(one));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"public interface ImageCache {\n Drawable get(Uri uri);\n\n boolean hasEntry(Uri uri);\n\n void preload(Uri uri);\n\n void purge();\n\n void setImageResolver(NotificationInlineImageResolver notificationInlineImageResolver);\n }",
"protected void createLookupCache() {\n }",
"private static ICacheValet getCacheValetJavaConcurrentMapImpl() {\n\n\t\t// Obtenemos la única instancia de esta implementación.\n\t\tICacheValet result = ACacheValet.getInstance();\n\n\t\t// Si es nula, la creamos.\n\t\tif (result == null) {\n\n\t\t\tresult = new ConcurrentMapCacheValet();\n\t\t\tif (result != null) {\n\t\t\t\tACacheValet.setInstance(result);\n\t\t\t}\n\n\t\t}\n\n\t\t// La devolvemos.\n\t\treturn result;\n\n\t}",
"@Override\n public <T> void storeInItemCache(String key, CacheElement<T> cacheElement, int dependingPublicationId, int\n dependingItemId) {\n\n if (!isEnabled()) {\n return;\n }\n\n CacheDependency dependency = new CacheDependencyImpl(dependingPublicationId, dependingItemId);\n List<CacheDependency> dependencies = new ArrayList<>();\n dependencies.add(dependency);\n storeInItemCache(key, cacheElement, dependencies);\n\n }",
"public interface BitmapCache {\n void put(BitmapRequest bitmapRequest, Bitmap bitmap);\n\n Bitmap get(BitmapRequest bitmapRequest);\n\n boolean remove(BitmapRequest bitmapRequest);\n\n void clear();\n}",
"@Test\n public void genericsEnforcementAndStricterTypeEnforcementFromCaching() {\n\n //configure the cache\n MutableConfiguration config = new MutableConfiguration<>();\n config.setTypes(Identifier.class, Hound.class);\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n //Types are restricted and types are enforced\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n //can put in with generics but possibly not with configuration as not a hound\n try {\n cache.put(tonto.getName(), tonto);\n } catch (ClassCastException e) {\n //expected but not mandatory. The RI throws these.\n }\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n //not necessarily\n //assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n //not necessarily\n //assertTrue(cache.remove(tonto.getName()));\n }",
"@Test\n public void simpleAPITypeEnforcementObject() {\n\n\n //configure the cache\n MutableConfiguration<Object, Object> config = new MutableConfiguration<>();\n config.setTypes(Object.class, Object.class);\n\n //create the cache\n Cache<Object, Object> cache = cacheManager.createCache(\"simpleCache4\", config);\n\n //can put different things in\n cache.put(1, \"something\");\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n cache.put(bonzo.getName(), bonzo);\n cache.put(juno.getName(), juno);\n cache.put(talker.getName(), talker);\n try {\n cache.put(skinny.getName(), skinny);\n } catch(Exception e) {\n //not serializable expected\n }\n //can get them out\n assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n\n //can remove them\n assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n }",
"@Override\n\tprotected String getCacheName() {\n\t\treturn null;\n\t}",
"<W extends V> void addMeasurement(DataCache<K, W> cache, K key, W value);",
"protected Cache<Request, Result> getNetspeakCache() {\n return this.netspeakCache;\n }",
"public cacheEntry(int key, String value){\n int key;\n String value;\n cacheEntry(int key){\n this.key = key;\n this.value = value;\n }\n}",
"@Override\n\tpublic Cache getCacheInstance(CacheType cacheType) {\n\t\tCache cache = null;\n\t\tif (cacheType.equals(CacheType.ConcurrentCache)) {\n\t\t\tcache = cacheManager.getCache(\"concurrentBatchScheduleCache\");\n\t\t}\n\t\tif (cacheType.equals(CacheType.HistroicalCache)) {\n\t\t\tcache = cacheManager.getCache(\"concurrentBatchScheduleCache\");\n\t\t}\n\t\treturn cache;\n\t}",
"@Override\n\tpublic void onAdCached(AdType arg0) {\n\t\t\n\t}",
"public interface CacheContext {\n CacheService getCacheService();\n CacheObjectService getCacheObjectService();\n LockService getLockService();\n}",
"boolean isCacheable();",
"public interface ICacheType extends IType {\n\n String TYPE_LOG_SERVICE = \"log_service\";\n}",
"public interface CacheRepository {\n Object select(String key);\n void insert(String key, Object value);\n void delete(String key);\n boolean exists(String key);\n}",
"@Test\n public void testFindViaCache() {\n Integer hitRate1 = hitRate;\n Integer foundId = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate1, hitRate); // No change expected yet\n \n Integer hitRate2 = hitRate;\n Integer foundId2 = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate, new Integer(hitRate2+1)); // A cache hit is expected\n }"
]
| [
"0.729567",
"0.72888076",
"0.72579896",
"0.7218155",
"0.71844274",
"0.7108608",
"0.7100892",
"0.70734966",
"0.7040051",
"0.7004525",
"0.69038194",
"0.68824756",
"0.6844713",
"0.68130517",
"0.6795621",
"0.67618465",
"0.67556673",
"0.66927123",
"0.66580176",
"0.66450685",
"0.6620291",
"0.6617702",
"0.661416",
"0.6598175",
"0.65713733",
"0.6567995",
"0.6565763",
"0.65512806",
"0.65097606",
"0.6499686",
"0.6468488",
"0.64626044",
"0.64531773",
"0.64095783",
"0.64045215",
"0.63894105",
"0.637111",
"0.636461",
"0.63576305",
"0.6348411",
"0.6347008",
"0.6343767",
"0.63409346",
"0.63393193",
"0.63364756",
"0.63270426",
"0.6324881",
"0.63238907",
"0.6310245",
"0.63084126",
"0.62452686",
"0.624385",
"0.6243136",
"0.62381864",
"0.6230619",
"0.6226109",
"0.6217962",
"0.62172544",
"0.6197022",
"0.6195967",
"0.6190956",
"0.6179228",
"0.616939",
"0.6156952",
"0.6150507",
"0.61350536",
"0.6134678",
"0.6133887",
"0.61301506",
"0.6124298",
"0.61162966",
"0.6110428",
"0.6107525",
"0.6100095",
"0.6096234",
"0.60899657",
"0.60793126",
"0.6074274",
"0.60703474",
"0.6067347",
"0.606709",
"0.6064981",
"0.6051833",
"0.60495716",
"0.60475844",
"0.6040016",
"0.60316545",
"0.60195184",
"0.6013145",
"0.59943694",
"0.5990732",
"0.5989472",
"0.59871244",
"0.5979825",
"0.59696317",
"0.59616107",
"0.5961575",
"0.5960629",
"0.5959679",
"0.5956573"
]
| 0.7004788 | 9 |
gets a value by key returns null if key is expired | V get(K key); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public V getIfNotExpired(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.get(key);\n }\n\n if (null != cObj) {\n if (isExpired(cObj)) {\n synchronized(theLock) {\n currentCacheSize -= cObj.containmentCount;\n valueMap.remove(key);\n for (CacheListener<K> listener : listeners) {\n listener.expiredElement(key);\n }\n }\n return null;\n } else {\n return cObj.cachedObject;\n }\n } else {\n return null;\n }\n }",
"public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n return null;\n }\n }",
"public Value get(Key key);",
"@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"public Value get(Key key) ;",
"@Override\n\tpublic T get(S key) throws Exception {\n\t\treturn null;\n\t}",
"Object get(Object key) throws NullPointerException;",
"T get(@NonNull String key);",
"@Override\n public V get(K key) {\n return null;\n }",
"public Object get(Object key) {\n Entry entry = this.cache.get(key);\n\n if (entry == null)\n return null;\n\n // move the recently accessed Entry to the head of list\n moveToHead(entry);\n return entry.value;\n }",
"public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }",
"public V getIfPresent(Object key) {\n V result = null;\n MapSegment.Entry<K, V> entry = segment.getEntry(key);\n\n if (null != entry) {\n entry.setAccessTime(ticker.nextTick());\n result = entry.getValue();\n }\n return result;\n }",
"V get(final K key);",
"@SuppressWarnings(\"unchecked\")\n public T get(K key) {\n synchronized (cacheMap) {\n CacheObject c = (CacheObject) cacheMap.get(key);\n\n if (c == null) {\n return null;\n } else {\n c.lastAccessed = System.currentTimeMillis();\n return c.value;\n }\n }\n }",
"public Value get(Key key) {\r\n\t\t\tValue ret = null;\r\n\t\t\t\r\n\t\t\tdata.reset();\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tret = data.get().getValue();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\treturn ret;\r\n\t\t}",
"Object get(String key);",
"Object get(String key);",
"Optional<V> get(K key);",
"public V get(K key) throws InvalidKeyException;",
"public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public V get(K key)\n\t{\n\t\tif(queue.contains(key))\n\t\t{\n\t\t\tqueue.remove(key);\n\t\t\tqueue.add(0, key);\n\t\t\treturn map.get(key);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic V get(Object key) {\n\t\treturn null;\n\t}",
"LocalDateTime getExpiration(K key);",
"public T get(K key);",
"public V get(K key) {\n int index = findIndex(key);\n if (keys[index] == null)\n return null;\n else\n return values[index];\n }",
"public Object get(Object key) {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n touchEntry(entry);\n return entry.getValue();\n } else {\n return null;\n }\n }",
"@Override\n public V get(K key){\n CacheObject<K, V> cacheObject = this.cache.get(key);\n\n if (cacheObject != null){\n return cacheObject.getObject();\n }\n\n return null;\n }",
"T get(String key);",
"Object get(Object key);",
"V get(Object key);",
"@Override\n public T get(Object key) {\n return get(key, null);\n }",
"public E get(String key) {\r\n Integer index = keys.get(key);\r\n if (index == null || index >= items.size()) {\r\n return null;\r\n }\r\n return items.get(index);\r\n }",
"public V get(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\treturn e.value;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public V get(final K key) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n Entry<K, V> entry = entries[index];\n while (entry != null) {\n if (entry.hash == hash && key == entry.get()) {\n return entry.value;\n }\n entry = entry.nextEntry;\n }\n return null;\n }",
"public Object get(String key);",
"public V get(K key);",
"public V get(String key);",
"public Value get(Value key) {\n\t\treturn storage.get(key);\n\t}",
"protected abstract V get(K key);",
"@Override\n public synchronized Object get(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n strkey = this.keyMap.getProperty(strkey.toLowerCase());\n if (strkey == null)\n return null;\n }\n return super.get(strkey);\n }",
"public abstract V get(K key);",
"public abstract T get(String key);",
"public V get(Object key) {\r\n\t\tif (key == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex] == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex];\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\treturn currentElement.value;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\r\n\t\treturn null;\r\n\t}",
"@Override\n\t\t\tpublic String get(String key) {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n\tpublic Object get(String name, Serializable key) throws CacheException {\n\t\treturn null;\n\t}",
"protected abstract Object _get(String key);",
"public Object get(String key) {\n \t\treturn this.get(null, key);\n \t}",
"public V get(K key) {\n if (key == null) {\n MyEntry<K, V> entry = null;\n try {\n entry = bucket[0];\n if (entry != null) {\n return entry.getValue();\n }\n } catch (NullPointerException e) {\n }\n } else {\n // other keys\n MyEntry<K, V> entry = null;\n int location = hashFunction(key.hashCode());\n entry = bucket[location];\n if (entry != null && entry.getKey() == key) {\n return entry.getValue();\n }\n }\n return null;\n }",
"@Override\n public Object getValue(String key) {\n return null;\n }",
"public Value get(final Key key) {\n int r = rank(key);\n if (r < size && (keys[r].compareTo(key) == 0)) {\n return values[r];\n }\n return null;\n }",
"public V get(K key) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n V result = null;\n\n Node<Pair<K, V>> node = findItem(key);\n\n if (node != null) {\n result = node.getData().value;\n }\n\n return result;\n\n }",
"public V get(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.get(key);\n }\n\n return cObj == null ? null : cObj.cachedObject;\n }",
"public Object get(Object key) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key))\n\t\t\t\treturn p.value;\n\t\t}\n\t\t// if not found, return null\n\t\treturn null;\n\t}",
"public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}",
"public V get(String key) {\n int index = hashOf(key);\n if (index >= capacity) return null;\n return (V) values[index];\n }",
"Object getValueFromLocalCache(Object key);",
"private V get(K key) {\n\t\t\tif (keySet.contains(key)) {\n\t\t\t\treturn valueSet.get(keySet.indexOf(key));\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public V get(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\tfor(MyEntry i:table[bucket]) {\n\t if(i.key.equals(key)) {\n\t\treturn i.value;\n\t }\n\t}\n\treturn null;\n }",
"public int get(int curtTime, int key) {\n if (!cache.containsKey(key)) {\n return Integer.MAX_VALUE;\n }\n Element elem = cache.get(key);\n if (elem.expire >= curtTime || elem.expire == -1) {\n return elem.value;\n } else {\n return Integer.MAX_VALUE;\n }\n }",
"Optional<T> getItem(final long pKey);",
"public Value get(Key key)\t\t\t\t//Value passed with Key(Null if key is absent)\n\t{\n\t\tNode x=root;\n\t\twhile(x!=null)\n\t\t{\n\t\t\tint cmp=key.compareTo(x.key);\n\t\t\tif(cmp<0)\tx=x.left;\n\t\t\telse if(cmp>0)\tx=x.right;\n\t\t\telse if(cmp==0)\treturn x.val;\n\t\t}\n\t\treturn null;\n\t}",
"private <Key, Value> Value get(Node x, Key key) {\n return null;\n }",
"public Serializable get(String key) throws ValueRetrievalException\n {\n Request req = new Request(key, \"get\", id);\n\n Response resp = sender.sendMessage(req, TIMEOUT);\n\n if(!resp.responseCode() || resp.getItems() == null)\n {\n throw new ValueRetrievalException(resp.getResponseMessage());\n }\n\n return resp.getItems().get(0);\n }",
"public native V get(K key);",
"T get(String key) throws IOException;",
"@Override\n public V get(K key) {\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[Math.floorMod(key.hashCode(), entryArr.length)];\n return pointer.stream().filter(x->x.key.equals(key))\n .collect(Collectors.toList()).get(0).value;\n }\n return null;\n }",
"public V get(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n V value;\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((value = cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return value;\r\n }\r\n }\r\n // if we made it here and source!=null use the passthrough\r\n if (source!=null) {\r\n value = source.get(key);\r\n put((K)key, value);\r\n return value;\r\n }\r\n return null;\r\n }",
"final CacheData<K, V> getEntry(final Object key) {\r\n // validateKey the key in the buckets\r\n\r\n // synchronization is not a problem here\r\n // if someone changes or resets a key/value right before this\r\n // it will be properly handled, either it won't find a validateKey in the if or the\r\n // obj being returned will be null, that is fine and expected for a no-validateKey\r\n // then the client will just validateKey whatever data he was looking for in the buckets\r\n return getCacheData(getKeyPosition(key));\r\n }",
"public Object get(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null)\n\t\t\treturn null;\n\t\treturn value.value;\n\t}",
"public Object get(Object key) {\n byte[] byteKey = keySerde.toBytes(key);\n byte[] result = null;\n try {\n result = db.get(byteKey);\n } catch (RocksDBException e) {\n log.error(\"can not get the value for key: \" + key);\n }\n\n if (result == null) {\n log.info(key + \" does not exist in the rocksDb\");\n return null;\n } else {\n return valueSerde.fromBytes(result);\n }\n }",
"public V get(K key){\n\t\t\n\n\t\tNode n=searchkey(root, key);\n\n\t\t\n\t\tif(n!=null && n.value!=null){\n\t\t\treturn n.value;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}",
"private Value get(Node node, Key key ) {\n if ( node.key.equals( key ) ) {\n return (Value) node.value;\n }\n\n if ( key.compareTo( (Key)node.key ) < 0 ) {\n return node.left.value == null ? null : get(node.left,key);\n }\n else {\n return node.right.value == null ? null : get(node.right,key);\n }\n }",
"@Override\r\n\tpublic V getElement(K key) {\n\t\tif (hashMap.containsKey(key)){\r\n\t\t\tque.remove(key);\r\n\t\t\tque.add(key);\r\n\t\t\treturn hashMap.get(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public Object get(Object key){\n\t\tNode tempNode = _locate(key);\r\n\t\tif(tempNode != null){\r\n\t\t\treturn tempNode._value;\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic <T> T get(Object key, Class<T> type) {\n\t\treturn null;\r\n\t}",
"@Override\n\t@TimeComplexity(\"O(log n)\")\n\tpublic V get(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j == size() || key.compareTo(map.get(j).getKey()) != 0 ) { return null; }\n\t\treturn map.get(j).getValue();\n\t}",
"public V get(Object key) { return _map.get(key); }",
"public Value get(Key key) {\n if (key == null) {\n return null;\n }\n if(first.key.compareTo(key) == 0) {\n return update(first);\n }\n Node recentNode = first;\n while(recentNode != null) {\n if (recentNode.next.key.compareTo(key) == 0) {\n return update(recentNode);\n }\n recentNode = recentNode.next;\n }\n return null;\n }",
"public synchronized Object get (Object key, long timeout) {\n Object obj;\n long now = System.currentTimeMillis();\n long end = now + timeout;\n while ((obj = map.get (key)) == null &&\n (now = System.currentTimeMillis()) < end)\n {\n try {\n this.wait (end - now);\n } catch (InterruptedException e) { }\n }\n return obj;\n }",
"public synchronized Object get( Object key ) {\n\t\tObject intvalue = mapKeyPos.get(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\t//System.out.println(\"CountLimiteLRU: get(\"+key+\") = \"+values[pos]);\n\t\t\treturn values[pos];\n\t\t}\n\t\treturn null;\n\t}",
"public Optional<String> safeGet(String key) {\n\t\tInstant start = Instant.now();\n\t\tOptional<String> result;\n\t\ttry {\n\t\t\tresult = Optional.of(get(key));\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: an Optional.empty() will be returned\", key);\n\t\t\tresult = Optional.empty();\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to safeGet {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\n\t\treturn result;\n\t}",
"public V get(K key)\n throws Exception\n {\n AssociationList<K, V> bucket = this.get(this.find(key));\n if (bucket == null)\n {\n throw new Exception(\"Invalid key: \" + key);\n } // if (bucket == null)\n else\n // if (bucket != null)\n {\n return bucket.get(key);\n } // if (bucket != null)\n }",
"@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}",
"@Override\n\tpublic V getValue(K key) {\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(!isEmpty()){\n\t\t\twhile(currentNode.key != key){\n\t\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn (V)currentNode.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"V getValue(final E key) {\r\n for (int i=0;i<kcount;i++) {\r\n if (equal(key, (E)k[i])) return (V)v[i];\r\n }\r\n return null;\r\n }",
"public V get(K key) {\n V value = null;\n\n if (key != null) {\n int index = indexFor(key);\n if (container[index] != null) {\n value = (V) container[index].value;\n }\n }\n return value;\n }",
"void expiredElement(T key);",
"public Value get(Key key){\n\t\tNode x = root;\n\t\twhile(x!=null){\n\t\t\tif(key.compareTo(x.key)<0)\n\t\t\t\tx = x.left;\n\t\t\telse if(key.compareTo(x.key)>0)\n\t\t\t\tx = x.right;\n\t\t\telse\n\t\t\t\treturn x.value;\n\t\t}\n\t\treturn null;\n\t}",
"public V get(K key) {\n int index = getIndex(getHash(key));\n Entry<K, V> entry = (Entry<K, V>) table[index];\n\n if (entry == null) {\n return null;\n }\n\n if (!entry.hasNext()) {\n return entry.getValue();\n }\n\n while (entry.hasNext()) {\n if (entry.getKey().equals(key))\n return entry.getValue();\n entry = entry.getNext();\n }\n\n if (entry.getKey().equals(key))\n return entry.getValue();\n\n return null;\n }",
"public synchronized V get(K key) throws IOException {\n\t\t\treadIndex();\n\t\t\t\n\t\t\tPair<K, V> pair = seekInternal(key);\n\t\t\tif (pair != null) {\n\t\t\t\treturn pair.value();\n\t\t\t} else\n\t\t\t\treturn null;\n\t\t}",
"@Override\r\n\tpublic Object getObject(Object key) {\n\t\treturn null;\r\n\t}",
"protected final Object get(final String key) {\n try {\n if (!jo.isNull(key)) {\n return jo.get(key);\n }\n } catch (JSONException e) {\n }\n return null;\n }",
"public V getValue(K key);",
"public V getValue(K key);"
]
| [
"0.75728726",
"0.72401965",
"0.71675396",
"0.710947",
"0.7070574",
"0.7042873",
"0.70232534",
"0.69975317",
"0.69468457",
"0.693149",
"0.6931248",
"0.69289505",
"0.69257605",
"0.6902295",
"0.689382",
"0.688972",
"0.688972",
"0.687431",
"0.6867275",
"0.68652034",
"0.68463784",
"0.68376",
"0.6833244",
"0.6825083",
"0.68095857",
"0.6807492",
"0.6799228",
"0.6773833",
"0.6772277",
"0.67637324",
"0.67563534",
"0.6726857",
"0.6725292",
"0.6723437",
"0.6722719",
"0.67192084",
"0.67106956",
"0.66965085",
"0.6690928",
"0.66820455",
"0.665476",
"0.66256696",
"0.6623184",
"0.66195136",
"0.6613031",
"0.6606821",
"0.66042984",
"0.6600308",
"0.65987474",
"0.6589302",
"0.65852433",
"0.6585103",
"0.65708596",
"0.6563315",
"0.6559664",
"0.6546763",
"0.6529774",
"0.6515261",
"0.6511972",
"0.65102196",
"0.65094155",
"0.65059733",
"0.6497667",
"0.6495004",
"0.6492815",
"0.64925104",
"0.6488096",
"0.64845544",
"0.648302",
"0.6480789",
"0.64710134",
"0.64327353",
"0.642761",
"0.64263505",
"0.6423259",
"0.64218736",
"0.642034",
"0.6418368",
"0.64163285",
"0.6408703",
"0.6407006",
"0.64055455",
"0.63888216",
"0.63841635",
"0.6378494",
"0.63630646",
"0.63435715",
"0.63391423",
"0.633621",
"0.6317801",
"0.6317761",
"0.6313542",
"0.62975085",
"0.62975085"
]
| 0.68998075 | 19 |
puts into cache with given ttl | void put(K key, V value); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTtl(int ttl) {\n this.ttl = ttl;\n }",
"public void setTtl(Integer ttl) {\n this.ttl = ttl;\n }",
"public void set(int curtTime, int key, int value, int ttl) {\n int expire = ttl == 0 ? -1 : curtTime + ttl - 1;\n Element elem = new Element(value, expire);\n cache.put(key, elem);\n }",
"public void set(String key, Object value, int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n // jedis.set(key.getBytes(), HessianSerializer.serialize(value));\n jedis.set(key.getBytes(), toJsonByteArray(value));\n if (ttl > 0) {\n jedis.expire(key.getBytes(), ttl);\n }\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"V setValue(V value, long ttl, TimeUnit ttlUnit);",
"void put(K key, V value, long expireMs);",
"void cache(String key, T value) throws IOException;",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"@Test\n public void testPutOverrideTTL() throws Exception {\n long beforeCreated = System.currentTimeMillis();\n Thread.sleep(10);\n String originalString = \"The rain in Spain falls mainly on the plain\";\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(originalString.getBytes());\n\n assertEquals(404, HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\").getResponseCode());\n Header header = new Header(\"ehcacheTimeToLiveSeconds\", \"10\");\n int status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n HttpURLConnection urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", \"garbage\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", null);\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n //the header is case insensitive\n header = new Header(\"EhcachetImeToLiveSeconds\", \"1\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n Thread.sleep(5000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n\n }",
"@Test\n\tpublic void executeTTLScenario() throws Exception {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"ttlCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy.FIFO);\n\t\t// set time to live time to 3 seconds\n\t\tcacheConfiguration.setTimeToLiveSeconds(3);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache ttlCache = cacheManager.getCache(\"ttlCache\");\n\t\tttlCache.removeAll();\n\n\t\t// save a query result to the cache\n\t\tResultRetriever resultRetriever = new ResultRetriever(\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT,\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1);\n\t\tDirectedCacheQuery directedCacheQuery = new DirectedCacheQuery(\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1,\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT);\n\t\tElement firstElement = new Element(directedCacheQuery,\n\t\t\t\tresultRetriever.retrieve());\n\t\tttlCache.put(firstElement);\n\n\t\t// get result immediately after saving it\n\t\tassertNotNull(ttlCache.get(directedCacheQuery));\n\n\t\t// sleep 3.5 seconds\n\t\tThread.sleep(3500);\n\n\t\t// get the query result after waiting for TTL value\n\t\tassertNull(ttlCache.get(directedCacheQuery));\n\n\t\t// free the cache\n\t\tttlCache.dispose();\n\t\tCacheManager.create().shutdown();\n\n\t\tThread.sleep(1000);\n\t}",
"@Test\n public void testPutGet() {\n cache.put(\"A\", \"first\");\n cache.put(\"C\", \"second\");\n cache.put(\"C\", \"third\");\n \n assertEquals(\"first\", cache.get(\"A\"));\n assertEquals(\"third\", cache.get(\"C\"));\n }",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);",
"public void put(String key, Object value) {\n CacheObject cacheObject = new CacheObject(value, expirationTime);\n WeakReference<CacheObject> weakReference = new WeakReference<CacheObject>(cacheObject);\n cache.put(key, weakReference);\n }",
"void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);",
"public long ttl(String key) {\n \treturn stringRedisTemplate.getExpire(key);\n }",
"protected abstract void put(CacheKey cacheKey);",
"@SneakyThrows\n\t@Test\n\tpublic void testHsetTtl() {\n\t\tString value = JedisUtils.HASH.hget(\"testMap\", \"testField\");\n\t\tassertNull(value);\n\t}",
"protected abstract void _set(String key, Object obj, Date expires);",
"void put(K key, V value, long timeoutMs);",
"void put(K id, V cacheable);",
"public int getTtl() {\n return ttl;\n }",
"public Boolean sadd(final String key, int ttl, final String... members) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Boolean ret = jedis.sadd(key, members) == 1 ? true : false;\n if (ret && ttl > 0) {\n jedis.expire(key, ttl);\n }\n return ret;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"public void put(String key, Object value, int time) {\n customCache.put(key, new TimeExpiredObject(value, time));\n }",
"public long getTtl() {\n return ttl_;\n }",
"public <T1, T2> boolean putTTL(T1 key, T2 value, int ttl, String keySplTypeName, String valueSplTypeName) throws StoreFactoryException;",
"public Boolean hset(final String key, final String field, final String value, final int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Long reply = jedis.hset(key, field, value);\n if (ttl > 0) {\n jedis.expire(key, ttl);\n }\n return reply == 1;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n return null;\n }\n }",
"interface ICacheUtil {\n void put(Object key, Object value, long expiredTime, TimeUnit unit);\n Object get(Object key);\n void remove(Object key);\n void clear();\n boolean isExists(Object key);\n}",
"protected abstract boolean _setIfAbsent(String key, Object value, Date expires);",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"public Integer getTtl() {\n return ttl;\n }",
"void set(K key, V value, LocalDateTime expiresAt) throws CapacityExceededException;",
"@Test\n public void testCoh3710_get()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertNull(getNamedCache(getCacheName0()).get(Integer.valueOf(1)));\n }\n });\n }",
"public Boolean hset(final String key, final String field, final Object value, final int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n Long reply = jedis.hset(key.getBytes(), field.getBytes(), toJsonByteArray(value));\n if (ttl > 0) {\n jedis.expire(key, ttl);\n }\n return reply == 1;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"public String hget(final String key, final String field, int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n String res = jedis.hget(key, field);\n if (ttl > 0) {\n jedis.expire(key, ttl);\n }\n return res;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"public void setTTL(int t) {\n\t\tthis.ttl = t;\n\t}",
"public void cacheResult(DataEntry dataEntry);",
"@Nonnull\n\t\tpublic Builder setTtl(@Nonnull Time ttl) {\n\t\t\tthis.ttl = ttl;\n\t\t\treturn this;\n\t\t}",
"public void setTTL(int ttl) throws SipParseException{\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setTTL() \" + ttl );\n Via via=(Via)sipHeader;\n \n if ( ( TTL_MIN <= ttl ) && (ttl <= TTL_MAX) ) via.setTTL(ttl);\n else throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: ttl is not between TTL_MIN and TTL_MAX inclusive\"); \n }",
"public void put(String param1, Cache.Entry param2) {\n }",
"DNSRecord queryCache(DNSQuestion question) throws IOException {\n if (cache.containsKey(question)) {\n System.out.println(\"Answer found in cache!\");\n if (cache.get(question).timestampValid()) {\n System.out.println(\"TTL valid!\");\n return cache.get(question);\n }\n else {\n cache.remove(question);\n System.out.println(\"TTL not valid!\");\n }\n }\n return null;\n }",
"public interface Cache {\n void put(String key, Object value);\n\n Object get(String key);\n}",
"public long getTtl() {\n return ttl_;\n }",
"public interface Cache {\r\n\r\n public Object get( Object key);\r\n public void put( Object key, Object value);\r\n}",
"@Override\n\tpublic CacheData updateByTimestamp(String timestamp) {\n\t\treturn null;\n\t}",
"void insertFileCacheInfo(String filename){\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n Date curDate = cal.getTime();\n\n DateFormat sdf = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\");\n sdf.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n String cacheDate = sdf.format(curDate).toString();\n\n List<FileCache> fcl = fcds.getFileCache(filename);\n if(fcl != null) {\n if(fcl.size() != 0) {\n fcds.updateFileCache(filename, cacheDate);\n }else{\n fcds.createFileCache(filename, cacheDate);\n }\n }\n }",
"void update(String pathString, CacheEntry cacheEntry);",
"public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }",
"long getTTL();",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"public interface RedisCacheService {\n void put(Object key , Object value);\n Object get(Object key);\n}",
"@Override\n public <T> void storeInItemCache(String key, CacheElement<T> cacheElement) {\n\n if (!isEnabled()) {\n return;\n }\n\n if (!cacheExists()) {\n LOG.error(\"Cache configuration is invalid! NOT Caching. Check EH Cache configuration.\");\n return;\n }\n\n // detect undeclared nulls, complain, and set to null\n if (!cacheElement.isNull() && cacheElement.getPayload() == null) {\n Exception exToLogToHaveStacktraceWhoCausedIt = new Exception();\n LOG.error(\"Detected undeclared null payload on element with key \" + key + \" at insert time!\",\n exToLogToHaveStacktraceWhoCausedIt);\n cacheElement.setNull(true);\n }\n cacheElement.setExpired(false);\n storeElement(key, cacheElement);\n }",
"public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }",
"@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public interface ICache {\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object get(String key);\n\t\n\t\n\t\n\t/**\n\t * <p>\n\t * \n\t * @param key\n\t * @return old cache object \n\t */\n\tpublic Object put(String key,Object value);\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key quietly,\n\t * without update the statistic data\n\t * @param key\n\t * @return\n\t */\n\tpublic Object getQuiet(String key);\n\t\n\t\n\t/**\n\t * <p>\n\t * remove the cached object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object remove(String key);\n\t\n\t/**\n\t * <p>\n\t * free specied size mem\n\t * @param size unit in Byte\n\t * @return\n\t */\n\tpublic long free(long size);\n\t\n\t\n\t/**\n\t * <p>\n\t * flush to the underly resource\n\t */\n\tpublic void flush();\n\t\n}",
"public long ttl(String key, TimeUnit unit) {\n return redisTemplate.opsForValue().getOperations().getExpire(key, TimeUnit.MILLISECONDS);\n }",
"public interface EzyerCache {\n class PersistentObject {\n public final byte[] mData;\n public final String mKey;\n public final long mExpireTimeMillis;\n\n public PersistentObject(byte[] data, String key, long expireTimeMillis) {\n mData = data;\n mKey = key;\n mExpireTimeMillis = expireTimeMillis;\n }\n }\n\n class ValueObject {\n public final byte[] mData;\n public final String mKey;\n public final boolean mIsExpired;\n\n public ValueObject(byte[] data, String key, boolean isExpired) {\n mData = data;\n mKey = key;\n mIsExpired = isExpired;\n }\n }\n\n ValueObject get(String key);\n\n List<ValueObject> get(String key, int start, int end);\n\n void set(PersistentObject po);\n\n void add(PersistentObject po);\n\n void remove(String key);\n\n boolean isExpired(String key);\n\n void clear();\n}",
"public Builder setTtl(long value) {\n bitField0_ |= 0x00000008;\n ttl_ = value;\n onChanged();\n return this;\n }",
"long getExpires();",
"private void addProfileDataToCache(String userId, Document content) {\n\t\t// If caching is disabled , no action\n\t\tif (this.cacheSize == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Limit the cache size as per options\n\t\t// to check if cache is full , remove if full using LRU algorithm\n\t\t// for now remove first entry in the cache\n\t\tif (cache.size() == this.cacheSize) {\n\t\t\tIterator<String> iterator = cache.keySet().iterator();\n\t\t\tif (iterator.hasNext()) {\n\t\t\t\tString firstEntry = iterator.next();\n\t\t\t\tcache.remove(firstEntry);\n\t\t\t}\n\t\t}\n\t\tcache.put(userId, content);\n\t}",
"long getCacheHits();",
"@SuppressWarnings(\"unused\")\n void expire();",
"public <T> T hget(final String key, final String field, final Class<T> clazz, final int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n T res = fromJsonByteArray(jedis.hget(key.getBytes(), field.getBytes()), clazz);\n if (ttl > 0) {\n expire(key, ttl);\n }\n return res;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {\n this.cached = true;\n this.cacheSize = cacheSize;\n this.expiresIn = expiresIn;\n this.expiresUnit = unit;\n return this;\n }",
"public void setVideoMulticastTtl(int ttl);",
"void updateCacheEntry(CacheKey key, Query query, QueryResultPacket resultPacket) {\n long oldTimestamp;\n if (!activeCache) return;\n\n PacketWrapper wrapper = lookup(key, query);\n if (wrapper == null) return;\n\n // The timestamp is owned by the QueryResultPacket, this is why this\n // update method puts entries into the cache differently from elsewhere\n oldTimestamp = wrapper.getTimestamp();\n wrapper = (PacketWrapper) wrapper.clone();\n wrapper.addResultPacket(resultPacket);\n synchronized (packetCache) {\n packetCache.put(key, wrapper, oldTimestamp);\n }\n }",
"void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);",
"@Override\n\tpublic void addToCache(T obj) {\n\t\tcache.add(obj);\n\t}",
"private <K extends Resource> K addToCache(K res, String uri) {\n\t\tif (res == null)\n\t\t\tnegCache.put(uri, null);\n\t\treturn res;\n\t}",
"void cacheTrades(Collection<Trade> trades);",
"protected static void expireLocalEntry(Object oKey, NamedCache cache)\n {\n CacheService service = cache.getCacheService();\n BackingMapManagerContext ctx = service.getBackingMapManager().getContext();\n LocalCache mapBM = (LocalCache) ctx.getBackingMap(getCacheName0());\n LocalCache.Entry entry = (LocalCache.Entry)\n mapBM.getEntry(ctx.getKeyToInternalConverter().convert(oKey));\n\n entry.setExpiryMillis(Base.getSafeTimeMillis() - 5000);\n\n try\n {\n // Expiry has a quarter-second granularity; pause this thread to\n // ensure that we don't optimize over the expiry check. See\n // OldCache.m_lNextFlush.\n Blocking.sleep(0x200L);\n }\n catch (InterruptedException e)\n {\n }\n }",
"default void register(String name, long ttl, TimeUnit timeUnit) {\n }",
"protected static void putCache(String s, Destination d) {\n if (d == null)\n return;\n synchronized (_cache) {\n _cache.put(s, d);\n }\n }",
"void invalidateCache();",
"public void put(Object key, Object value) {\n Entry entry = this.cache.get(key);\n\n if (entry == null) {\n // cache is fully used\n if (currentSize >= cacheSize) {\n cache.remove(tail.key);\n removeLast();\n }\n else {\n currentSize++;\n }\n\n entry = new Entry();\n }\n\n // update the K/V in the Entry object\n entry.key = key;\n entry.value = value;\n cache.put(key, entry);\n\n // move to the head of list\n moveToHead(entry);\n }",
"public abstract CacheKey put(Vector primaryKey, Object object, Object writeLockValue, long readTime);",
"StoreResponse append(CACHE_ELEMENT element);",
"@Test\n public void testPutDel() {\n cache.put(\"A\", \"first\");\n cache.put(\"B\", \"second\");\n cache.put(\"C\", \"third\");\n cache.put(\"D\", \"fourth\");\n cache.put(\"E\", \"fifth\");\n cache.del(\"A\");\n cache.del(\"B\");\n cache.put(\"F\", \"sixth\");\n cache.put(\"G\", \"seventh\");\n\n assertEquals(\"third\", cache.get(\"C\"));\n assertEquals(\"fourth\", cache.get(\"D\"));\n assertEquals(\"fifth\", cache.get(\"E\"));\n assertEquals(\"sixth\", cache.get(\"F\"));\n assertEquals(\"seventh\", cache.get(\"G\"));\n assertNull(cache.get(\"A\"));\n }",
"public int getTTL() {\n\t\t\treturn ttl;\n\t\t}",
"public interface Cache<K, V> {\n\n public V get(K key);\n\n public void put(K key, V value);\n\n public void remove(K key);\n\n}",
"public void setAudioMulticastTtl(int ttl);",
"void addRecordToCache(DNSQuestion question, DNSRecord answer){\n cache.put(question, answer);\n System.out.println(\"Answer added to cache!\");\n }",
"@Test\n public void testCoh3710_containsKey()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsKey(Integer.valueOf(1)));\n }\n });\n }",
"@Test\n public void simpleAPIWithGenericsAndNoTypeEnforcement() {\n\n MutableConfiguration config = new MutableConfiguration<String, Integer>();\n Cache<Identifier, Dog> cache = cacheManager.createCache(cacheName, config);\n\n\n //Types are restricted\n //Cannot put in wrong types\n //cache.put(1, \"something\");\n\n //can put in\n cache.put(pistachio.getName(), pistachio);\n cache.put(tonto.getName(), tonto);\n\n //cannot get out wrong key types\n //assertNotNull(cache.get(1));\n assertNotNull(cache.get(pistachio.getName()));\n assertNotNull(cache.get(tonto.getName()));\n\n //cannot remove wrong key types\n //assertTrue(cache.remove(1));\n assertTrue(cache.remove(pistachio.getName()));\n assertTrue(cache.remove(tonto.getName()));\n\n }",
"ValueType put(long key, ValueType entry);",
"void updateCacheEntry(CacheKey key, Query query, DocsumPacketKey[] packetKeys, Packet[] packets) {\n if (!activeCache) return;\n\n PacketWrapper wrapper = lookup(key, query);\n if (wrapper== null) return;\n\n wrapper = (PacketWrapper) wrapper.clone();\n wrapper.addDocsums(packetKeys, packets);\n synchronized (packetCache) {\n packetCache.put(key, wrapper, wrapper.getTimestamp());\n }\n }",
"public void interestCacheInsert(InterestCacheEntry e)\n\t{\n\t\tif ( interestCache_purgeTimer == null ){\n\t\t\tinterestCache_purgeTimer = new DiffTimer(DiffTimer.TIMEOUT_INTEREST_CACHE_PURGE, null) ;\n\t\t\tif ( interestCache_purgeTimer != null ){\n\t\t\t\tinterestCache_purgeTimer.handle = setTimeout(interestCache_purgeTimer, INTEREST_CACHE_PURGE_INTERVAL) ;\n\t\t\t}\n\t\t}\n\t\tinterestCache.put(e.getInterest().getTaskId(),e) ;\n\t}",
"@Test\n public void testFindViaCache() {\n Integer hitRate1 = hitRate;\n Integer foundId = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate1, hitRate); // No change expected yet\n \n Integer hitRate2 = hitRate;\n Integer foundId2 = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate, new Integer(hitRate2+1)); // A cache hit is expected\n }",
"public int getTTL()\r\n {\r\n return TTL;\r\n }",
"public void cacheResult(Todo todo);",
"private void addProfileDataToCache(String userId, Document content) {\n \t\n \t\tlruCache.put(userId, content);\n \t}",
"public interface Cache<K, V> {\n\n /**\n * 通过键值获取获取缓存值\n *\n * @param k k\n * @return\n */\n V get(K k);\n\n /**\n * 通过键值刷新缓存值\n *\n * @param k k\n */\n void refresh(K k);\n}",
"public interface ExtendedMapEntry<K, V> extends Entry<K, V> {\n\n /** Set the value and set the TTL to a non-default value for the IMap */\n V setValue(V value, long ttl, TimeUnit ttlUnit);\n\n}",
"StoreResponse add(CACHE_ELEMENT e);",
"void evictFromCache( Long id );",
"@Scheduled(fixedDelay = 98)\n public void cacheStats() {\n SalesAmount salesAmount = statsService.retrieveNextSalesAmount();\n LocalDateTime now = LocalDateTime.now(clock).withNano(0);\n while (salesAmount != null && !salesAmount.getTime().isAfter(Instant.now(clock))) {\n /*\n Because sales requests are processed sequentially, this way we don't need to care about increasing the\n aggregated sales amount in parallel and use Atomic data structures.\n */\n SalesAmountPerSecond salesAmountPerSecond = statsService.getLastSalesAmountPerSecond();\n if (null != salesAmountPerSecond && salesAmountPerSecond.getTime().equals(now)) {\n salesAmountPerSecond.addSalesAmount(salesAmount.getAmount());\n } else {\n statsService.addSalesAmountPerSecond(new SalesAmountPerSecond(\n salesAmount.getAmount(),\n 1,\n now));\n }\n salesAmount = statsService.retrieveNextSalesAmount();\n }\n }",
"public void setTTL (Calendar newTTL) {\n this.TTL = newTTL;\n }",
"public interface Cache<K,E> {\n\tpublic E getCacheEntry(K id);\n\t\n\tpublic boolean addCacheEntry(K id, E entry);\n\t\n\tpublic void removeCacheEntry(K id);\n\t\n\tpublic Stream<E> getAllEntries();\n}",
"public interface ApiKeyThrottlingCacheService {\n\t \n\tlong incr(String key, int by, long defaul, int expiration) throws NullPointerException;\n\tboolean isCacheAvailable();\n\tString getCacheHost();\n\tvoid setCacheHost(String cacheHost);\n\tString getCachePort();\n\tvoid setCachePort(String cachePort);\n\t\n}"
]
| [
"0.6883964",
"0.68631685",
"0.67812485",
"0.65595955",
"0.6551519",
"0.6374698",
"0.6288519",
"0.6124312",
"0.6108323",
"0.60684925",
"0.59793246",
"0.5925304",
"0.58667314",
"0.58433264",
"0.58069694",
"0.5786685",
"0.57690454",
"0.57641035",
"0.57591486",
"0.5745684",
"0.57383853",
"0.57217675",
"0.5663747",
"0.5631792",
"0.56234795",
"0.5620869",
"0.5602613",
"0.55743617",
"0.5567583",
"0.55607915",
"0.5557539",
"0.55293906",
"0.55267996",
"0.55127203",
"0.5511853",
"0.55114627",
"0.55105734",
"0.55097306",
"0.54973227",
"0.5464549",
"0.5447272",
"0.5441668",
"0.54415387",
"0.5430102",
"0.54123455",
"0.5406165",
"0.53993964",
"0.53925335",
"0.536511",
"0.5359743",
"0.5353516",
"0.53472126",
"0.534594",
"0.533512",
"0.53342545",
"0.53141487",
"0.5301436",
"0.52958465",
"0.5286287",
"0.5285618",
"0.5277853",
"0.5271942",
"0.5268855",
"0.52631456",
"0.52492416",
"0.523815",
"0.5221046",
"0.5219247",
"0.5218724",
"0.5210064",
"0.52038896",
"0.5201328",
"0.5195992",
"0.51930934",
"0.51888674",
"0.51874",
"0.5186119",
"0.5183515",
"0.5177744",
"0.5170825",
"0.5166831",
"0.51617116",
"0.51609284",
"0.5154505",
"0.5152234",
"0.5150365",
"0.5148614",
"0.5138185",
"0.51295143",
"0.51293194",
"0.5123209",
"0.51210266",
"0.51146036",
"0.5111831",
"0.51108956",
"0.5106914",
"0.5103494",
"0.5102641",
"0.510027",
"0.50964415",
"0.50963795"
]
| 0.0 | -1 |
averages out the non expired values in cache. to be discussed in interview | double average(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getCacheMisses();",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"long getEvictions();",
"public Long get_cachetotnonstoreablemisses() throws Exception {\n\t\treturn this.cachetotnonstoreablemisses;\n\t}",
"long getCacheHits();",
"@Test\n public void testCoh3710_aggregateKeys()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n Object oResult = getNamedCache(getCacheName0()).aggregate(\n Collections.singleton(Integer.valueOf(1)), new Count());\n assertEquals(Integer.valueOf(0), oResult);\n }\n });\n }",
"@CacheEvict(value = \"exchangeRate\", allEntries = true)\r\n public void evictAllCacheValues() {\r\n }",
"public Long get_cachetotstoreablemisses() throws Exception {\n\t\treturn this.cachetotstoreablemisses;\n\t}",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"public Long get_cachestoreablemissesrate() throws Exception {\n\t\treturn this.cachestoreablemissesrate;\n\t}",
"private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }",
"public Long get_cachepercentstoreablemiss() throws Exception {\n\t\treturn this.cachepercentstoreablemiss;\n\t}",
"public void incrMetaCacheMiss() {\n metaCacheMisses.inc();\n }",
"long getExpires();",
"@Scheduled(fixedDelay = 98)\n public void cacheStats() {\n SalesAmount salesAmount = statsService.retrieveNextSalesAmount();\n LocalDateTime now = LocalDateTime.now(clock).withNano(0);\n while (salesAmount != null && !salesAmount.getTime().isAfter(Instant.now(clock))) {\n /*\n Because sales requests are processed sequentially, this way we don't need to care about increasing the\n aggregated sales amount in parallel and use Atomic data structures.\n */\n SalesAmountPerSecond salesAmountPerSecond = statsService.getLastSalesAmountPerSecond();\n if (null != salesAmountPerSecond && salesAmountPerSecond.getTime().equals(now)) {\n salesAmountPerSecond.addSalesAmount(salesAmount.getAmount());\n } else {\n statsService.addSalesAmountPerSecond(new SalesAmountPerSecond(\n salesAmount.getAmount(),\n 1,\n now));\n }\n salesAmount = statsService.retrieveNextSalesAmount();\n }\n }",
"public boolean hasExpired() {\n return (System.currentTimeMillis() - lastUpdate) > IMAGE_CACHE_EXPIRE;\n }",
"public Long get_cachetotnon304hits() throws Exception {\n\t\treturn this.cachetotnon304hits;\n\t}",
"@Test\n public void testCoh3710_aggregateFilter()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n Object oResult = getNamedCache(getCacheName0()).aggregate(\n AlwaysFilter.INSTANCE, new Count());\n assertEquals(Integer.valueOf(0), oResult);\n }\n });\n }",
"@Test\n public void testCoh3710()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run() { getNamedCache(getCacheName0()).clear(); }\n });\n }",
"@Test\n public void testCoh3710_get()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertNull(getNamedCache(getCacheName0()).get(Integer.valueOf(1)));\n }\n });\n }",
"private void invalidateCache() {\n\t}",
"List<CacheHealth> getCacheHealth();",
"public Long get_cachetotmisses() throws Exception {\n\t\treturn this.cachetotmisses;\n\t}",
"@CacheEvict(allEntries = true, cacheNames = { \"airly_now\", \"history\" })\n @Scheduled(fixedDelay = 30000)\n public void reportCacheEvict() {\n }",
"@CacheEvict(value = \"meals\", allEntries = true)\n @Override\n public void evictCache() {\n }",
"public int getMissCountExpired() {\n return missCountExpired;\n }",
"@Test\n public void testFindViaCache() {\n Integer hitRate1 = hitRate;\n Integer foundId = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate1, hitRate); // No change expected yet\n \n Integer hitRate2 = hitRate;\n Integer foundId2 = accessPointDimensionDao.foreignKeyValueFor(connection, AccessPointIdentifier.TEST);\n assertEquals(hitRate, new Integer(hitRate2+1)); // A cache hit is expected\n }",
"int getCachedCount();",
"@Override\n\tpublic void invalidateCache() {\n\t\t\n\t}",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"long getExpirations();",
"@Override\n @CacheEvict(value=AccountingPeriod.CACHE_NAME,allEntries=true)\n public void clearCache() {\n }",
"public Long get_cachetotparameterizednon304hits() throws Exception {\n\t\treturn this.cachetotparameterizednon304hits;\n\t}",
"public long getExpiredSessions();",
"@Test\n public void testLIFOStatsUpdation() {\n try {\n assertNotNull(cache);\n LocalRegion rgn = (LocalRegion) cache.getRegion(SEPARATOR + regionName);\n assertNotNull(rgn);\n\n // check for is LIFO Enable\n assertTrue(\"Eviction Algorithm is not LIFO\",\n (((EvictionAttributesImpl) rgn.getAttributes().getEvictionAttributes()).isLIFO()));\n\n // put four entries into the region\n for (int i = 0; i < 8; i++) {\n rgn.put((long) i, (long) i);\n }\n\n assertTrue(\"In Memory entry count not 5 \",\n new Long(5).equals(lifoStats.getCounter()));\n\n // varifies evicted entry values are null in memory\n assertTrue(\"In memory \", rgn.entries.getEntry(5L).isValueNull());\n assertTrue(\"In memory \", rgn.entries.getEntry(6L).isValueNull());\n assertTrue(\"In memory \", rgn.entries.getEntry(7L).isValueNull());\n\n // get an entry back\n Long value = (Long) rgn.get(4L);\n value = (Long) rgn.get(5L);\n value = (Long) rgn.get(6L);\n\n // check for entry value\n assertTrue(\"Value not matched \", value.equals(6L));\n assertNull(\"Entry value in VM is not null\", rgn.getValueInVM(7L));\n\n assertTrue(\"Entry count not 7 \", new Long(7).equals(lifoStats.getCounter()));\n // check for destory\n rgn.destroy(3L);\n assertTrue(\"Entry count not 6 \", new Long(6).equals(lifoStats.getCounter()));\n // check for invalidate\n rgn.invalidate(1L);\n assertTrue(\"Entry count not 5 \", new Long(5).equals(lifoStats.getCounter()));\n // check for remove\n rgn.put(8L, 8L);\n rgn.remove(2L);\n assertTrue(\"Entry count not 4 \", new Long(4).equals(lifoStats.getCounter()));\n } catch (Exception ex) {\n ex.printStackTrace();\n fail(\"Test failed\");\n }\n\n }",
"public Long get_cachetotflashcachemisses() throws Exception {\n\t\treturn this.cachetotflashcachemisses;\n\t}",
"public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }",
"public int size() {\n int size = 0;\n\n Collection<CacheableObject> values = new HashSet<CacheableObject>();\n synchronized(theLock) {\n values.addAll(valueMap.values());\n }\n\n for (CacheableObject cObj : values) {\n if (! this.isExpired(cObj)) {\n size++;\n }\n }\n\n return size;\n }",
"@Test\n public void testCoh3710_size()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(0, getNamedCache(getCacheName0()).size());\n }\n });\n }",
"public Long get_cachecurmisses() throws Exception {\n\t\treturn this.cachecurmisses;\n\t}",
"@Test\n public void testCoh3710_containsValue()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsValue(Integer.valueOf(1)));\n }\n });\n }",
"@Test\n public void testEntryEvictionCount() {\n try {\n assertNotNull(cache);\n Region rgn = cache.getRegion(SEPARATOR + regionName);\n assertNotNull(rgn);\n\n assertTrue(\"Entry count not 0 \", new Long(0).equals(lifoStats.getCounter()));\n // put four entries into the region\n for (int i = 0; i < 8; i++) {\n rgn.put((long) i, (long) i);\n }\n\n assertTrue(\"1)Total eviction count is not correct \",\n new Long(3).equals(lifoStats.getEvictions()));\n rgn.put(8L, 8L);\n rgn.get(5L);\n assertTrue(\"2)Total eviction count is not correct \",\n new Long(4).equals(lifoStats.getEvictions()));\n } catch (Exception ex) {\n ex.printStackTrace();\n fail(\"Test failed\");\n }\n }",
"private void computeLogGammaRatioCache() {\n\t\tif (logGammaRatioCache == null) {\n\t\t\tlogGammaRatioCache = new ArrayList<>();\n\t\t}\n\t\tif (0 < logGammaRatioCache.size()) {\n\t\t\tlogGammaRatioCache.set(0, 0.0f);\n\t\t} else {\n\t\t\tlogGammaRatioCache.add(0.0f);// 0 case\n\t\t}\n\t\tindexLastValidLogGammaRatio = 0;\n\t\textendLogGammaRatioCache(10);\n\t}",
"public Long get_cacherecentpercentstoreablemiss() throws Exception {\n\t\treturn this.cacherecentpercentstoreablemiss;\n\t}",
"public Map<K,V> getMap() {\n Map<K,V> results = new HashMap<K,V>(valueMap.size());\n\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (! isExpired(entry.getValue())) {\n results.put(entry.getKey(), entry.getValue().cachedObject);\n }\n }\n }\n\n return results;\n }",
"@Test\n public void testCoh3710_entrySetFilter()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet(AlwaysFilter.INSTANCE).iterator();\n validateIndex(cache);\n\n assertFalse(iter.hasNext());\n }\n });\n }",
"void invalidateCache();",
"public boolean isExpired(){\r\n float empty = 0.0f;\r\n return empty == getAmount();\r\n \r\n }",
"public void evictAll() {\n cacheManager.getCache(DomainValueRepository.DomainValueCache.DOMAIN_VALUE_BY_DOMAIN_ID).clear();\n }",
"BigDecimal getCacheSpaceAvailable();",
"public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}",
"protected Duration getCacheDuration() {\n return Duration.ZERO;\n }",
"public Long get_cacheparameterizednon304hitsrate() throws Exception {\n\t\treturn this.cacheparameterizednon304hitsrate;\n\t}",
"public int getSessionExpireRate();",
"public Long get_cachetotpethits() throws Exception {\n\t\treturn this.cachetotpethits;\n\t}",
"io.dstore.values.IntegerValue getKeepPropertiesHistoryInHours();",
"@Test\n public void testCoh3710_containsKey()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsKey(Integer.valueOf(1)));\n }\n });\n }",
"void resetCacheCounters();",
"public Long get_cachetotrevalidationmiss() throws Exception {\n\t\treturn this.cachetotrevalidationmiss;\n\t}",
"boolean hasExpires();",
"public void findCacheHitMissRates(String fileName) throws IOException {\n\t\tthis.fileName = fileName;\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\tString line;\n\t\toffsetBits = (int) (Math.log(blockSize)/Math.log(2));\n\t\tindexBits = (int) (Math.log(numSets)/Math.log(2));\n\t\ttagBits = ADDRESS_BITS - offsetBits - indexBits;\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tnumAccesses++;\n\t\t\tString[] tokens = line.split(\" \");\n\t\t\tString address = tokens[2];\n\t\t\t\t\t\n\t\t\t//address given is 44 bits so take 32 bits by truncating 12 MSB and add offset to the address. \n\t\t\t\n\t\t\tBigInteger addr = new BigInteger(address, 16);// BigInteger read address in hex format and converts it to an integer into BigInteger object.\n\t\t\taddress= addr.toString(2); // converted to binary\n\t\t\t\n\t\t\taddress = (address.length() == ADDRESS_BITS ? address : getValidAddress(address)); //truncated --32 \n\t\t\t\n\t\t\taddr=new BigInteger(address, 2); \n\t\t\t\n\t\t\t\n\t\t\tBigInteger offset = new BigInteger(Integer.toString(Integer.parseInt(tokens[1])));\n\t\t\taddr = addr.add(offset);\n\t\t\t\n\t\t\taddress = addr.toString(2);// BigIntger's toString(2) is used to return the binary string \n\t\t\t// representation of it.\n\t\t\t\n\t\t\taddress = (address.length() == ADDRESS_BITS ? address : getValidAddress(address));\n\t\t\t\n\t\t\t// Calculate offset, index and tag bits.\n\t\t\n\t\t\n\t\t\tString tag = address.substring(0, tagBits);\n\t\t\tString index = address.substring(tagBits, indexBits + tagBits);\n\t\t\tint setNum;\n\t\t\tif(index.isEmpty()) setNum = 0; \n\t\t\telse { \n\t\t\t\tsetNum = Integer.parseInt(index, 2);\n\t\t\t\t//System.out.println(\"setnum in else\"+(setNum%numSets));\n\t\t\t}\n\t\t\tcheckTagInSet(tag, setNum, (vCache != null));\n\t\t}\n\t\thitRate = (double) numHits / numAccesses;\n\t\t//missRate = (double) numMiss / numAccesses;\n\t\tmissRate = 1 - hitRate;\n\t\treader.close();\n\t}",
"public Long get_cachetotinvalidationrequests() throws Exception {\n\t\treturn this.cachetotinvalidationrequests;\n\t}",
"public V getIfNotExpired(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.get(key);\n }\n\n if (null != cObj) {\n if (isExpired(cObj)) {\n synchronized(theLock) {\n currentCacheSize -= cObj.containmentCount;\n valueMap.remove(key);\n for (CacheListener<K> listener : listeners) {\n listener.expiredElement(key);\n }\n }\n return null;\n } else {\n return cObj.cachedObject;\n }\n } else {\n return null;\n }\n }",
"public int getSessionAverageAliveTime();",
"public Long get_cachemissesrate() throws Exception {\n\t\treturn this.cachemissesrate;\n\t}",
"int getCacheConcurrency();",
"private void evictCache(ExtUser entity) {\n\t}",
"public Long get_cachetotnonparameterizedinvalidationrequests() throws Exception {\n\t\treturn this.cachetotnonparameterizedinvalidationrequests;\n\t}",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"@Override\n public boolean isCaching() {\n return false;\n }",
"@Test\n public void testCoh3710_isEmpty()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertTrue(getNamedCache(getCacheName0()).isEmpty());\n }\n });\n }",
"@Override\n\tpublic int removeAllCacheData()\n\t{\n\t\treturn 0;\n\t}",
"long getExpiration();",
"@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"@Test\n public void testCoh3710_getAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(NullImplementation.getMap(),\n getNamedCache(getCacheName0()).getAll(\n Collections.singleton(Integer.valueOf(1))));\n }\n });\n }",
"boolean expired();",
"boolean hasExpired();",
"double agression();",
"public Long get_cachetothits() throws Exception {\n\t\treturn this.cachetothits;\n\t}",
"public int getNumCacheMiss() {\n return cacheHandler.getCountCacheMiss();\n }",
"public synchronized void evict()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n entry = entry.getNext();\n }\n }\n\n // schedule next flush\n scheduleFlush();\n }",
"@Override\n public synchronized Enumeration keys() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keys();\n }",
"public Long get_cachenonstoreablemissesrate() throws Exception {\n\t\treturn this.cachenonstoreablemissesrate;\n\t}",
"@Test\n public void numberOfIndexValuesStatIsUpdatedWhenEntryInvalidated() throws Exception {\n IndexStatistics stats = index.getStatistics();\n region.invalidate(\"3\");\n assertEquals(3, stats.getNumberOfValues());\n SelectResults results = region.query(\"status = 'active'\");\n assertEquals(2, results.size());\n }",
"@Override\n public void forEachRemaining(Consumer<? super InternalCacheEntry<K, V>> action) {\n long now = timeService.wallClockTime();\n\n while (spliterator.tryAdvance(consumer)) {\n InternalCacheEntry<K, V> currentEntry = current;\n if (currentEntry.canExpire() && currentEntry.isExpired(now) &&\n expirationManager.entryExpiredInMemoryFromIteration(currentEntry, now).join() == Boolean.TRUE) {\n continue;\n }\n action.accept(currentEntry);\n }\n }",
"public interface EzyerCache {\n class PersistentObject {\n public final byte[] mData;\n public final String mKey;\n public final long mExpireTimeMillis;\n\n public PersistentObject(byte[] data, String key, long expireTimeMillis) {\n mData = data;\n mKey = key;\n mExpireTimeMillis = expireTimeMillis;\n }\n }\n\n class ValueObject {\n public final byte[] mData;\n public final String mKey;\n public final boolean mIsExpired;\n\n public ValueObject(byte[] data, String key, boolean isExpired) {\n mData = data;\n mKey = key;\n mIsExpired = isExpired;\n }\n }\n\n ValueObject get(String key);\n\n List<ValueObject> get(String key, int start, int end);\n\n void set(PersistentObject po);\n\n void add(PersistentObject po);\n\n void remove(String key);\n\n boolean isExpired(String key);\n\n void clear();\n}",
"public boolean checkNoCache() {\n\treturn getBoolean(ATTR_NOCACHE, false);\n }",
"public Long get_cachetot304hits() throws Exception {\n\t\treturn this.cachetot304hits;\n\t}",
"public Object[] toArray(Object ao[])\n {\n // build list of non-expired values\n Object[] aoAll;\n int cAll = 0;\n\n // synchronizing prevents add/remove, keeping size() constant\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n // create the array to store the map values\n int c = map.size();\n aoAll = new Object[c];\n if (c > 0)\n {\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = map.m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n else\n {\n aoAll[cAll++] = entry.getValue();\n }\n entry = entry.getNext();\n }\n }\n }\n }\n\n // if no entries had expired, just return the \"work\" array\n if (ao == null && cAll == aoAll.length)\n {\n return aoAll;\n }\n\n // allocate the necessary array (or stick the null in at the\n // right place) per the Map spec\n if (ao == null)\n {\n ao = new Object[cAll];\n }\n else if (ao.length < cAll)\n {\n ao = (Object[]) Array.newInstance(ao.getClass().getComponentType(), cAll);\n }\n else if (ao.length > cAll)\n {\n ao[cAll] = null;\n }\n\n // copy the data into the array to return and return it\n if (cAll > 0)\n {\n System.arraycopy(aoAll, 0, ao, 0, cAll);\n }\n return ao;\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"protected void computeEntryRemoved(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"@java.lang.Override\n public long getExpires() {\n return expires_;\n }",
"protected void invalidateCache() {\r\n\tcurrentFilesFresh = false;\r\n }",
"@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }",
"public interface EvictionPolicy\n {\n /**\n * This method is called by the cache to indicate that an entry has\n * been touched.\n *\n * @param entry the Cache Entry that has been touched\n */\n public void entryTouched(OldOldCache.Entry entry);\n\n /**\n * This method is called by the cache when the cache requires the\n * eviction policy to evict entries.\n *\n * @param cMaximum the maximum number of units that should remain\n * in the cache when the eviction is complete\n */\n public void requestEviction(int cMaximum);\n }",
"@Override\n\tpublic long getCacheSize() {\n\t\treturn 0;\n\t}",
"public Long get_cachetotflashcachehits() throws Exception {\n\t\treturn this.cachetotflashcachehits;\n\t}",
"boolean isExpired();",
"@Ignore(\"Google's LRU map max size is not predictable\")\n\t@Override\n\tpublic void evictionTest() throws CacheRegionNotSpecifiedException, CacheValueLoadException\n\t{\n\t}",
"public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }"
]
| [
"0.679565",
"0.66160715",
"0.6250586",
"0.62226605",
"0.6208703",
"0.6107425",
"0.6105437",
"0.6046858",
"0.6007988",
"0.59088737",
"0.5837085",
"0.58163834",
"0.5774259",
"0.5764402",
"0.573649",
"0.5686305",
"0.5676865",
"0.5670993",
"0.56555986",
"0.5645159",
"0.56408304",
"0.56151193",
"0.5605397",
"0.5599681",
"0.5598665",
"0.5596427",
"0.55858594",
"0.5570953",
"0.55443513",
"0.5543764",
"0.553567",
"0.5523036",
"0.5520359",
"0.55185837",
"0.5517486",
"0.54856676",
"0.54799116",
"0.5468796",
"0.5457818",
"0.5453099",
"0.5450113",
"0.54455996",
"0.5436038",
"0.5414137",
"0.5411885",
"0.5407076",
"0.5400248",
"0.53911906",
"0.5378015",
"0.5374298",
"0.5368297",
"0.5355722",
"0.5339872",
"0.5335555",
"0.5333202",
"0.53275335",
"0.52990043",
"0.52954465",
"0.5295007",
"0.52862036",
"0.5281846",
"0.52818424",
"0.5279263",
"0.5276777",
"0.5272828",
"0.5264243",
"0.52602845",
"0.52502656",
"0.5248983",
"0.5238102",
"0.52376133",
"0.5232781",
"0.5229828",
"0.5228497",
"0.52251613",
"0.5222113",
"0.5217855",
"0.5208259",
"0.5193452",
"0.5176687",
"0.51729465",
"0.51696587",
"0.5166779",
"0.5160517",
"0.5157851",
"0.51520854",
"0.51356244",
"0.5135368",
"0.51308334",
"0.51222706",
"0.5120513",
"0.5115138",
"0.5112515",
"0.51074743",
"0.51038414",
"0.5098564",
"0.5097018",
"0.509609",
"0.5092212",
"0.5086257",
"0.50759244"
]
| 0.0 | -1 |
/ enable only buttons existing in eventButtons for a transition TODO: implement checking the cast from List to List | private void enableButtonsForTransitionsOf(TransitionTarget pState) {
for (Transition aTransition : (List<Transition>) pState.getTransitionsList()) {
JButton buttonForTransitionEvent = eventButtons.get(aTransition.getEvent());
if (buttonForTransitionEvent != null) buttonForTransitionEvent.setEnabled(true);
/* test needed since a transition without an event has no associated button */
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkButton(ActionEvent e) {\n List<PuzzleButton> selectedButtons = buttons.stream()\n .filter(PuzzleButton::isSelectedButton)\n .collect(Collectors.toList());\n PuzzleButton currentButton = (PuzzleButton) e.getSource();// getting current button\n currentButton.setSelectedButton(true);\n int currentButtonIndex = buttons.indexOf(currentButton);\n //if no button are selected, do not update collection of PuzzleButton\n if (selectedButtons.size() == 1) {\n int lastClickedButtonIndex = 0;\n\n for (PuzzleButton button : buttons) {\n if (button.isSelectedButton() && !button.equals(currentButton)) {\n lastClickedButtonIndex = buttons.indexOf(button);\n }\n }\n Collections.swap(buttons, lastClickedButtonIndex, currentButtonIndex);\n updateButtons();\n }\n }",
"private void updateButtons() {\n\t\tif(buttonCount>1){\n\t\t\tremoveTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\tremoveTableButton.setEnabled(false);\n\t\t}\n\t\tif(buttonCount<tablesX.length){\n\t\t\taddTableButton.setEnabled(true);\n\t\t}\n\t\telse{\n\t\t\taddTableButton.setEnabled(false);\n\t\t}\n\t}",
"public void enableButtons() {\n //a loop to go through all buttons\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n Inputbuttons[i].setEnabled(true);\n }\n }",
"private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }",
"protected void enableButtons() {\n if (mPrevious_question.isPressed() || mNext_question.isPressed()) {\n mFalseButton.setEnabled(true);\n mTrueButton.setEnabled(true);\n }\n }",
"private void toggleButtons(boolean enableFlag)\r\n {\r\n for (JButton btn : btnList)\r\n {\r\n btn.setEnabled(enableFlag);\r\n }\r\n }",
"protected void updateButtonStates()\n\t{\n\t\tboolean isLastStep = isLastStep(currentStep);\n\t\tboolean isFirstStep = isFirstStep(currentStep);\n\t\t// Check whether current step data is valid or not\n\t\tboolean isValid = currentStep.onAdvance();\n\t\tthis.getCancelButton().setVisible(!isLastStep);\n\t\tthis.getCancelButton().setEnabled(!isLastStep);\n\t\t\n\t\tthis.getBackButton().setVisible(!isLastStep);\n\t\tthis.getBackButton().setEnabled(!isFirstStep && !isLastStep);\n\n\t\tthis.getNextButton().setVisible(!isLastStep);\n\t\tthis.getNextButton().setEnabled(!isLastStep && isValid);\n\n\t\tthis.getFinishButton().setEnabled(isLastStep);\n\t\tthis.getFinishButton().setVisible(isLastStep);\n\t}",
"protected void UpdateButtons()\n {\n btnIn.setEnabled(usr.getPostType() == Util.ATTENDANCE_DAY_OUT);\n btnOut.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n btnScan.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n\n }",
"private void disableButtons()\r\n {\r\n }",
"public void updateButtons(){\n\t\tif (Player.getPlayer(this).questManager.atMaxNumQuests()) {\n\t\t\tcreateQuest.setEnabled(false);\n\t\t} else {\n\t\t\tcreateQuest.setEnabled(true);\n\t\t}\n\t\tif (selectedQuest != null){\n\t\t\tdeleteQuest.setEnabled(true);\n\t\t\tcompleteQuest.setEnabled(true);\n\t\t} else {\n\t\t\tdeleteQuest.setEnabled(false);\n\t\t\tcompleteQuest.setEnabled(false);\n\t\t}\n\t}",
"public static void enableButtons(ArrayList<JButton> gameButton){\n for(int i=0; i<gameButton.size(); ++i){\n gameButton.get(i).setEnabled(true);\n }\n }",
"public void enableAllButtons(){\n\t\tbtnConfirmOrNext.setEnabled(true);\n\t\tbtnStop.setEnabled(true);\n\t\tbtnListenAgain.setEnabled(true);\t\t\n\t}",
"public void VerifyButtons(){\n if (currentTurn.getSiguiente() == null){\n next_turn.setEnabled(false);\n } else{\n next_turn.setEnabled(true);\n }\n if (currentTurn.getAnterior() == null){\n prev_turn.setEnabled(false);\n } else{\n prev_turn.setEnabled(true);\n }\n if (current.getSiguiente() == null){\n next_game.setEnabled(false);\n } else{\n next_game.setEnabled(true);\n }\n if (current.getAnterior() == null){\n prev_game.setEnabled(false);\n } else{\n prev_game.setEnabled(true);\n }\n }",
"List<ButtonSliderType> getBtnSwitches();",
"protected void updateButtons() {\n int currentIndex = tabbedPane.getSelectedIndex();\n if( currentIndex == 0) {\n backButton.setEnabled(false);\n forwardButton.setText(\"weiter\");\n }\n if(currentIndex > 0) {\n backButton.setEnabled(true);\n forwardButton.setText(\"weiter\");\n }\n \n if(currentIndex == 6) {\n forwardButton.setText(\"würfeln\");\n }\n \n }",
"private boolean hasButtonsEnabled(List<Button> buttonList) {\n\n for (Button button : buttonList\n ) {\n if (button.isEnabled()) {\n return true;\n }\n }\n return false;\n }",
"private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }",
"private void updateButtonsState() {\r\n ISelection sel = mTableViewerPackages.getSelection();\r\n boolean hasSelection = sel != null && !sel.isEmpty();\r\n\r\n mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);\r\n mDeleteButton.setEnabled(hasSelection);\r\n mRefreshButton.setEnabled(true);\r\n }",
"public void disableButtons() {\n //a loop to go through all buttons\n for (int i = 0; i < currentBoard.getSizeX(); i++) {\n Inputbuttons[i].setEnabled(false);\n }\n }",
"public void removeButtons(){\n if(buttons!= null) {\n screenCoords = new Vector2(buttons.getFurniture().getX(), buttons.getFurniture().getY());\n screenCoords = objectStage.toScreenCoordinates(screenCoords, objectStage.getBatch().getTransformMatrix());\n\n touch.set(screenCoords.x, screenCoords.y, 0);\n game.getOfficeState().getCam().unproject(touch);\n touch.mul(game.getOfficeState().getInvIsotransform());\n\n int indexX;\n int indexY;\n\n if (touch.y < 0)\n indexY = 0;\n else\n indexY = (int) touch.y + 1;\n\n indexX = (int) touch.x;\n\n if(!buttons.getFurniture().getBought()) {\n buttons.removeButtons();\n buttons.getFurniture().remove();\n setIsMoving(false);\n } else if (buttons.getFurniture().getBought() && !tileMap.getTiles()[indexX][indexY].getIsFull()\n && buttons.getFurniture().getIsMoving()) {\n buttons.removeButtons();\n tileMap.getTiles()[indexX][indexY].setIsFull(true);\n setIsMoving(false);\n buttons.getFurniture().setIsMoving(false);\n buttons.getFurniture().setTile(tileMap.getTiles()[indexX][indexY]);\n } else if (buttons.getFurniture().getBought() && !buttons.getFurniture().getIsMoving()) {\n buttons.removeButtons();\n setIsMoving(false);\n }\n }\n }",
"private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}",
"public JButton getEvenList(){\n\n\t\treturn btnEventlist;\n\t}",
"private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}",
"public void buttonShowAll(ActionEvent actionEvent) {\n }",
"public void able()\n {\n // Enable all the buttons one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n // If the column is full, disable the corresponding button\n if (chessBoard[0][col] != 0)\n {\n drop[col].setEnabled(false);\n }\n // Else enable the button\n else\n {\n drop[col].setEnabled(true);\n }\n }\n }",
"public abstract List<GuiButton> getButtonList();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddBtn.setEnabled(true);\n\t\t\t}",
"private void buttonEnable(){\n\t\t\taddC1.setEnabled(true);\n\t\t\taddC2.setEnabled(true);\n\t\t\taddC3.setEnabled(true);\n\t\t\taddC4.setEnabled(true);\n\t\t\taddC5.setEnabled(true);\n\t\t\taddC6.setEnabled(true);\n\t\t\taddC7.setEnabled(true);\n\t\t}",
"public void displayMoveButtons(JPanel panel, GameState currentGS) {\n\n super.getContentPane().removeAll();\n\n Pokemon p2Pman = currentGS.player2CurrentPokemon;\n\n if (this.move1 == null) {\n\n Move move = p2Pman.moves.get(0);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX,moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move1 = new ActionButtonInner();\n this.move1.setButton(moveB);\n this.move1.setActionIndex(0);\n\n }\n else {\n\n Move move = p2Pman.moves.get(0);\n JButton button = this.move1.buttonObj;\n button.setText(move.moveName);\n this.move1.setActionIndex(0);\n panel.add(button);\n\n }\n\n if (this.move2 == null) {\n\n Move move = p2Pman.moves.get(1);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + (moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move2 = new ActionButtonInner();\n this.move2.setButton(moveB);\n this.move2.setActionIndex(1);\n\n }\n else {\n\n Move move = p2Pman.moves.get(1);\n JButton button = this.move2.buttonObj;\n button.setText(move.moveName);\n this.move2.setActionIndex(1);\n panel.add(button);\n\n }\n\n if (this.move3 == null) {\n\n Move move = p2Pman.moves.get(2);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 2*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move3 = new ActionButtonInner();\n this.move3.setButton(moveB);\n this.move3.setActionIndex(2);\n\n }\n else {\n\n Move move = p2Pman.moves.get(2);\n JButton button = this.move3.buttonObj;\n button.setText(move.moveName);\n this.move3.setActionIndex(2);\n panel.add(button);\n\n }\n\n if (this.move4 == null) {\n\n Move move = p2Pman.moves.get(3);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 3*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move4 = new ActionButtonInner();\n this.move4.setButton(moveB);\n this.move4.setActionIndex(3);\n\n }\n else {\n\n Move move = p2Pman.moves.get(3);\n JButton button = this.move4.buttonObj;\n button.setText(move.moveName);\n this.move4.setActionIndex(3);\n panel.add(button);\n\n }\n\n super.getContentPane().add(panel);\n super.revalidate();\n\n }",
"public void enableProductionButtons(){\n for(int i = 0; i < 3; i++){\n productionButtons[i].setText(\"Activate\");\n if (gui.getViewController().getGame().getProductionCard(i) != null){\n productionButtons[i].setEnabled(true);\n } else {\n productionButtons[i].setEnabled(false);\n }\n productionButtons[i].setToken(true);\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i], i));\n }\n\n baseProductionPanel.enableButton();\n }",
"private static void setButtonsPlaced(){\r\n for(MyButton b : mylist.getAllButtons()){\r\n b.setPlaced(false);\r\n }\r\n }",
"public void disableButtons() {\n\n for (Button b: buttons) {\n b.setClickable(false);\n }\n\n }",
"public void updateMoveButtons(JFXListView<String> textListView, JFXButton moveUpButton, JFXButton moveDownButton) {\n boolean isEmpty = textListView.getItems().size() == 0;\n moveUpButton.setDisable(isEmpty);\n moveDownButton.setDisable(isEmpty);\n }",
"private static void setButtonsColor(){\r\n for(MyButton b: mylist.getAllButtons()){\r\n if(!b.isChosen()){\r\n b.resetColor();\r\n }\r\n }\r\n \r\n for (MyButton b1: mylist.getAllButtons()){\r\n if(b1.isChosen()){\r\n for(MyButton b2 : mylist.getAllButtons()){\r\n if(!b1.equals(b2)){ \r\n if (b2.block.isSameType(b1.block)){ \r\n b2.setCannotBeChosen();\r\n }\r\n else if (!b2.isChosen() && b2.block.isAtSameTime(b1.block)){\r\n b2.setCannotBeChosen();\r\n }\r\n }\r\n }\r\n }\r\n } \r\n }",
"private void setButtonsEnable(boolean b){\n addButton.setEnabled(b);\n clearButton.setEnabled(b);\n peelOffButton.setEnabled(b);\n buttonControlPanel.setEnabled(b);\n progressCheckBox.setEnabled(b);\n }",
"private void refreshButtons() {\n flowPane.getChildren().clear();\n\n for(String testName : Files.listTests()) {\n TestJson info;\n try {\n info = TestParser.read(testName);\n } catch(FileNotFoundException e) {\n continue; /* Skip */\n }\n\n JFXButton button = new JFXButton(testName);\n button.pseudoClassStateChanged(PseudoClass.getPseudoClass(\"select-button\"), true);\n\n button.setOnAction(e -> buttonPressed(info));\n\n if(!filter(info, button))\n continue;\n\n // If this model asked to be put in a specific place, put it there\n if(!info.custom && info.order >= 0)\n flowPane.getChildren().add(Math.min(info.order, flowPane.getChildren().size()), button);\n else\n flowPane.getChildren().add(button);\n }\n }",
"private void enableButtons(){\n \n if (this.geselecteerdeStageplaats != null && this.geselecteerdeStageplaats.getBedrijfID() != null){\n this.jButtonSaveStageplaats.setEnabled(true);\n this.jButtonDeleteStageplaats.setEnabled(true);\n\n }\n else{\n this.jButtonSaveStageplaats.setEnabled(false);\n this.jButtonDeleteStageplaats.setEnabled(false);\n }\n if (this.jComboBoxGekendeBedrijven.getSelectedItem() != null){\n this.jButtonBedrijfSelecteren.setEnabled(true);\n }\n else {\n this.jButtonBedrijfSelecteren.setEnabled(false);\n }\n \n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource().getClass().equals(talkbot.Buttons.class)) {\r\n\t\t\t// int bn;\r\n\t\t\t/*if (on)\r\n\t\t\t\tbn=1;\r\n\t\t\telse\r\n\t\t\t\tbn=2; */\r\n\t\t\tButtons temp = (Buttons) e.getSource(); \r\n\t\t\t//bn = temp.getbtnNumber();\r\n\t\t\t\r\n\t\t\tString tempath = this.con.getPathToAudioFile(currentset+1, temp.getbtnNumber());\r\n\t\t\tplaySound(tempath);\r\n\t\t\tlogger.info(\"Set \" + currentset + \" - Button \" + temp.getbtnNumber());\r\n\t\t} else if (categories.contains((JButton) e.getSource())) {\r\n\t\t\tif (currentset != categories.indexOf((JButton) e.getSource())) {\r\n\t\t\tfor (int i = 0; i < tbuttons.get(currentset).size(); i++) {\r\n\t\t\t\tsp.remove(tbuttons.get(currentset).get(i));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrentset= categories.indexOf((JButton) e.getSource());\r\n\t\t\t//System.out.println(currentset); \r\n\t\t\tif (!tbuttons.get(currentset).isEmpty()) {\r\n\t\t\tfor (int i = 0; i < tbuttons.get(currentset).size(); i++) {\r\n\t\t\t\tsp.add(tbuttons.get(currentset).get(i));\r\n\t\t\t\ttbuttons.get(currentset).get(i).addActionListener(this);\r\n\t\t\t\ttbuttons.get(currentset).get(i).setVisible(true);\r\n\t\t\t}}\r\n\t\t\tthis.revalidate(); this.repaint(); }\r\n\t\t\tlogger.info(\"Set - \" + currentset);\r\n\t\t} \r\n\t}",
"private void forwardEventToButton(MouseEvent e) {\r\n Point point = new Point(e.getX(), e.getY());\r\n int index = -1;\r\n for (int i = 0; i < sectionsTab.getTabCount(); i++) {\r\n Rectangle rec = sectionsTab.getBoundsAt(i);\r\n if (rec.contains(point)) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n switch (e.getButton()) {\r\n case MouseEvent.BUTTON1:\r\n if (index < 0) {\r\n String s = \"Default section header\";\r\n SectionPanel sectionPanel\r\n = new SectionPanel(chapterPanel.createNewSection(s));\r\n sectionPanels.add(sectionPanel);\r\n sectionsTab.add(s, sectionPanel);\r\n Main.getController().getBaseScreen().\r\n getMySaveButton().setWarning();\r\n }\r\n break;\r\n case MouseEvent.BUTTON3:\r\n if (index >= 0) {\r\n Point optimumPointPopUP = ChapterPanel.HandleMousePosition(e);\r\n sectionsTabEditor.show(sectionsTab, optimumPointPopUP.x,\r\n optimumPointPopUP.y);\r\n sectionsTabEditor.setVisible(true);\r\n }\r\n break;\r\n }\r\n }",
"private void reEnableCopyButtons() {\n // re-enable the buttons the relevant buttons\n copyToASpaceButton.setEnabled(true);\n repositoryCheckButton.setEnabled(true);\n copyProgressBar.setValue(0);\n\n if (copyStopped) {\n if (ascopy != null) ascopy.saveURIMaps();\n copyStopped = false;\n copyProgressBar.setString(\"Cancelled Copy Process ...\");\n } else {\n copyProgressBar.setString(\"Done\");\n }\n }",
"private void initializeShowBtns()\r\n {\r\n showNxtMvBtn = new JButton(\"SHOW NEXT MOVE\");\r\n showNxtMvBtn.setEnabled(false);\r\n showAllMoves = new JButton(\"SHOW ALL MOVES\");\r\n showAllMoves.setEnabled(false);\r\n showNxtMvBtn.addActionListener(new ActionListener()\r\n {\r\n\r\n @Override\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n if (canvas != null)\r\n {\r\n canvas.setCurrentState((State) problem.getNextMove());\r\n canvas.render();\r\n } else\r\n {\r\n stateLabel.setText(problem.getNextMove().toString());\r\n }\r\n if (problem.solnSetEmpty())\r\n {\r\n\r\n showNxtMvBtn.setEnabled(false);\r\n showAllMoves.setEnabled(false);\r\n }\r\n }\r\n });\r\n\r\n showAllMoves.addActionListener(new ActionListener()\r\n {\r\n\r\n @Override\r\n public void actionPerformed(ActionEvent e)\r\n {\r\n showNxtMvBtn.setEnabled(false);\r\n showAllMoves.setEnabled(false);\r\n movesTimer.start();\r\n }\r\n }\r\n );\r\n }",
"private void setButtonVisibilities(){\n\n if(eventType.equals(EventType.ORGANISE)){\n btnUpdateOrSignIn.setVisibility(View.VISIBLE);\n btnUpdateOrSignIn.setText(R.string.update);\n }\n else if(timeType.equals(TimeType.ONGOING) && eventType.equals(EventType.ATTEND)){\n btnUpdateOrSignIn.setVisibility(View.VISIBLE);\n btnUpdateOrSignIn.setText(R.string.sign_in);\n }\n else{\n btnUpdateOrSignIn.setVisibility(View.GONE);\n }\n }",
"public void buttonChangeStatus(ActionEvent actionEvent) {\n }",
"@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}",
"private void deActivateButtons(){\n limiteBoton.setEnabled(false);\n derivadaBoton.setEnabled(false);\n integralBoton.setEnabled(false);\n}",
"protected void disableButtons() {\n if (mFalseButton.isPressed() || mTrueButton.isPressed())\n mFalseButton.setEnabled(false);\n mTrueButton.setEnabled(false);\n }",
"private void showHideButtons() {\n mBinding.ibPrev.setVisibility(vm.shouldShowPrevBtn() ? View.VISIBLE : View.INVISIBLE);\n mBinding.ibNext.setVisibility(vm.shouldShowNextBtn() ? View.VISIBLE : View.INVISIBLE);\n }",
"public void onButtonActionEvent(com.codename1.ui.events.ActionEvent ev) {\n new ListEvent().show();\n }",
"@Override\n\tpublic boolean onMouse(MouseEvent buttonEvent) {\n\t\treturn false;\n\t}",
"@FXML public void handleToggleButtons() {\n\t\t\n\t\t// binarySplitButton\n\t\tif (binarySplitButton.isSelected()) {\n\t\t\tbinarySplitButton.setText(\"True\");\n\t\t} else {\n\t\t\tbinarySplitButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// collapseTreeButton\n\t\tif (collapseTreeButton.isSelected()) {\n\t\t\tcollapseTreeButton.setText(\"True\");\n\t\t} else {\n\t\t\tcollapseTreeButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// debugButton\n\t\tif (debugButton.isSelected()) {\n\t\t\tdebugButton.setText(\"True\");\n\t\t} else {\n\t\t\tdebugButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotCheckCapabilitiesButton\n\t\tif (doNotCheckCapabilitiesButton.isSelected()) {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotCheckCapabilitiesButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// doNotMakeSplitPAVButton\n\t\tif (doNotMakeSplitPAVButton.isSelected()) {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"True\");\n\t\t} else {\n\t\t\tdoNotMakeSplitPAVButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// reduceErrorPruningButton\n\t\tif (reduceErrorPruningButton.isSelected()) {\n\t\t\treduceErrorPruningButton.setText(\"True\");\n\t\t} else {\n\t\t\treduceErrorPruningButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// saveInstanceDataButton\n\t\tif (saveInstanceDataButton.isSelected()) {\n\t\t\tsaveInstanceDataButton.setText(\"True\");\n\t\t} else {\n\t\t\tsaveInstanceDataButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// subTreeRaisingButton\n\t\tif (subTreeRaisingButton.isSelected()) {\n\t\t\tsubTreeRaisingButton.setText(\"True\");\n\t\t} else {\n\t\t\tsubTreeRaisingButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// unprunedButton\n\t\tif (unprunedButton.isSelected()) {\n\t\t\tunprunedButton.setText(\"True\");\n\t\t} else {\n\t\t\tunprunedButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useLaplaceButton\n\t\tif (useLaplaceButton.isSelected()) {\n\t\t\tuseLaplaceButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseLaplaceButton.setText(\"False\");\n\t\t}\n\t\t\n\t\t// useMDLcorrectionButton\n\t\tif (useMDLcorrectionButton.isSelected()) {\n\t\t\tuseMDLcorrectionButton.setText(\"True\");\n\t\t} else {\n\t\t\tuseMDLcorrectionButton.setText(\"False\");\n\t\t}\n\t\t\n\t}",
"public boolean canIterateAllTransitions () { return false; }",
"@Test\n\tpublic void addButtons_2Test() throws Exception {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showcover &&\n\t\t\t\t!Configuration.reorderplaylist && \n\t\t\t\t!Configuration.queuetrack &&\n\t\t\t\tConfiguration.clearplaylist ) {\n\t\t\tstart();\n\t\t\t\n\t\t\tgui.addButtons();\n\t\t\tJFrame g = (JFrame) MemberModifier.field(Application.class, \"frmAsd\").get(gui);\n\t\t\tJButton button =null;\n\t\t\t\n\t\t\tfor (int i = 0; i < g.getContentPane().getComponentCount(); i++) {\n\t\t\t\tif(g.getContentPane().getComponent(i).getName()!= null && g.getContentPane().getComponent(i).getName().equals(\"clearList\")) {\n\t\t\t\t\tbutton = (JButton) g.getContentPane().getComponent(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tassertTrue(button.getBounds().getX() == 361);\n\t\t\tassertTrue(button.getBounds().getY() == 324);\n\t\t\tassertTrue(button.getBounds().getWidth() == 111);\n\t\t\tassertTrue(button.getBounds().getHeight() == 23);\n\t\t\tassertTrue(button.getActionListeners()!= null);\n\t\t\t\n\t\t\t}\n\t}",
"@Override\n\tpublic ArrayList<Button> getButtonArray() {\n\t\treturn super.getButtonArray();\n\t}",
"private void setButtons(boolean en){\n btnQuit.setEnabled(!en);\n btnResign.setEnabled(en);\n btnNewGame.setEnabled(!en);\n }",
"public void disableButtons() {\n p1WinPoint.setEnabled(false);\n p2WinPoint.setEnabled(false);\n }",
"public void buttonLoadList(ActionEvent actionEvent) {\n }",
"public void onSliderChanged() {\r\n\r\n // So we can get the date of where our slider is pointing\r\n int sliderValue = (int) dateSlider.getValue();\r\n System.out.println(sliderValue);\r\n\r\n // When the slider is moved, only the correct button will appear\r\n if(sliderValue == 0) {\r\n eventButton1.setVisible(true);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 6) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(true);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 12) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(true);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 18) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(true);\r\n eventButton5.setVisible(false);\r\n } else if(sliderValue == 25) {\r\n eventButton1.setVisible(false);\r\n eventButton2.setVisible(false);\r\n eventButton3.setVisible(false);\r\n eventButton4.setVisible(false);\r\n eventButton5.setVisible(true);\r\n }\r\n }",
"private void updateButtons() {\n\t\tif (selectedDownload != null) {\n\t\t\tint status = selectedDownload.getStatus();\n\t\t\tswitch (status) {\n\t\t\t\tcase Download.DOWNLOADING:\n\t\t\t\t\tpauseButton.setEnabled(true);\n\t\t\t\t\tresumeButton.setEnabled(false);\n\t\t\t\t\tcancelButton.setEnabled(true);\n\t\t\t\t\tclearButton.setEnabled(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Download.PAUSED:\n\t\t\t\t\tpauseButton.setEnabled(false);\n\t\t\t\t\tresumeButton.setEnabled(true);\n\t\t\t\t\tcancelButton.setEnabled(true);\n\t\t\t\t\tclearButton.setEnabled(false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Download.ERROR:\n\t\t\t\t\tpauseButton.setEnabled(false);\n\t\t\t\t\tresumeButton.setEnabled(true);\n\t\t\t\t\tcancelButton.setEnabled(false);\n\t\t\t\t\tclearButton.setEnabled(true);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // COMPLETE or CANCELLED\n\t\t\t\t\tpauseButton.setEnabled(false);\n\t\t\t\t\tresumeButton.setEnabled(false);\n\t\t\t\t\tcancelButton.setEnabled(false);\n\t\t\t\t\tclearButton.setEnabled(true);\n\t\t\t}\n\t\t} else {\n\t\t\t// No download is selected in table.\n\t\t\tpauseButton.setEnabled(false);\n\t\t\tresumeButton.setEnabled(false);\n\t\t\tcancelButton.setEnabled(false);\n\t\t\tclearButton.setEnabled(false);\n\t\t}\n\t}",
"public void disableProductionButtons(){\n for(int i = 0; i < 3; i++){\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i],i));\n productionButtons[i].setEnabled(false);\n }\n\n baseProductionPanel.disableButton();\n }",
"private Map<Integer, Button> getButtons(){\r\n\t\tMap<Integer, Button> buttons = new HashMap<Integer, Button>();\r\n\r\n\t\tButton toLeftBt = new Button(\"<\");\r\n\t\tbuttons.put(0, toLeftBt);\r\n\t\tButton toRightBt = new Button(\">\");\r\n\t\tbuttons.put(2, toRightBt);\r\n\t\tfinal Button playBt = new Button(\"||\");\r\n\t\tbuttons.put(1, playBt);\r\n\t\t\r\n\t\ttoRightBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttoLeftBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tdisplayPrevious();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tplayBt.addClickListener(new ClickListener(){\r\n\t\t\tpublic void onClick(Widget sender) {\r\n\t\t\t\tif(isActive){\r\n\t\t\t\t\tstopSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"Go\");\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstartSlideshow();\r\n\t\t\t\t\tplayBt.setText(\"||\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn buttons;\r\n\t}",
"public void reenableButton(EventStruct event) {\n AppSync.puts(\"\"+event);\n if (event.type == \"scored\") {\n switch (event.subtype) {\n case \"balance\":\n robotBalanced.setEnabled(true);\n robotFailedToBalance.setEnabled(true);\n break;\n case \"glyph\":\n if (event.location == \"cipher\") {glyphCompletedCipher.setEnabled(true);}\n break;\n default: {break;}\n }\n\n\n } else if (event.type == \"missed\") {\n switch (event.subtype) {\n case \"balance\":\n robotBalanced.setEnabled(true);\n robotFailedToBalance.setEnabled(true);\n default: {break;}\n }\n }\n }",
"private void CheckEnable()\n {\n btn_prev.setEnabled(true);\n btn_next.setEnabled(true);\n\n if(increment+1 == pageCount)\n {\n btn_next.setEnabled(false);\n }\n if(increment == 0)\n {\n btn_prev.setEnabled(false);\n }\n }",
"private void showPlayerButtons() {\n\n\t\tprevious.setVisibility(View.VISIBLE);\n\t\tplay.setVisibility(View.VISIBLE);\n\t\tnext.setVisibility(View.VISIBLE);\n\t}",
"public void addClickables() {\n\t\tclickable.add(button1.getBounds());\n\t\tbehaviors.put(clickable.get(0), () -> hideEscapeScreen());\n\t\tclickable.add(button3.getBounds());\n\t\tbehaviors.put(clickable.get(1), () -> Driver.getInstance().switchToScreen(new FFWorldMap()));\n\t\tclickable.add(button4.getBounds());\n\t\tbehaviors.put(clickable.get(2), () -> Driver.getInstance().switchToScreen(new FFMainMenu()));\n\t}",
"@FXML\n private void handleButtonAction(MouseEvent event)\n {\n\n if(event.getTarget() == btn_bcconfig)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(false);\n gp_bc.setVisible(false);\n }\n else if (event.getTarget() == btn_bcread)\n {\n pane_bcconf.setVisible(true);\n pane_rtread.setVisible(false);\n if (cb_bcrt.isSelected() == true)\n {\n gp_bc.setVisible(true);\n }\n else\n {\n \t gp_bc.setVisible(false);\n }\n }\n else if (event.getTarget() == btn_rtread)\n {\n pane_bcconf.setVisible(false);\n pane_rtread.setVisible(true);\n }\n }",
"private void setButtonDisabled() {\n final boolean areProjects = mainController.selectedOrganisationProperty().getValue().getProjects().size() > 0;\n final boolean areTeams = mainController.selectedOrganisationProperty().getValue().getTeams().size() > 0;\n //allocateTeamButton.setDisable(!(areProjects && areTeams));\n }",
"@Override\n\tpublic boolean onMousePressed(MouseButtonEvent event) {\n\t\treturn false;\n\t}",
"private void setBtnState(){\n recordBtn.setEnabled(!recording);\n stopBtn.setEnabled(recording);\n pauseBtn.setEnabled(playing & !paused);\n resumeBtn.setEnabled(paused);\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void addSingleplayerMultiplayerButtons() {\n\t\tthis.buttonList.add(new GuiButton(1, 4, 3, 60, 20, I18n.format(\"menu.singleplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(2, 70, 3, 50, 20, I18n.format(\"menu.multiplayer\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(14, 126, 3, 60, 20, \"§bResilient§r\"));\n\n\t}",
"private void configureEnableButtons() {\r\n\t\ttglbtnBirthdays.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnBirthdays) {\r\n\t\t\t\t\tif (tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setBirthdayTemplate(emailStorage.getTemplate(templateBirthday));\r\n\t\t\t\t\t\ttheSender.runBirthdaySetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingBirthdays();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnBirthdays.isSelected()) {\r\n\t\t\t\t\t\ttglbtnBirthdays.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingBirthdays();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\ttglbtnAnniv.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == tglbtnAnniv) {\r\n\t\t\t\t\tif (tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Disable\");\r\n\t\t\t\t\t\ttheSender.setAnnivTemplate(emailStorage.getTemplate(templateAnniv));\r\n\t\t\t\t\t\ttheSender.runAnnivSetUp();\r\n\t\t\t\t\t\ttheSender.resumeSendingAnniv();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!tglbtnAnniv.isSelected()) {\r\n\t\t\t\t\t\ttglbtnAnniv.setText(\"Enable\");\r\n\t\t\t\t\t\ttheSender.stopSendingAnniv();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}",
"private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }",
"private void setButtonsEnabledState() {\n if (mRequestingLocationUpdates) {\n mStartUpdatesButton.setEnabled(false);\n mStopUpdatesButton.setEnabled(true);\n } else {\n mStartUpdatesButton.setEnabled(true);\n mStopUpdatesButton.setEnabled(false);\n }\n }",
"@Override\n public void update(@NotNull AnActionEvent e) {\n e.getPresentation().setEnabledAndVisible(false);\n }",
"void switchButtons(Button currentButton){\n\n Button emptyButton = btns.get(zeroIndex);\n emptyButton.setLabel(currentButton.getLabel());\n currentButton.setLabel(\"\" + 0);\n emptyButton.setVisible(true);\n currentButton.setVisible(false);\n\n if (Integer.parseInt(btns.get(zeroIndex).getLabel()) == zeroIndex + 1){\n btnsStates.set(zeroIndex, true);\n } else {\n btnsStates.set(zeroIndex, false);\n }\n btnsStates.set(btns.indexOf(currentButton), true);\n zeroIndex = findZero();\n }",
"boolean getButtonRelease(Buttons but);",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tthis.view.getPaintPanel().setMode(e.getActionCommand());\r\n\n\t\tJButton buttonPressed = (JButton) e.getSource();\r\n\r\n\t\t// lets user know which mode they're in by disabling button\r\n\t\tif (buttonPressed.isSelected() != true) {\r\n\t\t\tbuttonPressed.setEnabled(false);\r\n\t\t}\r\n\t\tfor (JButton tempButton : buttons) {\r\n\t\t\tif (buttonPressed != tempButton) {\r\n\t\t\t\ttempButton.setEnabled(true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(e.getActionCommand());\r\n\t}",
"protected void setEnabledButtons( final boolean b )\r\n {\r\n jButtonSource.setEnabled( b );\r\n jButtonDestination.setEnabled( b );\r\n jButtonClearFileList.setEnabled( b );\r\n jButtonDoAction.setEnabled( b );\r\n }",
"public void resetButtons() {\n\t\tboolean bool = selectedLesson.isEnable();\n\t\tview.getTestButton().setEnabled(bool);\n\t\tview.getLearnButton().setEnabled(bool);\n\t}",
"private void disableButtons(boolean b) {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setDisable(b);\n bt[i][j].setStyle(\"-fx-border-color:transparent\");\n }\n }\n }",
"@Override\n\tprotected void loadButtons() {\n\t\tList<Button> buttons = new ArrayList<>();\n\t\tfinal int square_size = 100;\n\t\tfinal int seperator_size = 20;\n\t\tfinal int numButtons = 2;\n\t\tint y = (getHeight() - 100) / 2;\n\t\tint x = (getWidth() - (square_size * numButtons) - (seperator_size * (numButtons - 1))) / 2;\n\t\tint sep = square_size + seperator_size;\n\t\t// Paint button.\n\t\ttry {\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_paint), \"Toggle paint\", x, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tsetUsingTextures(!isUsingTextures());\n\t\t\t\t\t\t\trepaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\tbuttons.add(new Button(getImage(IconHandler.path_fullscreen), \"Toggle full-screen\", x + sep, y,\n\t\t\t\t\tsquare_size, square_size, new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tgetFrame().toggleArrangeSide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetButtons(buttons);\n\t}",
"protected void setMinVolumeStateOnButtons() {\n mVolDownButton.setEnabled(false);\n mVolUpButton.setEnabled(true);\n }",
"public void disableAllButtons(){\n\t\tbtnConfirmOrNext.setEnabled(false);\n\t\tbtnStop.setEnabled(false);\n\t\tbtnListenAgain.setEnabled(false);\n\t}",
"public void removeWrongDestination (int button)\n {\n if (button==0)\n a.setEnabled(false);\n else if (button==1)\n b.setEnabled(false);\n else\n c.setEnabled(false);\n feedbackLabel.setVisible(true);\n }",
"private void toggleButtonsEnabled() {\r\n final Button headsBtn = findViewById(R.id.b_heads);\r\n final Button tailsBtn = findViewById(R.id.b_tails);\r\n final Button startBtn = findViewById(R.id.b_startGame);\r\n\r\n headsBtn.setEnabled(false);\r\n tailsBtn.setEnabled(false);\r\n startBtn.setEnabled(true);\r\n }",
"public void enableButtons (boolean enabled)\n\t{\n\t\tfor (int i = 1; i <= 9; ++ i)\n\t\t\ttileButton[i].setEnabled (enabled);\n\t\tfor (int i = 0; i <= 1; ++ i)\n\t\t\tdieButton[i].setEnabled (enabled);\n\t\tdoneButton.setEnabled (enabled);\n\t}",
"void toggleDeleteVisible (ActionEvent actionEvent) {\n if (this.isSelected())\n app.deleteElements.add(element);\n else\n app.deleteElements.remove(element);\n }",
"@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\tList<Pair<Text, Button>> texts = inputFields.get(fp);\n \t\t\t\ttexts.remove(pair);\n \t\t\t\tupdateState();\n \t\t\t\tremoveButton.dispose();\n \t\t\t\ttext.dispose();\n\t\t\t\taddButtons.get(fp).setEnabled(true);\n \t\t\t\tif (texts.size() == fp.getMinOccurrence())\n \t\t\t\t\tfor (Pair<Text, Button> otherPair : texts)\n \t\t\t\t\t\totherPair.getSecond().setEnabled(false);\n \n \t\t\t\t// do layout\n \t\t\t\t((Composite) getControl()).layout();\n \t\t\t\t// pack to make wizard smaller if possible\n \t\t\t\tgetWizard().getShell().pack();\n \t\t\t}",
"private void setupButtons() {\n for (int i = 0; i < players.size(); i++) {\n final int j = i + 1;\n players.get(i).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonPushed(j);\n }\n });\n }\n }",
"private void updateTileButtons() {\n Board board = boardManager.getBoard();\n int nextPos = 0;\n for (Button b : tileButtons) {\n int row = nextPos / Board.NUM_ROWS;\n int col = nextPos % Board.NUM_COLS;\n if (bitmapList == null) {\n b.setBackgroundResource(board.getTile(row, col).getBackground());\n } else if (board.getTile(row, col).getId() != Board.NUM_COLS * Board.NUM_ROWS) {\n BitmapDrawable d = new BitmapDrawable(getResources(), bitmapList.get(board.getTile(row, col).getId()));\n b.setBackground(d);\n } else {\n b.setBackgroundResource(R.drawable.tile_grey);\n }\n nextPos++;\n }\n }",
"private void checkEnableDisable() {\n\t\tif (_trainingSet.getCount() > 0) {\n\t\t\t_saveSetMenuItem.setEnabled(true);\n\t\t\t_saveSetAsMenuItem.setEnabled(true);\n\t\t\t_trainMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_saveSetMenuItem.setEnabled(false);\n\t\t\t_saveSetAsMenuItem.setEnabled(false);\n\t\t\t_trainMenuItem.setEnabled(false);\n\t\t}\n\n\t\tif (_currentTrainGrid == null) {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t} else {\n\t\t\t_deleteGridMenuItem.setEnabled(true);\n\t\t}\n\n\t\tif (_index > 0) {\n\t\t\t_leftGridMenuItem.setEnabled(true);\n\t\t\t_leftBtn.setEnabled(true);\n\t\t\t_firstGridMenuItem.setEnabled(true);\n\t\t\t_firstBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_leftGridMenuItem.setEnabled(false);\n\t\t\t_leftBtn.setEnabled(false);\n\t\t\t_firstGridMenuItem.setEnabled(false);\n\t\t\t_firstBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index < _trainingSet.getCount() - 1) {\n\t\t\t_rightGridMenuItem.setEnabled(true);\n\t\t\t_rightBtn.setEnabled(true);\n\t\t\t_lastGridMenuItem.setEnabled(true);\n\t\t\t_lastBtn.setEnabled(true);\n\t\t} else {\n\t\t\t_rightGridMenuItem.setEnabled(false);\n\t\t\t_rightBtn.setEnabled(false);\n\t\t\t_lastGridMenuItem.setEnabled(false);\n\t\t\t_lastBtn.setEnabled(false);\n\t\t}\n\n\t\tif (_index >= _trainingSet.getCount()) {\n\t\t\t_indexLabel.setText(String.format(NEW_INDEX_LABEL, _trainingSet.getCount()));\n\t\t} else {\n\t\t\t_indexLabel.setText(String.format(INDEX_LABEL, _index + 1, _trainingSet.getCount()));\n\t\t}\n\n\t\t_resultLabel.setText(EMPTY_RESULT_LABEL);\n\t}",
"private void autoEnableNavButtons() {\n\t\tif (currPageIndex.equals(pages.size() - 1)) {\n\t\t\tbtnNext.setText(\"Finish\");\n\t\t} else {\n\t\t\tbtnNext.setText(\"Next >\");\n\t\t}\n\n\t\tbtnPrevious.setEnabled(!currPageIndex.equals(0));\n\t}",
"private void updateButtonState(ShopItem[] buy, ShopItem[] sell) {\n int gold = world.getCharacter().getGold().get();\n for (int i = 0; i < 8; i++) {\n Boolean canBuy = gold < buy[i].getPrice();\n Boolean canSell = !world.ifHasItem(sell[i].getName());\n if (world.isSurvivalMode()){\n // only can buy one potion if survival mode\n buy[i].getButton().disableProperty().set(canBuy);\n if (i == 2 && this.potionNum == 0){\n buy[i].getButton().disableProperty().set(true);\n }\n } else if (world.isBerserkerMode()) {\n buy[i].getButton().disableProperty().set(canBuy);\n // only can buy one piece of defensive gear if berserker mode\n if ((i == 0 || i == 1 || i == 3) && this.defenseNum == 0){\n buy[i].getButton().disableProperty().set(true);\n }\n } else {\n buy[i].getButton().disableProperty().set(canBuy);\n }\n sell[i].getButton().disableProperty().set(canSell);\n }\n }",
"@Override\n public void valueChanged(ListSelectionEvent e) {\n if (!ageList.isSelectionEmpty())\n playButton.setEnabled(true);\n }",
"private void disableButtons(boolean disable, boolean normalMoves, boolean rotations) {\n\t\tArrayList<PuzzleTurn> turns = mPuzzleMoveListener.getmPuzzleTurns();\n\t\t// iterate through puzzleTurns\n\t\tfor (int i = 0; i < turns.size(); i++) {\n\t\t\tPuzzleTurn current = turns.get(i);\n\n\t\t\tif( !current.isRotation() && !normalMoves){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (current.isRotation() && !rotations) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// iterate through buttons\n\t\t\tfor (Button btn : mButtons) {\n\t\t\t\tif (btn.getText().toString().equals(current.getmName())) {\n\t\t\t\t\tbtn.setEnabled(!disable);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}",
"@Override\n public boolean dispatchTouchEvent(MotionEvent e) {\n if (e.getAction() == MotionEvent.ACTION_UP) {\n // Whenever UP event is detected, button should be presented as 'normal':\n for(int zones = 5; zones < touchZones.size(); zones++){\n touchZones.get(zones).setBackgroundResource(R.drawable.b_normal);\n }\n }\n return super.dispatchTouchEvent(e);\n }",
"private void setAvailableButtons(int gamePosition){\n ButtonClass[] availableButtons = getGame(gamePosition).getAllButtons();\n ButtonClass[] notAvailableButtons = getNotAvailableButtons(gamePosition);\n for (ButtonClass b: availableButtons) {\n b.setAvailable(true);\n }\n for (ButtonClass b: notAvailableButtons){\n b.setAvailable(false);\n }\n }",
"private void createAdditionalButtonControls(Composite parent) {\r\n\t\tComposite btnComposite = new Composite(parent, SWT.NONE);\r\n\t\tbtnComposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tButton selAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tselAllBtn.setText(Messages.TOPOLOGY_BTN_SELECT_ALL_TXT);\r\n\t\tselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(true);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton deselAllBtn = new Button(btnComposite, SWT.PUSH);\r\n\t\tdeselAllBtn.setText(Messages.TOPOLOGY_BTN_DESELECT_ALL_TXT);\r\n\t\tdeselAllBtn.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedUnitsList.setAllChecked(false);\r\n\t\t\t\tupdateSelectedItemsProperty();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void deleteButton(Button b) {\n DefaultListModel m = (DefaultListModel) srcList.getModel();\n int i;\n for (i = 0; i < m.getSize(); ++i) {\n if (m.get(i) == b) {\n break;\n }\n }\n if (i == m.getSize()) {\n m.addElement(b);\n }\n }",
"private void setEndingButtons() {\n Button btnFinishEnable = (Button) findViewById(R.id.btnFinish);\n btnFinishEnable.setEnabled(true);\n Button btnNextEnable = (Button) findViewById(R.id.btnNext);\n btnNextEnable.setEnabled(false);\n }"
]
| [
"0.63392925",
"0.6163289",
"0.61027086",
"0.6015911",
"0.60008097",
"0.59500897",
"0.5908412",
"0.58970046",
"0.5883629",
"0.58100444",
"0.5790548",
"0.5727662",
"0.5725872",
"0.56969535",
"0.569563",
"0.56917727",
"0.5682249",
"0.56550306",
"0.56472814",
"0.5644655",
"0.5633865",
"0.5631664",
"0.56294584",
"0.56045496",
"0.5592185",
"0.55916834",
"0.558664",
"0.5571169",
"0.55662876",
"0.5561828",
"0.5536419",
"0.550683",
"0.5473772",
"0.54698014",
"0.5467601",
"0.54622954",
"0.5460946",
"0.5445284",
"0.5439996",
"0.5435605",
"0.54269314",
"0.54159474",
"0.5415927",
"0.5407886",
"0.5388873",
"0.53722274",
"0.5363044",
"0.53587824",
"0.5355007",
"0.5352286",
"0.53498936",
"0.53470904",
"0.5342373",
"0.5327611",
"0.5310652",
"0.53063935",
"0.5294568",
"0.52894825",
"0.52757806",
"0.5274457",
"0.52712137",
"0.5250366",
"0.52503455",
"0.52469337",
"0.5236104",
"0.5232971",
"0.5229373",
"0.52247024",
"0.5223289",
"0.52214915",
"0.52155983",
"0.52070963",
"0.5199127",
"0.5198563",
"0.519622",
"0.51955247",
"0.5195236",
"0.5190818",
"0.51834095",
"0.5177083",
"0.517348",
"0.5172927",
"0.51674986",
"0.51659673",
"0.516349",
"0.51618516",
"0.5155166",
"0.514761",
"0.5145453",
"0.514405",
"0.513974",
"0.51397055",
"0.5138207",
"0.51263136",
"0.5124131",
"0.512356",
"0.51207566",
"0.51199764",
"0.51122725",
"0.5103832"
]
| 0.78472215 | 0 |
/ update each JTextField in the GUI with the value, held in the datamodel, of the corresponding variable TODO: implement explicit cast from List to List | @Override
public void onTransition(final TransitionTarget fromState, final TransitionTarget toState, final Transition aTransition) {
List<Action> actionList = aTransition.getActions();
ArrayList<Assign> assignList = new ArrayList<Assign>();
for (Action a : actionList){
if(a.getClass().toString().equals("class org.apache.commons.scxml.model.Assign")){
assignList.add((Assign)a);
}
}
for (Assign anAssign : assignList) {
String aVariableName = anAssign.getName();
// at run time the value returned from the engine is a Long (which cannot be cast to String)
// but at compile time it is just an Object, hence the need of declaring a cast to Long and using conversion
String aVariableValue;
if(myASM.getEngine().getRootContext().get(aVariableName).getClass().toString().equals("class java.lang.String")){
aVariableValue = (String)myASM.getEngine().getRootContext().get(aVariableName);
}else{
aVariableValue = Long.toString((Long)myASM.getEngine().getRootContext().get(aVariableName));
}
variableFields.get(aVariableName).setText(aVariableValue);
}
statechartTraceAppend("Transition from state: " + fromState.getId() + " to state: " + toState.getId() + "\n");
/* enable JButtons for all transitions in those states in the current configuration without the fromStates and plus the toStates
* TODO: implement explicit cast from Set to Set<TransitionTarget>
Set<TransitionTarget> relevantStates = myASM.getEngine().getCurrentStatus().getAllStates();
relevantStates.remove(fromState);
relevantStates.add(toState);
for (TransitionTarget aState : relevantStates) {
enableButtonsForTransitionsOf(aState);
} */
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }",
"private void updateTxtBoxes() {\n int i = channelSelect.getSelectedIndex();\n \n if(i==-1) return; //sometimes channelSelect event is accidentally triggered\n //which calls updateTxtBoxes(),even when selected index is -1. \n //This line of code avoids index out of bounds error\n \n Channel c = channelList.get(i);\n \n ampBox.setText(\"\"+c.getAmp());\n durBox.setText(\"\"+c.getDur());\n freqBox.setText(\"\"+c.getFreq());\n owBox.setText(\"\"+c.getOnWave()); \n }",
"public void valueChanged(ListSelectionEvent event) {\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }",
"private void bindValues(){\r\n\t\tif (contenuEquation.isDisposed())return;\r\n\t\tif(equation == null)return;\r\n\t\t//the DatabindingContext object will manage the databindings\r\n\t\t//In this first part I monitor the the equation expression and check its\r\n\t\t//conformity to the correct syntaxe of an equation.\r\n\t\tDataBindingContext ctx = new DataBindingContext();\r\n\r\n\r\n\t\tIObservableValue contenuEqnWidget = WidgetProperties.text(SWT.Modify).observe(contenuEquation);\r\n\t\tIObservableValue contenuEqnValue = BeanProperties.value(Equation.class, \"contenuEqn\").observe(equation);\r\n\r\n\t\t//Defining the update strategy\r\n\t\tUpdateValueStrategy strategy = new UpdateValueStrategy();\r\n\r\n\t\t//Defining the Update Strategy that the field validator should use, this validation is passed before the value can be set.\r\n\t\tstrategy.setBeforeSetValidator(value->{\r\n\t\t\tString eqnString = String.valueOf(value);\r\n\t\t\ttry {\r\n\t\t\t\tnew VerificationSyntaxeEquation(eqnString);\r\n\t\t\t\tExtractionParametre.listEquationParameters(eqnString);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(false);\r\n\t\t\t\tif (e instanceof ErreurDeSyntaxe){\t\t\t\t\t\t\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof EquationVide) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof InvalidParameter) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(true);\r\n\t\t\tsetStatus(ValidationStatus.ok());\r\n\t\t\treturn ValidationStatus.ok();\r\n\t\t});\r\n\t\t//Binding the control and the data with the update strategy to use\t\t\r\n\t\tBinding bindValue = ctx.bindValue(contenuEqnWidget, contenuEqnValue,strategy,null);\r\n\r\n\t\t//Adding some decoration to indicate to the user the validation status of\r\n\t\t//of the currently typed equation expression\r\n\t\tControlDecorationSupport.create(bindValue, SWT.TOP|SWT.RIGHT);\r\n\t\tUpdateValueStrategy convertAndUpdate = new UpdateValueStrategy();\r\n\r\n\t\tconvertAndUpdate.setBeforeSetValidator(value->{\t\t\t\t\r\n\t\t\tboolean val = (Boolean)value;\t\t\t\r\n\r\n\t\t\tif ( val) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed())\r\n\t\t\t\t\tif(getStatus().equals(ValidationStatus.ok())){\r\n\t\t\t\t\t\tparametreDeSortieCombo.setEnabled(true);\r\n\r\n\t\t\t\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\t\tparametreDeSortieCombo.update();\r\n\r\n\t\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\tif (val == false) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed()){\r\n\r\n\t\t\t\t\tparametreDeSortieCombo.setEnabled(false);\r\n\t\t\t\t\tparametreDeSortieCombo.setItems(new String[]{});\r\n\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\tparametreDeSortieCombo.update();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\t\t\r\n\r\n\t\tIObservableValue contrainteWidget = WidgetProperties.selection().observe(contrainteButton);\r\n\t\tIObservableValue contrainteValue = BeanProperties.value(Equation.class, \"isConstraint\").observe(equation);\r\n\t\tctx.bindValue(contrainteWidget, contrainteValue);\r\n\r\n\r\n\t\tIObservableValue orientationWidget = WidgetProperties.selection().observe(orientationButton);\r\n\t\tIObservableValue orientationValue = BeanProperties.value(Equation.class, \"isOriented\").observe(equation);\r\n\r\n\t\tctx.bindValue(orientationWidget, orientationValue, convertAndUpdate, null);\r\n\r\n\t\tIObservableValue parametreDeSortieWidget = WidgetProperties.selection().observe(parametreDeSortieCombo);\r\n\t\tIObservableValue parametreDeSortieValue = BeanProperties.value(Equation.class, \"parametreDeSortie.nomP\").observe(equation);\r\n\t\tUpdateValueStrategy updateParametreDeSortie = new UpdateValueStrategy();\r\n\r\n\t\tupdateParametreDeSortie.setAfterGetValidator(updateOutput->{\r\n\t\t\t//System.out.println(updateOutput);\r\n\t\t\tParametre parametre = equation.getParametreByName((String)updateOutput);\r\n\t\t\tif (parametre == null) {\r\n\t\t\t\treturn ValidationStatus.error(\"Parameter not found.\");\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tparametre.setTypeP(TypeParametre.OUTPUT);\r\n\t\t\t\tparametre.setSousTypeP(SousTypeParametre.OUTPUT);\r\n\t\t\t\tequation.setParametreDeSortie(parametre);\r\n\t\t\t} catch (MainApplicationException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t//\tSystem.err.println(parametre);\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\r\n\t\tctx.bindValue(parametreDeSortieWidget, parametreDeSortieValue, updateParametreDeSortie, null);\r\n\r\n\t\tIObservableValue proprieteEqnWidget = WidgetProperties.text(SWT.Modify).observe(properties);\r\n\t\tIObservableValue proprieteEqnValue = BeanProperties.value(Equation.class, \"proprieteEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(proprieteEqnWidget, proprieteEqnValue);\r\n\r\n\t\tIObservableValue descEqnWidget = WidgetProperties.text(SWT.Modify).observe(description);\r\n\t\tIObservableValue descEqnEqnValue = BeanProperties.value(Equation.class, \"descEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(descEqnWidget, descEqnEqnValue);\r\n\r\n\r\n\r\n\t\t//In this second part I aim to monitor the the equation expression and check its parameter names'\r\n\t\t//conformity to the correct syntaxe of a parameter name before showing it in the combobox.\r\n\r\n\t}",
"private void setTextboxesToContainedData()\n {\n updateWeightTextFieldToStored(\"failure loading default\");\n updateSpriteTextFieldToStored(\"failure loading default\");\n }",
"public void updateInterpList(){\n System.out.println(\"updating list\");\n tableVals = FXCollections.observableArrayList();\n for(InterpreterStaff interp: getInterpreterStaff()){\n tableVals.add(new InterpreterTableAdapter(interp));\n }\n InterpInfoTable.setItems(tableVals);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStrbox_node.setData(title.getText());\n\t\t\t\tSystem.out.println(Strbox_node.getData());\n\t\t\t\tSystem.out.println(Strbox_node);\n\n\t\t\t\tfor(int a =0; a<values.size(); a++){\n\t\t\t\t\tvalues.get(a).get_node().setData(values.get(a).getText());\n\t\t\t\t\tSystem.out.println(values.get(a).get_node().getData());\n\t\t\t\t\tSystem.out.println(values.get(a).get_node());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"public void update() {\r\n\t\tif (firstRow > maxRows) {\r\n\t\t\tfirstRow = maxRows;\r\n\t\t\tfromRowField.setText(firstRow + \"\");\r\n\t\t}\r\n\t\tif (lastRow > maxRows) {\r\n\t\t\tlastRow = maxRows;\r\n\t\t\ttoRowField.setText(lastRow + \"\");\r\n\t\t}\r\n\t\tif (firstColumn > maxColumns) {\r\n\t\t\tfirstColumn = maxColumns;\r\n\t\t\tfromColumnField.setText(firstColumn + \"\");\r\n\t\t}\r\n\t\tif (lastColumn > maxColumns) {\r\n\t\t\tlastColumn = maxColumns;\r\n\t\t\ttoColumnField.setText(lastColumn + \"\");\r\n\t\t}\r\n\r\n\t\tIterator i = listeners.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\t((DataControlListener) i.next()).update(firstRow, lastRow, firstColumn, lastColumn, fractionDigits);\r\n\t\t}\r\n\t}",
"private void btn1Event(){\n int cnt = Integer.parseInt(tfNum1.getText());\n int i = 0;\n for (i=0; i<cnt; i++){\n list.add(new NumGenA());\n taResults.appendText(String.valueOf(i) + \n \" = \" + String.valueOf(list.get(i).getValue() + \"\\n\"));\n \n lab2.setText(String.valueOf(NumGenA.getCount()));\n }\n }",
"private void updateFieldValues(){\r\n \tgenChainLengthField.setText(String.valueOf(settings.genChainLength));\r\n \tgenChainLengthFluxField.setText(String.valueOf(settings.genChainLengthFlux));\r\n \tstepGenDistanceField.setText(String.valueOf(settings.stepGenDistance));\r\n \trowsField.setText(String.valueOf(settings.rows));\r\n \tcolsField.setText(String.valueOf(settings.cols));\r\n \tcellWidthField.setText(String.valueOf(settings.cellWidth));\r\n \tstartRowField.setText(String.valueOf(settings.startRow));\r\n \tstartColField.setText(String.valueOf(settings.startCol));\r\n \tendRowField.setText(String.valueOf(settings.endRow));\r\n \tendColField.setText(String.valueOf(settings.endCol));\r\n \tprogRevealRadiusField.setText(String.valueOf(settings.progRevealRadius));\r\n \tprogDrawCB.setSelected(settings.progDraw);\r\n \tprogDrawSpeedField.setText(String.valueOf(settings.progDrawSpeed));\r\n }",
"void regListValueChanged(){\r\n\t\tseries = dealer.getSeriesQueue();\r\n\t\tIterator<BuzzardSeriesInfo> it = series.iterator();\r\n\t\tint i=0;\r\n\t\tint selInd = reList.getSelectedIndex();\r\n\t\twhile(i<=selInd&&it.hasNext()){\r\n\t\t\tinfo = it.next();\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnrLabel.setText(nrLabelText + String.valueOf(info.getNoOfMatches()));\r\n\t\t// Welch Freude... wir sehen den Fragezeichenoperator in action ;)\r\n\t\tviLabel.setText(viLabelText + (info.isSimulated()?\"Ja\":\"Nein\"));\r\n\t\tgeList.clear();\r\n\t\tgeList.displayPlayers(info.getPlayers());\r\n\t}",
"private void updateValue(Widget sender){\r\n\t\tint index = getWidgetIndex(sender) - 1;\r\n\t\tTaskParam param = taskDef.getParamAt(index);\r\n\t\tparam.setValue(((TextBox)sender).getText());\r\n\t\ttaskDef.setDirty(true);\r\n\t}",
"protected void updateForm() {\n //Set the number of contacts\n Long numContacts = myContactList.rowCount();\n this.textContactWorld.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Africa\");\n this.textContactAfrica.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Americas\");\n this.textContactAmericas.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Asia\");\n this.textContactAsia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Australasia\");\n this.textContactAustralasia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Europe\");\n this.textContactEurope.setText(String.valueOf(numContacts));\n\n }",
"public void refresh(){\n\t\tint i=0;\n\t\tEntity editedEntity=getEditedEntity();\n\t\tfor(FloatTrait t:swat.dk.getTraits(tt)){\n\t\t\t((Swat.Slider)((JComponent)slidersPanel.getComponent(i)).getComponent(1)).mSetValue(toSlider(getValue(editedEntity,t)));\n\t\t\ti++;\n\t\t}\n\t}",
"public void setValuesForDisplay() {\n \tthis.trainModelGUI.tempLabel.setText(Integer.toString(this.temperature) + DEGREE + \"F\");\n\n //this.trainCars = this.trainModelGUI.numCars();\n this.trainWheels = this.trainCars * TRAIN_NUM_WHEELS;\n this.trainModelGUI.crewCountLabel.setText(Integer.toString(crew));\n this.trainModelGUI.heightVal.setText(Double.toString(truncateTo(this.trainHeight, 2)));\n this.trainModelGUI.widthVal.setText(Double.toString(truncateTo(this.trainWidth, 2)));\n this.trainModelGUI.lengthVal.setText(Double.toString(truncateTo(this.trainLength, 2)));\n this.trainModelGUI.weightVal.setText(Integer.toString(((int)this.trainWeight)));\n this.trainModelGUI.capacityVal.setText(Integer.toString(this.trainCapacity));\n this.trainModelGUI.powerVal.setText(Double.toString(truncateTo(this.powerIn/1000,2)));\n \n GPSAntenna = this.trainModelGUI.signalFailStatus();\n if(!GPSAntenna) {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"OFF\");\n }\n MBOAntenna = this.trainModelGUI.signalFailStatus();\n if(!MBOAntenna) {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.timeVal.setText(trnMdl.currentTime.toString());\n \tthis.trainModelGUI.stationVal.setText(this.station);\n \t\n \tif(rightDoorIsOpen == true) {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"CLOSED\");\n }\n \tif(leftDoorIsOpen == true) {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"CLOSED\");\n }\n\n \tif(lightsAreOn == true) {\n \t\tthis.trainModelGUI.lightStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.lightStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.numPassengers.setText(Integer.toString(this.numPassengers));\n \tthis.trainModelGUI.numCarsSpinner.setText(Integer.toString(this.trainCars));\n \tthis.trainModelGUI.authorityVal.setText(Double.toString(truncateTo(this.CTCAuthority/METERS_PER_MILE,2)));\n \tthis.trainModelGUI.ctcSpeedLabel.setText(Double.toString(truncateTo(this.CTCSpeed*KPH_TO_MPH,2)));\n \t\n \tif(serviceBrake) {\n \t\tthis.trainModelGUI.serviceLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.serviceLabel.setText(\"OFF\");\n }\n \tif(emerBrake) {\n \t\tthis.trainModelGUI.emergencyLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.emergencyLabel.setText(\"OFF\");\n }\n \t\n \tif(this.arrivalStatus == ARRIVING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"ARRIVING\");\n \t} else if (this.arrivalStatus == EN_ROUTE) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"EN ROUTE\");\n \t} else if (this.arrivalStatus == APPROACHING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"APPROACHING\");\n \t} else {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"DEPARTING\");\n embarkingPassengersSet = false;\n \t}\n\n \tthis.trainModelGUI.currentSpeedLabel.setText(Double.toString(truncateTo((this.currentSpeed*MS_TO_MPH), 2)));\n \n \tif (this.lineColor.equals(\"GREEN\")) {\n \t\tthis.trainModelGUI.lblLine.setText(lineColor);\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.GREEN);\n \t} else {\n \t\tthis.trainModelGUI.lblLine.setText(\"RED\");\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.RED);\n }\n \t\n }",
"protected abstract void setValue(JList<?> list, T value, int index, boolean isSelected, boolean cellHasFocus);",
"public void displayEditSpecies(List<Species> currentSpecies, String selectedSpeciesId){\r\n\t\t\t\tfor(Species theSpecies: currentSpecies){\r\n\t\t\t\t\t//check if the user click is the correct\r\n\t\t\t\t\tif(theSpecies.getSpeciesId().equals(selectedSpeciesId)){\r\n\t\t\t\t\t\tHorizontalPanel userButtonsPane = new HorizontalPanel();\r\n\t\t\t\t\t\tVerticalPanel labelsPanel = new VerticalPanel();\r\n\t\t\t\t\t\tVerticalPanel textBoxesPanel = new VerticalPanel();\r\n\t\t\t\t\t\tHorizontalPanel formPanel = new HorizontalPanel(); \r\n\t\t\t\t\t\t//styling\r\n\t\t\t\t\t\ttextBoxesPanel.setStyleName(\"formTextBoxesPanel\");labelsPanel.setSpacing(6);userButtonsPane.setSpacing(10);\r\n\t\t\t\t\t\t//populate the textBox\r\n\t\t\t\t\t\tspeciesIdTxtBx.setText(theSpecies.getSpeciesId());\r\n\t\t\t\t\t\tspeciesNameTxtBx.setText(theSpecies.getSpeciesName());\r\n\t\t\t\t\t\tspeciesDescTxtBx.setText(theSpecies.getSpeciesDescription());\r\n\t\t\t\t\t\tspeciesSimilar1TxtBx.setText(theSpecies.getSpeciesLooklike1());\r\n\t\t\t\t\t\tspeciesSimilar2TxtBx.setText(theSpecies.getSpeciesLooklike2());\r\n\t\t\t\t\t\tspeciesSimilar3TxtBx.setText(theSpecies.getSpeciesLooklike3());\r\n\t\t\t\t\t\t//Styling textBoxes\r\n\t\t\t\t\t\tspeciesIdTxtBx.setStyleName(\"input\");speciesNameTxtBx.setStyleName(\"input\");speciesDescTxtBx.setStyleName(\"input\");speciesSimilar1TxtBx.setStyleName(\"input\");speciesSimilar2TxtBx.setStyleName(\"input\");\r\n\t\t\t\t\t\tspeciesSimilar3TxtBx.setStyleName(\"input\");\r\n\t\t\t\t\t\tLabel speciesIdLbl = new Label(\"Species ID: \");\r\n\t\t\t\t\t\tLabel speciesNameLbl= new Label(\"Species Name \");\r\n\t\t\t\t\t\tLabel speciesDescLbl = new Label(\"Species Description: \");\r\n\t\t\t\t\t\tLabel speciesLookslike1Lbl = new Label(\"Similar species 1: \");\r\n\t\t\t\t\t\tLabel speciesLookslike2Lbl = new Label(\"Similar species 2: \");\r\n\t\t\t\t\t\tLabel speciesLookslike3Lbl = new Label(\"Similar species 3: \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlabelsPanel.add(speciesIdLbl); textBoxesPanel.add(speciesIdTxtBx);\r\n\t\t\t\t\t\tlabelsPanel.add(speciesNameLbl);textBoxesPanel.add(speciesNameTxtBx);\r\n\t\t\t\t\t\tlabelsPanel.add(speciesLookslike1Lbl);textBoxesPanel.add(speciesSimilar1TxtBx);\r\n\t\t\t\t\t\tlabelsPanel.add(speciesLookslike2Lbl);textBoxesPanel.add(speciesSimilar2TxtBx);\r\n\t\t\t\t\t\tlabelsPanel.add(speciesLookslike3Lbl);textBoxesPanel.add(speciesSimilar3TxtBx);\r\n\t\t\t\t\t\tlabelsPanel.add(speciesDescLbl);textBoxesPanel.add(speciesDescTxtBx);\r\n\t\t\t\t\t\tformPanel.add(labelsPanel);formPanel.add(textBoxesPanel);\r\n\t\t\t\t\t\t//buttons for this user\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmainSpeciesPanel.add(saveResultLbl);\r\n\t\t\t\t\t\tformPanel.add(saveBtn);\r\n\t\t\t\t\t\tformPanel.add(cancelBtn);\r\n\t\t\t\t\t\tmainSpeciesPanel.add(formPanel);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t}",
"@Override\n public void valueChanged(ListSelectionEvent e) {\n int i=taulaModelProveidor.getSelectedRow();\n if(i!=-1){\n \n //modNomCom.setText(Inici.llistaProveidors.get(i).get2nomCom());\n modNomCom.setText(taulaModelProveidor.getModel().getValueAt(i, 0).toString());\n modDataAlta.setText(taulaModelProveidor.getModel().getValueAt(i, 1).toString());\n modNomFis.setText(taulaModelProveidor.getModel().getValueAt(i, 2).toString());\n modCifNif.setText(taulaModelProveidor.getModel().getValueAt(i, 3).toString());\n modPais.setText(taulaModelProveidor.getModel().getValueAt(i, 4).toString());\n modPoblacio.setText(taulaModelProveidor.getModel().getValueAt(i, 5).toString());\n modDireccio.setText(taulaModelProveidor.getModel().getValueAt(i, 6).toString());\n modCp.setText((String)taulaModelProveidor.getModel().getValueAt(i, 7).toString());\n modTel.setText((String)taulaModelProveidor.getModel().getValueAt(i, 8).toString());\n modEmail.setText(taulaModelProveidor.getModel().getValueAt(i, 9).toString()); \n modWebsite.setText(taulaModelProveidor.getModel().getValueAt(i, 10).toString()); \n modCc.setText((String)taulaModelProveidor.getModel().getValueAt(i, 11).toString()); \n modDescompte.setText((String)taulaModelProveidor.getModel().getValueAt(i, 12).toString()); \n modNotes.setText(taulaModelProveidor.getModel().getValueAt(i, 13).toString());\n modEntrega.setText(taulaModelProveidor.getModel().getValueAt(i, 14).toString());\n modPorts.setText(taulaModelProveidor.getModel().getValueAt(i, 15).toString());\n modExpo.setText(taulaModelProveidor.getModel().getValueAt(i, 16).toString());\n \n \n modNomCom.setEnabled(true);\n modDataAlta.setEnabled(false);\n modNomFis.setEnabled(true);\n modCifNif.setEnabled(true);\n modPais.setEnabled(true);\n modPoblacio.setEnabled(true);\n modDireccio.setEnabled(true);\n modCp.setEnabled(true);\n modTel.setEnabled(true);\n modEmail.setEnabled(true);\n modWebsite.setEnabled(true);\n modCc.setEnabled(true); \n modDescompte.setEnabled(true); \n modNotes.setEnabled(true);\n modEntrega.setEnabled(true);\n modPorts.setEnabled(true);\n modExpo.setEnabled(true);\n \n \n \n String data = (taulaModelProveidor.getModel().getValueAt(i, 1).toString());\n indexupdate=0;\n for(int x = 0; data != (taulaModelProveidor.getModel().getValueAt(x, 1).toString()); x++){\n indexupdate++;\n }\n }\n //Si no hem seleccionat cap fila resetejem els jtextfields i els desactivem\n else{\n modNomCom.setText(\"\");\n modDataAlta.setText(\"\");\n modNomFis.setText(\"\");\n modCifNif.setText(\"\");\n modPais.setText(\"\");\n modPoblacio.setText(\"\");\n modDireccio.setText(\"\");\n modCp.setText(\"\");\n modTel.setText(\"\");\n modEmail.setText(\"\");\n modWebsite.setText(\"\");\n modCc.setText(\"\"); \n modDescompte.setText(\"\"); \n modNotes.setText(\"\");\n modEntrega.setText(\"\");\n modPorts.setText(\"\");\n modExpo.setText(\"\");\n \n \n modNomCom.setEnabled(false);\n modDataAlta.setEnabled(false);\n modNomFis.setEnabled(false);\n modCifNif.setEnabled(false);\n modPais.setEnabled(false);\n modPoblacio.setEnabled(false);\n modDireccio.setEnabled(false);\n modCp.setEnabled(false);\n modTel.setEnabled(false);\n modEmail.setEnabled(false);\n modWebsite.setEnabled(false);\n modCc.setEnabled(false); \n modDescompte.setEnabled(false); \n modNotes.setEnabled(false);\n modEntrega.setEnabled(false);\n modPorts.setEnabled(false);\n modExpo.setEnabled(false);\n \n \n }\n\n //Sempre que cliquem la taula desactivem el botó d'actualitzar fins que no es canvien els valors dels jtextfields\n btn_actualitzar.setEnabled(false);\n }",
"@Override\n\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\tint id = Integer.parseInt((String) pidDropDown.getSelectedItem());\n\t\t\t\t\t\n\t\t\t\t\tfor (Patient p : plist) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (id == p.id) {\n\n\t\t\t\t\t\t\tpNametxt.setText(p.name);\n\t\t\t\t\t\t\tpAgetxt.setText(Integer.toString(p.age));\n\t\t\t\t\t\t\tpWeighttxt.setText(Integer.toString(p.weight));\n\t\t\t\t\t\t\tpDoctortxt.setText(p.doctor);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// and populate the GUI with proper details\n\n\t\t\t\t}",
"protected void updateSentence() {\n int iVariable = 0;\n for ( Iterator<Widget> iter = widgets.iterator(); iter.hasNext(); ) {\n Widget wid = iter.next();\n if ( wid instanceof DSLVariableEditor ) {\n sentence.getValues().set( iVariable++,\n ( (DSLVariableEditor) wid ).getSelectedValue() );\n }\n }\n this.setModified( true );\n }",
"public void valueChanged(ListSelectionEvent e){\n\t\tif(e.getValueIsAdjusting()) return;\n\t\t\n\t\t//\tget selected DataObjects\n\t\tclear();\n\t\taddAll(list != null ? JBNDUtil.castArray(list.getSelectedValues(), DataObject.class) : \n\t\t\tJBNDSwingUtil.selectedRecords(table));\n\t}",
"public void put_The_Details_Of_Store_One_On_GUI()\n\t{\n\t\t/* The Expected ArrayList<Object> --->\n\t\t * Index 0 = First Store ID \n\t\t * Index 1 = Quarter Report - First Store \n\t\t * Index 2 = Quantity Of Order - First Store\n\t\t * Index 3 = Type Of Product In Order - First Store\n\t\t * Index 4 = Quantity Of Each Product Type In Order - First Store\n\t\t * Index 5 = The Revenue Of Store - First Store\n\t\t * Index 6 = The Number Of Complaint - First Store\n\t\t * Index 7 = Number Of Client That Fill Survey - First Store\n\t\t * Index 8 = Total Average Of Survey Answer - First Store \n\t\t * */\n\t\t\n\t\tthis.txtStoreID_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(0)));\n\t\tthis.txtNumOfQuarter_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(1)));\n\t\tthis.txtQuantityOfOrder_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(2)));\n\t\tset_List_Of_Product_Type_Of_Store_One();\n\t\tthis.txtRevenuOfStore_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(5)));\n\t\tthis.txtNumberOfComplaint_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(6)));\n\t\tthis.txtNumberOfClientInSurvey_1.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(7)));\n\t\t\n\t\tdouble Total_Avearge = Double.parseDouble(new DecimalFormat(\"##.###\").format(CompanyManagerUI.Object_From_Comparing_For_Store_1.get(8)));\n\t\tthis.txtTotalAverageInSurvey_1.setText(String.valueOf(Total_Avearge));\n\t}",
"@Override\r\n\tpublic synchronized void refresh(TituloDeNoticia[] titulos) {\n\t\tif(titulos != null) {\r\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tlistModel.clear();\r\n//\t\t\t listField.setModel(listModel);\r\n\t\t\t\t\tlistField.setListData(titulos);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t \r\n\t\t\t//listField = new JList<TituloDeNoticia>(titulos);\r\n\t\t\tSystem.out.println(listField.getModel().toString());\r\n\t\t}\r\n//\t\tframe.repaint();\r\n\t}",
"public void saveInput() \n {\n for (int i = 0; i < 10; i++) \n userInput[i] = textFields[i].getText(); \n }",
"public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }",
"public void fillFieldValues(List<NeuronUpdateRule> ruleList) {\n\n NakaRushtonRule neuronRef = (NakaRushtonRule) ruleList.get(0);\n\n // (Below) Handle consistency of multiple selections\n\n // Handle Time Constant\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getTimeConstant\"))\n tfTimeConstant.setText(SimbrainConstants.NULL_STRING);\n else\n tfTimeConstant\n .setText(Double.toString(neuronRef.getTimeConstant()));\n\n // Handle Semi-Saturation Constant\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getSemiSaturationConstant\"))\n tfSemiSaturation.setText(SimbrainConstants.NULL_STRING);\n else\n tfSemiSaturation.setText(Double.toString(neuronRef\n .getSemiSaturationConstant()));\n\n // Handle Steepness\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getSteepness\"))\n tfSteepness.setText(SimbrainConstants.NULL_STRING);\n else\n tfSteepness.setText(Double.toString(neuronRef.getSteepness()));\n\n // Handle Noise\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getAddNoise\"))\n tsNoise.setNull();\n else\n tsNoise.setSelected(neuronRef.getAddNoise());\n\n // Handle Use Adaptation\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getUseAdaptation\"))\n tsUseAdaptation.setNull();\n else\n tsUseAdaptation.setSelected(neuronRef.getUseAdaptation());\n\n // Handle Adaptation Time\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getAdaptationTimeConstant\"))\n tfAdaptationTime.setText(SimbrainConstants.NULL_STRING);\n else\n tfAdaptationTime.setText(Double.toString(neuronRef\n .getAdaptationTimeConstant()));\n\n // Handle Adaptation Parameter\n if (!NetworkUtils.isConsistent(ruleList, NakaRushtonRule.class,\n \"getAdaptationParameter\"))\n tfAdaptationParam.setText(SimbrainConstants.NULL_STRING);\n else\n tfAdaptationParam.setText(Double.toString(neuronRef\n .getAdaptationParameter()));\n\n // Use Adaptation\n checkUsingAdaptation();\n\n randTab.fillFieldValues(getRandomizers(ruleList));\n\n }",
"private void update(){\n\t\tIterator it = lList.iterator();\r\n\t\tString out=\"\"; // it used for collecting all members\r\n\t\tint count = 0;\r\n\t\twhile (it.hasNext()){\r\n\t\t\tObject element = it.next();\r\n\t\t\tout += \"\\nPERSON \" + count + \"\\n\";\r\n\t\t\tout += \"=============\\n\";\r\n\t\t\tout += element.toString();\r\n\t\t\t++count;\r\n\t\t}\t\t\r\n\t\toutputArea.setText(out); \r\n\t}",
"public void editDataField(Stage primaryStage) {\n String title = \"Edit Data Field of Existing Farm\";\n VBox vbox = vboxFormat();\n\n Label title1 = new Label(\"Input Data Details\");\n title1.setFont(new Font(\"Arial\", 15));\n\n HBox hbox1 = hboxFormat();\n Label direction1 = new Label(\"Farm ID\");\n direction1.setFont(new Font(\"Arial\", 12));\n\n\n // Update farm list\n farms = FXCollections.observableList(report.farmIDlog());\n\n\n\n ComboBox<String> farmID = new ComboBox<String>(farms);\n Button next = buttonFormat(\"Next\", 3);\n hbox1.getChildren().addAll(direction1, farmID, next);\n\n HBox hbox2 = hboxFormat();\n Label direction2 = new Label(\"Date (Month / Day / Year)\");\n direction2.setFont(new Font(\"Arial\", 12));\n ComboBox<String> month = new ComboBox<String>(months);\n ComboBox<String> day = new ComboBox<String>(days);\n TextField year = new TextField();\n hbox2.getChildren().addAll(direction2, month, day, year);\n\n HBox hbox3 = hboxFormat();\n Label direction3 = new Label(\"Milk Weight (lbs)\");\n direction3.setFont(new Font(\"Arial\", 12));\n TextField milkWeight = new TextField();\n hbox3.getChildren().addAll(direction3, milkWeight);\n\n // Add done button\n Button done = buttonFormat(\"Done\", 3);\n // TODO create new data field in farm class based on selections\n // done.setOnActions(e -> addDataField(farmID.getSelection(),\n // month.getSelection(),\n // year.getSelection(), year.getSelection(), milkWeight.getText());\n\n done.setOnMousePressed(e -> {\n report.addData(farmID.getValue(), Integer.parseInt(day.getValue()),\n Integer.parseInt(month.getValue()), Integer.parseInt(year.getText()),\n Long.parseLong(milkWeight.getText()));\n addButtonClicked(farmID.getValue(), Integer.parseInt(day.getValue()),\n Integer.parseInt(month.getValue()), Integer.parseInt(year.getText()),\n Long.parseLong(milkWeight.getText()));\n });\n\n vbox.getChildren().addAll(title1, hbox1, hbox2, hbox3, done);\n showDialogWindow(primaryStage, vbox, title, done);\n updateTable();\n }",
"private void initComponentsMeus(){\n taulaModelProveidor.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent e) {\n // Si seleccionem un proveidor posem les seues dades als jtextfields corresponents i els activem \n int i=taulaModelProveidor.getSelectedRow();\n if(i!=-1){\n \n //modNomCom.setText(Inici.llistaProveidors.get(i).get2nomCom());\n modNomCom.setText(taulaModelProveidor.getModel().getValueAt(i, 0).toString());\n modDataAlta.setText(taulaModelProveidor.getModel().getValueAt(i, 1).toString());\n modNomFis.setText(taulaModelProveidor.getModel().getValueAt(i, 2).toString());\n modCifNif.setText(taulaModelProveidor.getModel().getValueAt(i, 3).toString());\n modPais.setText(taulaModelProveidor.getModel().getValueAt(i, 4).toString());\n modPoblacio.setText(taulaModelProveidor.getModel().getValueAt(i, 5).toString());\n modDireccio.setText(taulaModelProveidor.getModel().getValueAt(i, 6).toString());\n modCp.setText((String)taulaModelProveidor.getModel().getValueAt(i, 7).toString());\n modTel.setText((String)taulaModelProveidor.getModel().getValueAt(i, 8).toString());\n modEmail.setText(taulaModelProveidor.getModel().getValueAt(i, 9).toString()); \n modWebsite.setText(taulaModelProveidor.getModel().getValueAt(i, 10).toString()); \n modCc.setText((String)taulaModelProveidor.getModel().getValueAt(i, 11).toString()); \n modDescompte.setText((String)taulaModelProveidor.getModel().getValueAt(i, 12).toString()); \n modNotes.setText(taulaModelProveidor.getModel().getValueAt(i, 13).toString());\n modEntrega.setText(taulaModelProveidor.getModel().getValueAt(i, 14).toString());\n modPorts.setText(taulaModelProveidor.getModel().getValueAt(i, 15).toString());\n modExpo.setText(taulaModelProveidor.getModel().getValueAt(i, 16).toString());\n \n \n modNomCom.setEnabled(true);\n modDataAlta.setEnabled(false);\n modNomFis.setEnabled(true);\n modCifNif.setEnabled(true);\n modPais.setEnabled(true);\n modPoblacio.setEnabled(true);\n modDireccio.setEnabled(true);\n modCp.setEnabled(true);\n modTel.setEnabled(true);\n modEmail.setEnabled(true);\n modWebsite.setEnabled(true);\n modCc.setEnabled(true); \n modDescompte.setEnabled(true); \n modNotes.setEnabled(true);\n modEntrega.setEnabled(true);\n modPorts.setEnabled(true);\n modExpo.setEnabled(true);\n \n \n \n String data = (taulaModelProveidor.getModel().getValueAt(i, 1).toString());\n indexupdate=0;\n for(int x = 0; data != (taulaModelProveidor.getModel().getValueAt(x, 1).toString()); x++){\n indexupdate++;\n }\n }\n //Si no hem seleccionat cap fila resetejem els jtextfields i els desactivem\n else{\n modNomCom.setText(\"\");\n modDataAlta.setText(\"\");\n modNomFis.setText(\"\");\n modCifNif.setText(\"\");\n modPais.setText(\"\");\n modPoblacio.setText(\"\");\n modDireccio.setText(\"\");\n modCp.setText(\"\");\n modTel.setText(\"\");\n modEmail.setText(\"\");\n modWebsite.setText(\"\");\n modCc.setText(\"\"); \n modDescompte.setText(\"\"); \n modNotes.setText(\"\");\n modEntrega.setText(\"\");\n modPorts.setText(\"\");\n modExpo.setText(\"\");\n \n \n modNomCom.setEnabled(false);\n modDataAlta.setEnabled(false);\n modNomFis.setEnabled(false);\n modCifNif.setEnabled(false);\n modPais.setEnabled(false);\n modPoblacio.setEnabled(false);\n modDireccio.setEnabled(false);\n modCp.setEnabled(false);\n modTel.setEnabled(false);\n modEmail.setEnabled(false);\n modWebsite.setEnabled(false);\n modCc.setEnabled(false); \n modDescompte.setEnabled(false); \n modNotes.setEnabled(false);\n modEntrega.setEnabled(false);\n modPorts.setEnabled(false);\n modExpo.setEnabled(false);\n \n \n }\n\n //Sempre que cliquem la taula desactivem el botó d'actualitzar fins que no es canvien els valors dels jtextfields\n btn_actualitzar.setEnabled(false);\n }\n }); \n }",
"public formAnalisis() {\n initComponents();\n// List<Double> testData = IntStream.range(1, 100)\n// .mapToDouble(d -> d)\n// .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);\n// deskriptif stat = new deskriptif();\n// stat.setNameDesc(\"foo\");\n// list1.add(stat);\n// testData.forEach((v) -> stat.addValue(v)); \n }",
"public void valueChanged(ListSelectionEvent lse) {\r\n if(!lse.getValueIsAdjusting()) {\r\n int rowIndex = model.getMinSelectionIndex();\r\n \r\n if(rowIndex == -1) {\r\n return ;\r\n }\r\n\r\n for (int i = 0; i < record.length; i++) {\r\n record[i] = \r\n (String)tableModel.getValueAt(rowIndex, i);\r\n }\r\n\r\n nameTf.setText(record[0]);\r\n locationTf.setText(record[1]);\r\n specialtiesTf.setText(record[2]);\r\n sizeTf.setText(record[3]);\r\n rateTf.setText(record[4]);\r\n ownerTf.setText(record[5]);\r\n recNoTf.setText(record[6]);\r\n updateStatus(\"Choose record.\");\r\n }\r\n }",
"public void changeFields() throws Exception {\n jTextField1.setText(String.valueOf(article.getItemCode()));\n jTextField2.setText(article.getName());\n jTextField3.setText(String.valueOf(article.getBrandCode()));\n jTextField4.setText(String.valueOf(article.getSalePrice()));\n jTextField5.setText(String.valueOf(article.getCostPrice()));\n jTextField6.setText(String.valueOf(article.getStock()));\n jTextField7.setText(article.getObservation());\n jTextField8.setText(String.valueOf(article.getHeadingCode()));\n \n }",
"public void update(Observable obj, Object arg ){\n\t\trepaint();\n\t\tif(theModel.getSelectedVertexIndex() == -1){\n\t\t\ttextField.setText(\"\");\n\t\t\ttextField.setEditable(false);\n\t\t}\n\t}",
"@Override\n\tpublic void onEvent(Event ev) throws Exception {\n\n\t\tString[] valores = new String[listTx.size()];\n\t\tfor (int i = 0; i < listTx.size(); i++) {\n\t\t\tInputElement tx = (InputElement) listTx.get(i);\n\t\t\tObject valor = tx.getRawValue();\n\t\t\tif (valor == null) {\n\t\t\t\tvalor = \"\";\n\t\t\t}\n\t\t\tvalores[i] = (valor + \"\").trim();\n\t\t}\n\t\tthis.be.setValores(valores);\n\t\tthis.be.refreshModeloGrid();\n\n\t}",
"public HW4() throws SQLException {\r\n initComponents();\r\n\r\n label = true;\r\n finalCat = new ArrayList<>();\r\n fromCheckin = \"\";\r\n fromCheckinHour = \"\";\r\n toCheckin = \"\";\r\n toCheckinHour = \"\";\r\n operationCheckin = \"\";\r\n valueCheckin = \"\";\r\n operationStar = \"\";\r\n operationVote = \"\";\r\n valueStar = \"\";\r\n valueVote = \"\";\r\n fromReview = \"\";\r\n toReview = \"\";\r\n memberSince = \"\";\r\n operReviewCount = \"\";\r\n operNoOfFriends = \"\";\r\n operAvgStar = \"\";\r\n valueReviewCount = \"\";\r\n valueNoOfFriends = \"\";\r\n valueAvgStar = \"\";\r\n andOrAttribute = \"\";\r\n Address = \"\";\r\n proximity = \"\";\r\n searchFor = \"\";\r\n latitude = 0.0;\r\n longitude = 0.0;\r\n operNoOfVotes = \"\";\r\n valueNoOfVotes = \"\";\r\n\r\n// checkinList = new ArrayList<CheckinDetail>();\r\n mongoClient = new MongoClient(\"localhost\", 27017);\r\n memberSinceDateBox.setEnabled(false);\r\n reviewCountComboBox.setEnabled(false);\r\n reviewCountValueTextField.setEnabled(false);\r\n numberOfFriendsComboBox.setEnabled(false);\r\n numberOfFriendsValueTextField.setEnabled(false);\r\n avgStarComboBox.setEnabled(false);\r\n avgStarValueTextField.setEnabled(false);\r\n andOrComboBox.setEnabled(false);\r\n model = (DefaultListModel) jList1.getModel();\r\n\r\n checkinValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueCheckin = checkinValueTextField.getText();\r\n //System.out.println(valueCheckin);\r\n }\r\n\r\n });\r\n starsValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueStar = starsValueTextField.getText();\r\n //System.out.println(valueStar);\r\n }\r\n\r\n });\r\n\r\n votesValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueVote = votesValueTextField.getText();\r\n //System.out.println(valueVote);\r\n }\r\n\r\n });\r\n reviewCountValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueReviewCount = reviewCountValueTextField.getText();\r\n //System.out.println(valueCheckin);\r\n }\r\n\r\n });\r\n\r\n numberOfFriendsValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueNoOfFriends = numberOfFriendsValueTextField.getText();\r\n //System.out.println(valueCheckin);\r\n }\r\n\r\n });\r\n\r\n avgStarValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueAvgStar = avgStarValueTextField.getText();\r\n //System.out.println(valueCheckin);\r\n }\r\n\r\n });\r\n\r\n noOfVotesValueTextField.getDocument().addDocumentListener(new DocumentListener() {\r\n\r\n @Override\r\n public void insertUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void removeUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n @Override\r\n public void changedUpdate(DocumentEvent e) {\r\n text();\r\n }\r\n\r\n public void text() {\r\n valueNoOfVotes = noOfVotesValueTextField.getText();\r\n System.out.println(valueNoOfVotes);\r\n }\r\n\r\n });\r\n\r\n //fromReview = ((JTextField) fromReviewDate.getDateEditor().getUiComponent()).getText();\r\n //System.out.println(fromReview);\r\n resultTable.addMouseListener(new java.awt.event.MouseAdapter() {\r\n @Override\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n\r\n int row = resultTable.rowAtPoint(evt.getPoint());\r\n int col = resultTable.columnAtPoint(evt.getPoint());\r\n DB dbReview = mongoClient.getDB(\"review\");\r\n DBCollection collReview = dbReview.getCollection(\"review\");\r\n JTable im = new JTable();\r\n DefaultTableModel reviewModel = new DefaultTableModel(0, 0);\r\n im.setModel(reviewModel);\r\n\r\n String header[] = new String[]{\"Name\", \"Review\"};\r\n reviewModel.setColumnIdentifiers(header);\r\n //im.setRowHeight(50);\r\n\r\n if (!memberSince.isEmpty() || !operReviewCount.isEmpty() || !operNoOfFriends.isEmpty() || !operAvgStar.isEmpty()\r\n || !valueReviewCount.isEmpty() || !valueNoOfFriends.isEmpty() || !valueAvgStar.isEmpty() || !andOrAttribute.isEmpty()) {\r\n \r\n \r\n if (row >= 0 && col == 0) {\r\n String tableValue = resultTable.getValueAt(row, col).toString();\r\n String name= resultTable.getValueAt(row, col+1).toString();\r\n \r\n BasicDBObject whereQuery = new BasicDBObject();\r\n whereQuery.put(\"user_id\", tableValue);\r\n DBCursor cursor = collReview.find(whereQuery);\r\n while (cursor.hasNext()) {\r\n Object[] rowReview = new Object[2];\r\n rowReview[0] =name;\r\n rowReview[1] = cursor.next().get(\"text\").toString();\r\n \r\n reviewModel.addRow(rowReview);\r\n }\r\n \r\n mydialog = new JDialog();\r\n mydialog.setSize(new Dimension(1000, 1000));\r\n mydialog.setTitle(\"Reviews By User\");\r\n mydialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); // prevent user from doing something else\r\n mydialog.add(im);\r\n mydialog.setVisible(true);\r\n mydialog.setResizable(true);\r\n\r\n// JOptionPane.showConfirmDialog(null,\r\n// getPanel(tableValue));\r\n }\r\n\r\n } else {\r\n\r\n if (row >= 0 && col == 0) {\r\n String tableValue = resultTable.getValueAt(row, col).toString();\r\n //String name= resultTable.getValueAt(row, col+1).toString();\r\n \r\n BasicDBObject whereQuery = new BasicDBObject();\r\n whereQuery.put(\"business_id\", tableValue);\r\n DBCursor cursor = collReview.find(whereQuery);\r\n while (cursor.hasNext()) {\r\n Object[] rowReview = new Object[1];\r\n //rowReview[0] =name;\r\n rowReview[0] = cursor.next().get(\"text\").toString();\r\n \r\n reviewModel.addRow(rowReview);\r\n }\r\n mydialog = new JDialog();\r\n mydialog.setSize(new Dimension(1000, 1000));\r\n mydialog.setTitle(\"Reviews By User\");\r\n mydialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); // prevent user from doing something else\r\n mydialog.add(im);\r\n mydialog.setVisible(true);\r\n mydialog.setResizable(true);\r\n\r\n// JOptionPane.showConfirmDialog(null,\r\n// getPanel(tableValue));\r\n }\r\n }\r\n }\r\n });\r\n }",
"@Override\n public void update(java.util.Observable updatedModel, Object parametros) {\n if (parametros != Material_Modelo.ae_material_actual) {\n return;\n }\n AdministrarMaterial material = modelo.obtener_material_actual();\n \n if(material==null){\n this.jTextField_codigo.setText(\"\");\n this.jTextField_descripcion.setText(\"\");\n this.jTextField_paca.setText(\"\");\n this.jTextField_saca.setText(\"\");\n }else{\n this.jTextField_codigo.setText(material.getMaterial().getCodigo());\n if(modelo.obtener_errores().get(\"id\")!=null){\n this.jTextField_codigo.setBorder(BORDER_ERROR);\n this.jTextField_codigo.setToolTipText(modelo.obtener_errores().get(\"id\"));\n }\n else{\n this.jTextField_codigo.setBorder(BORDER_NOBORDER);\n this.jTextField_codigo.setToolTipText(null);\n }\n \n this.jTextField_descripcion.setText(material.getMaterial().getNombre());\n if(modelo.obtener_errores().get(\"nombre\")!=null){\n this.jTextField_codigo.setBorder(BORDER_ERROR);\n this.jTextField_codigo.setToolTipText(modelo.obtener_errores().get(\"nombre\"));\n }\n else{\n this.jTextField_codigo.setBorder(BORDER_NOBORDER);\n this.jTextField_codigo.setToolTipText(null);\n }\n \n if(material.getPrecioPaca()==0){\n this.jTextField_paca.setText(\"\");\n }\n else{\n this.jTextField_paca.setText(String.valueOf(material.getPrecioPaca()));\n }\n \n if(modelo.obtener_errores().get(\"paca\")!=null){\n this.jTextField_paca.setBorder(BORDER_ERROR);\n this.jTextField_paca.setToolTipText(modelo.obtener_errores().get(\"paca\"));\n }\n else{\n this.jTextField_paca.setBorder(BORDER_NOBORDER);\n this.jTextField_paca.setToolTipText(null);\n }\n \n if(material.getPrecioSaca()==0){\n this.jTextField_saca.setText(\"\");\n }\n else{\n this.jTextField_saca.setText(String.valueOf(material.getPrecioSaca()));\n }\n \n if(modelo.obtener_errores().get(\"saca\")!=null){\n this.jTextField_saca.setBorder(BORDER_ERROR);\n this.jTextField_saca.setToolTipText(modelo.obtener_errores().get(\"saca\"));\n }\n else{\n this.jTextField_saca.setBorder(BORDER_NOBORDER);\n this.jTextField_saca.setToolTipText(null);\n }\n }\n this.validate();\n \n \n if(modelo.obtener_mensaje()!=null){\n if (!modelo.obtener_mensaje().equals(\"\")) {\n JOptionPane.showMessageDialog(this, modelo.obtener_mensaje(), \"\", JOptionPane.INFORMATION_MESSAGE);\n modelo.colocar_mensaje(\"\");\n }\n }\n }",
"private void refreshData() {\n\t\tif (error == null) {\n\t\t\terror = \"\";\n\t\t}\n\t\terrorLabel.setText(error);\n\t\tif (error.trim().length() > 0) {\n\t\t\terror = \"\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Get instance of system\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t\n\t\t// Populate info\n\t\tlblItemname.setText(item.getName());\n\t\tlblItemPrice.setText(String.format(\"$%.2f\", item.getPrice()/100.0));\n\t\t\n\t\t\n\t\t// Populate list\n\t\tString prev = supplyList.getSelectedValue();\n\t\tlistModel.clear();\n\t\tIterator<Supply> its = item.getSupplies().iterator();\n\t\tSupply current;\n\t\twhile(its.hasNext()) {\n\t\t\tcurrent = its.next();\n\t\t\tlistModel.addElement(String.format(\"%.20s %.2f\", current.getSupplyType().getName(), current.getQuantity()));\n\t\t}\n\t\tif(prev != null) supplyList.setSelectedValue(prev, true);\n\t\t\n\t\t// Populate combo box\n\t\tprev = (String) ingredientsComboBox.getSelectedItem();\n\t\tingredientsComboBox.removeAllItems();\n\t\tIterator<SupplyType> itst = ftms.getSupplyTypes().iterator();\n\t\twhile(itst.hasNext()) {\n\t\t\tingredientsComboBox.addItem(itst.next().getName());\n\t\t}\n\t\tif(prev != null) ingredientsComboBox.setSelectedItem(prev);\n\t\t\n\t\t// Reset text field\n\t\tqtyTextField.setText(\"\");\n\t}",
"void updateModel() {\n\t\tfor (int i = 0; i < expressions.size(); ++i) {\n\t\t\tString expr = expressions.get(i);\n\t\t\tString result = \"\";\n\t\t\tif (expr.length() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tresult = executeExpr(expr, i);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tMessageDialogWrapper.showMessageDialog(debugGui, e.getMessage(), \"Error Compiling \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\tif (result == null)\n\t\t\t\t\tresult = \"\";\n\t\t\t} else {\n\t\t\t\tresult = \"\";\n\t\t\t}\n\t\t\tresult = result.replace('\\n', ' ');\n\t\t\tvalues.set(i, result);\n\t\t}\n\t\tfireTableDataChanged();\n\t}",
"public void updatedValues(List<Simbolo> symbolsUpdated){\n for(Simbolo s:symbolsUpdated){\n Nodo n=nodos.get(s.getId());\n n.setValue(s.getValor());\n Tooltip t = new Tooltip(n.getValue());\n Tooltip.install(n.getRectangle(), t);\n }\n \n }",
"@Override\r\n\tpublic void update(Observable observable, Object data) {\n\t\tgw = (GameWorld) data;\r\n\t\tIIterator itr = gw.getCollection().getIterator();\t\r\n\t\tString display = \"\";\r\n\t\twhile(itr.hasNext()){\r\n\t\t\tdisplay = display + itr.getNext().toString()+\"\\n\";\r\n\t\t}\r\n\t\tmyText.setText(display);\r\n\t\tthis.repaint();\r\n\t}",
"protected void updateDisplay() {\r\n setValue(Integer.toString(value.getValue()));\r\n }",
"@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tString name = ((JList) e.getSource()).getName();\n\t\tif (name.equals(\"pred\")){\n\t\t\tint selected = displayPred.getSelectedIndex();\n\t\t\tif (selected == -1)\n\t\t\t\tselected = 0;\n\t\t\tString loc = predParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tint selected = displayPrey.getSelectedIndex();\n\t\t\tString loc = preyParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t}\n\t}",
"public void put_The_Details_Of_Store_Two_On_GUI()\n\t{\n\t\t/* The Expected ArrayList<Object> --->\n\t\t * Index 0 = Second Store ID \n\t\t * Index 1 = Quarter Report - Second Store \n\t\t * Index 2 = Quantity Of Order - Second Store\n\t\t * Index 3 = Type Of Product In Order - Second Store\n\t\t * Index 4 = Quantity Of Each Product Type In Order - Second Store\n\t\t * Index 5 = The Revenue Of Store - Second Store\n\t\t * Index 6 = The Number Of Complaint - Second Store\n\t\t * Index 7 = Number Of Client That Fill Survey - Second Store\n\t\t * Index 8 = Total Average Of Survey Answer - Second Store \n\t\t * */\n\t\tthis.txtStoreID_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(0)));\n\t\tthis.txtNumOfQuarter_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(1)));\n\t\tthis.txtQuantityOfOrder_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(2)));\n\t\tset_List_Of_Product_Type_Of_Store_Two();\n\t\tthis.txtRevenuOfStore_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(5)));\n\t\tthis.txtNumberOfComplaint_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(6)));\n\t\tthis.txtNumberOfClientInSurvey_2.setText(String.valueOf(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(7)));\n\t\t\n\t\tdouble Total_Average = Double.parseDouble(new DecimalFormat(\"##.###\").format(CompanyManagerUI.Object_From_Comparing_For_Store_2.get(8)));\n\t\tthis.txtTotalAverageInSurvey_2.setText(String.valueOf(Total_Average));\n\t}",
"public void MostrarValores() {\r\n Nodo recorrido = UltimoValorIngresado;\r\n\r\n while (recorrido != null) {\r\n Lista += recorrido.informacion + \"\\n\";\r\n recorrido = recorrido.siguiente;\r\n }\r\n\r\n JOptionPane.showMessageDialog(null, Lista);\r\n Lista = \"\";\r\n }",
"public InputPanel(String[] variables)\n {\n this.variables = variables;\n this.textFields = new JTextField[variables.length];\n\n GridLayout gl = new GridLayout(20, 2);\n setLayout(gl);\n\n for (int i = 0; i < variables.length; ++i)\n {\n add(new JLabel(variables[i]));\n\n textFields[i] = new JTextField(50);\n add(textFields[i]);\n }\n\n JButton saveBtn = new JButton((\"Save!\"));\n JButton cancelBtn = new JButton(\"Cancel!\");\n\n add(saveBtn);\n add(cancelBtn);\n\n saveBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n // Validate here\n\n Main.processData(getData());\n }\n });\n\n cancelBtn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n Main.ignoreData();\n }\n });\n\n }",
"public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}",
"private void actualizarLista(ArrayList<Producto> p2) {\n\t\tString[] str = new String[p2.size()];\n\t\tfor (int i = 0; i < p2.size(); i++) {\n\t\t\tstr[i] = p2.get(i).get_nombre();\n\t\t}\n\t\tstr.clone();\n\t\tlistaProductos.setModel(new javax.swing.AbstractListModel<String>() {\n\t\t\tString[] strings = str.clone();\n\n\t\t\tpublic int getSize() {\n\t\t\t\treturn strings.length;\n\t\t\t}\n\n\t\t\tpublic String getElementAt(int i) {\n\t\t\t\treturn strings[i];\n\t\t\t}\n\t\t});\n\t\t/*informacion.setText(\"Precio:\\t\" + p2.get(0).get_nombre() + \"\\n\"\n\t\t\t\t+ \"Plataforma:\\t\" + p2.get(0).get_genero() + \"\\nPrecio:\\t\"\n\t\t\t\t+ Double.toString(p2.get(0).get_precio()));*/\n\t\tlistaProductos.addListSelectionListener(new ListSelectionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tif (!e.getValueIsAdjusting()) {\n\t\t\t\t\tinformacion.setText(obtenerInfo(listaProductos.getSelectedValue().toString()));\n\t\t\t\t\ttextoValoraciones.setText(obtenerValoraciones(listaProductos.getSelectedValue().toString()));\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t}",
"private void initTextFields()\n\t{\n\t\talpha_min_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getLowValue()));\n\t\talpha_max_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getHighValue()));\n\t\teta_min_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getLowValue()));\n\t\teta_max_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getHighValue()));\n\t\tkappa_min_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getLowValue()));\n\t\tkappa_max_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getHighValue()));\n\t\t\n\t\ttry {\n\t\t\t// Add listener for focus changes.\n//\t\t\tnumberOfDatasets_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDatasets(null);\n//\t\t\t }\n//\t\t\t});\n//\t\t\tnumberOfDivisions_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDivisions(null);\n//\t\t\t }\n//\t\t\t});\n\t\t\t\n\t\t\t// Set initial values.\n\t\t\tnumberOfDatasetsToGenerate\t= Integer.parseInt(numberOfDatasets_textfield.getText());\n\t\t\tnumberOfDivisions\t\t\t= Integer.parseInt(numberOfDivisions_textfield.getText());\n\t\t\t\n\t\t\t// Disable number of divisions by default (since random sampling is enabled by default).\n\t\t\tnumberOfDivisions_textfield.setDisable(true);\n\t\t}\n\t\t\n\t\tcatch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}",
"public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }",
"private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n JTextField inputCell = (JTextField) e.getSource();\n String[] operands = inputCell.getText().split(\" \");\n InterpreterDesignPattern interpreter = new InterpreterDesignPattern();\n\n if (listenerF == null) {\n listenerF = new ValueViewObserverF(equationView.getValView());\n }\n\n //following line fetches current expression from the jTextField where user made changes\n ((ValueViewObserverF) listenerF).setExpression(inputCell.getText());\n\n //This line unregisters listenerF from unwanted subjects\n equationView.getValView().removeObserver(listenerF);\n\n //This line dynamically registers listenerF object in jTextFields according to cell labels in operands\n equationView.getValView().registerObserver(listenerF, operands);\n\n //Following line evaluates an expression entered by user and displays that result in value view\n equationView.getValView().getjTextField7().setText(interpreter.interpretPostfixExpression(\n equationView.getInputString(operands)));\n\n //Following line will store a state of the Equation View GUI, after the user changes an expression.\n equationView.createMemento();\n }",
"private void updateText() {\n pers = new PersonManager();\n //Is this every contact or a single person?\n if (this.surnameCombo.isVisible()) {\n if (this.personValid()) {\n Person myPers = getPerson();\n if (pers.getCountryList(myPers).size() > 0) {\n contactModel.removeData();\n contactModel.add(new PersonManager().getCountryList(myPers));\n }\n }\n } else {\n contactModel.removeData();\n contactModel.add(myCountries.getContactedCountryList());\n }\n }",
"protected void updateTypeList() {\n\t sequenceLabel.setText(\"Sequence = \" + theDoc.theSequence.getId());\n\t typeList.setListData(theDoc.theTypes);\n\t signalList.setListData(nullSignals);\n\t valueField.setEnabled(false);\n\t valueList.setEnabled(false);\n }",
"public void valueChanged(ListSelectionEvent e)\n\t\t\t{\n\t\t\t\tint row = recipeTable.getSelectedRow();\n\t\t\t\tif(row == -1) //in case the table has not been built\n\t\t\t\t\treturn;\n\t\t\t\t//get the name of the selected recipe\n\t\t\t\tString nameSelected = (String)recipeTable.getValueAt(row, 1);\n\t\t\t\t//using the name of recipe get the JTextArea & updates the txt box\n\t\t\t\ttxtView = entryMap.get(nameSelected);\n\t\t\t\t//redraw the scroll pane with new txt box\n\t\t\t\trecipeViewer.repaint();\n\t\t\t}",
"public frmFanArtist() {\n setTitle(\"Fan Your Artist!\");\n initComponents();\n FanController.updateFormData(slctArtist, jTable1);\n jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent event) {\n // do some actions here, for example\n // print first column value from selected row\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }\n });\n }",
"void valueChanged(CalcModel model);",
"void valueChanged(CalcModel model);",
"@Override\n public void run() {\n for (int i = 0; i < nameslist.length; i++) {\n listModel.addElement(nameslist[i]);\n }\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 }",
"public void updatePropertyFields()\n {\n amountLabel .setText(retrieveText(\"AmountLabel\", amountLabel));\n reasonCodeLabel .setText(retrieveText(\"ReasonCodeLabel\", reasonCodeLabel));\n paidToLabel .setText(retrieveText(\"PaidToLabel\", paidToLabel));\n employeeIDLabel .setText(retrieveText(\"EmployeeIDLabel\", employeeIDLabel));\n addressLine1Label.setText(retrieveText(\"AddressLine1Label\", addressLine1Label));\n addressLine2Label.setText(retrieveText(\"AddressLine2Label\", addressLine2Label));\n addressLine3Label.setText(retrieveText(\"AddressLine3Label\", addressLine3Label));\n approvalCodeLabel.setText(retrieveText(\"ApprovalCodeLabel\", approvalCodeLabel));\n commentLabel .setText(retrieveText(\"CommentLabel\", commentLabel));\n\n amountField .setLabel(amountLabel);\n reasonCodeField .setLabel(reasonCodeLabel);\n paidToField .setLabel(paidToLabel);\n employeeIDField .setLabel(employeeIDLabel);\n addressLine1Field.setLabel(addressLine1Label);\n addressLine2Field.setLabel(addressLine2Label);\n addressLine3Field.setLabel(addressLine3Label);\n approvalCodeField.setLabel(approvalCodeLabel);\n commentField .setLabel(commentLabel);\n }",
"public void updateView()\n {\n int selectionCount = selection.getElementSelectionCount();\n\n // If only one item selected, enable & update the\n // text boxes and pull downs with values.\n if (selectionCount == 1) {\n // preserve selected state if a whole text field is selected\n Text text = WindowUtil.getFocusedText();\n boolean restoreSel = false;\n if ((text != null) &&\n (text.getSelectionCount() == text.getCharCount()))\n {\n restoreSel = true;\n }\n\n // get the selected item\n Iterator<FrameElement> iter =\n selection.getSelectedElementsIterator();\n\n // For each selected object, which there is only one.\n FrameElement elt = iter.next();\n\n if (elt instanceof IWidget) {\n IWidget widget = (IWidget) elt;\n\n view.useParameters(FrameEditorView.USE_SINGLE_SELECT);\n view.updateWidgetProperties(widget);\n }\n else if (elt instanceof FrameElementGroup) {\n FrameElementGroup eltGroup = (FrameElementGroup) elt;\n\n view.useParameters(FrameEditorView.USE_GROUP_SELECT);\n view.updateEltGroupProperties(eltGroup);\n }\n\n // Restore the selection state\n if (restoreSel) {\n text.selectAll();\n }\n }\n else if (selectionCount > 1) {\n // TODO: on multi selection, some values are left enabled\n // We need to set these to something or disable them.\n view.useParameters(FrameEditorView.USE_MULTI_SELECT);\n }\n else {\n view.useParameters(FrameEditorView.USE_NONE);\n view.updateFrameProperties(frame, false);\n }\n }",
"private void setDataInFields() \n {\n quantityTxtFld.setText(farmer.getCropQuantity()+\"\");\n quantityTxtFld.setEnabled(false);\n }",
"@Override\r\n\tpublic void update() {\r\n\t\t// get the first element and set the values according to its\r\n\t\t// information\r\n\t\tIqmDataBox iqmDataBox = (IqmDataBox) this.workPackage.getSources().get(0);\r\n\t\tPlanarImage pi = iqmDataBox.getImage();\r\n\r\n\t\tjFormattedTextFieldOldWidth.setValue(pi.getWidth());\r\n\t\tjFormattedTextFieldOldHeight.setValue(pi.getHeight());\r\n\r\n\t\tint left = ((Number) jSpinnerLeft.getValue()).intValue();\r\n\t\tint right = ((Number) jSpinnerRight.getValue()).intValue();\r\n\t\tint top = ((Number) jSpinnerTop.getValue()).intValue();\r\n\t\tint bottom = ((Number) jSpinnerBottom.getValue()).intValue();\r\n\r\n\t\t// Set image dependent initial values;\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pi.getWidth() + left + right);\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.setValue(pi.getHeight() + top + bottom);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\t\t\r\n\t\tif (buttConst.isSelected()){\r\n\t\t\ttbConst.setTitleColor(Color.BLACK);\r\n\t\t\tjLabelConst.setEnabled(true);\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\ttbConst.setTitleColor(Color.GRAY);\r\n\t\t\tjLabelConst.setEnabled(false);\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\t\tthis.repaint(); //because of tb TitledBorder cahnge of color\r\n\t\t\r\n\r\n\t\tthis.updateParameterBlock();\r\n\t\tthis.setParameterValuesToGUI();\r\n\t}",
"public void editarProyecto(Connection conn) {\n\t\t\t\tArrayList<APair<String,String>> compulsoryVars = new ArrayList<>();\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtIdProyecto\", \"Id del proyecto\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtIdGrupo\",\"Id del grupo\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String> (\"txtNombre\",\"Nombre del proyecto\"));\n\t\t\t\tcompulsoryVars.add(new APair<String,String>(\"txtDescripcion\", \"Descripcion del proyecto\"));\n\t\t\t\t\n\t\t\t\tint nError = 0;\n\t\t\t\tfor (APair<String, String> i : compulsoryVars) {\n\t\t\t\t\tJTextField tempC = (JTextField) ObjectMapper.getComponentByName(i.getIndex(), componentMap);\n\t\t\t\t\tif(tempC != null) {\n\t\t\t\t\tif(tempC.getText().isEmpty()) {\n\t\t\t\t\t\tSystem.err.println(\"Error \" + String.valueOf(++nError) + \": No ha indicado ninguna respuesta en \" + i.getValue());\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t//Comproba si el formato usado es el correcto\n\t\t\t\tArrayList<APair<String,ConcreteText>> formatVars = new ArrayList<>();\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtIdProyecto\",new ConcreteText(\"Id del proyecto\",TextTypes.ID)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtIdGrupo\",new ConcreteText(\"Id del grupo\",TextTypes.ID)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtNombre\",new ConcreteText(\"Nombre del grupo\",TextTypes.NAME)));\n\t\t\t\tformatVars.add(new APair<String,ConcreteText>(\"txtDescripcion\",new ConcreteText(\"Descripcion del proyecto\",TextTypes.DESCRIPTION)));\n\n\t\t\t\tfor (APair<String, ConcreteText> i : formatVars) {\n\t\t\t\t\tJTextField tempC = (JTextField) ObjectMapper.getComponentByName(i.getIndex(), componentMap);\n\t\t\t\t\tif(tempC!=null) {\n\t\t\t\t\tif(tempC.getText().isEmpty() && !ConcreteText.isValid(tempC.getText(), i.getValue().getTextType())) {\n\t\t\t\t\t\tSystem.err.println(\"Error \" + String.valueOf(++nError) + \": No ha indicado ninguna respuesta en \" + i.getValue());\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Si no hay errores lo enviamos\n\t\t\t\t\tString proyectoID = txtIdProyecto.getText();\n\t\t\t\t\tString grupoID = txtIdGrupo.getText();\n\t\t\t\t\tString nombreProyecto = txtNombre.getText();\n\t\t\t\t\n\t\t\t\t\tif(nError==0) {\n\t\t\t\t\t\tServerUserFunctionality.updateProyect(conn, proyectoID, new String[] {grupoID, nombreProyecto});\n\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Proyecto actualizado con exito\", \"ACTUALIZADO\", 1);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t}",
"private void updateSpellList() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultListModel model = new DefaultListModel();\n \n for(int i = 0 ; i < spells.size(); i++){\n try{\n model.addElement(spells.get(i).getSpellName());\n }catch(Exception e){\n \n }\n }\n spellManagerList.setModel(model);\n \n \n }",
"public void updateJList() {\n list.setModel(toListModel(auctionItemList));\n }",
"public void updateVehicleID(int value) {\n ObservableList<Integer> vehIDs = FXCollections.observableArrayList();\n \n DBConn db = DBConn.getInstance();\n db.getConn();\n \n try {\n ResultSet rs = db.queryDB(\"SELECT \\\"Vehicle ID\\\" FROM Vehicle WHERE \\\"Customer ID\\\"=\" + value + \";\");\n while (rs.next()) {\n vehIDs.add(rs.getInt(\"Vehicle ID\"));\n //vid_input.getItems().addAll(rs.getInt(\"Vehicle ID\"));\n }\n vid_input.setItems(vehIDs);\n } catch (Exception e) {\n System.out.println(e);\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }",
"public void oppdaterJliste()\n {\n bModel.clear();\n\n Iterator<Boligsoker> iterator = register.getBoligsokere().iterator();\n\n while(iterator.hasNext())\n bModel.addElement(iterator.next());\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmodul = modulelist.getSelectedValue();\r\n\t\t\t\tvm.removeAllElements();\r\n\t\t\t\tam.removeAllElements();\r\n\t\t\t\tArrayList<ArrayList<User>> bothuser = serverConnection.getModulverwalter(modul);\r\n\t\t\t\tverwalter = new ArrayList<User>(bothuser.get(1));\r\n\t\t\t\tall = new ArrayList<User>(bothuser.get(0));\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < verwalter.size(); i++ ){\r\n\t\t\t\t\tvm.addElement(verwalter.get(i));\r\n\t\t\t\t}\r\n\t\t\t\tfor(int i = 0; i < all.size(); i++ ){\r\n\t\t\t\t\tam.addElement(all.get(i));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"private void update() {\n for (ArrayList<String> pair: list) {\n String username = pair.get(0);\n String val = pair.get(1);\n ref.child(username).setValue(val);\n }\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 }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\tJComboBox currentsmooth[] = new JComboBox[ControlNum];\n\t\t\tJTextField currentpara[] = new JTextField[ControlNum];\n\t\t\tJTextField wavebegin[] = new JTextField[ControlNum];\n\t\t\tJTextField waveend[] = new JTextField[ControlNum];\n\t\t\t\n\t\t\tint i;\n\t\t\tint value = -1;\n\t\t\tfor(Component one:parameterPanel.getComponents())\n\t\t\t{\n\t\t\t\tvalue = -1;\n\t\t\t\tif(one instanceof JComboBox)\n\t\t\t\t{\n\t\t\t\t\tFindControl((JComboBox)one, currentsmooth,\"Smooth\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(one instanceof JTextField)\n\t\t\t\t{\n\t\t\t\t\tvalue = FindControl((JTextField)one, currentpara,\"Parameter\");\n\t\t\t\t\tif(value == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue = FindControl((JTextField)one, wavebegin,\"wavebegin\");\n\t\t\t\t\t\tif(value == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = FindControl((JTextField)one, waveend,\"waveend\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t\t\n\t\t\tArrayList<String> SmoothParamterList=new ArrayList<String>();\n\t\t\t\n\t\t\tfor(i = 0;i < ControlNum; i++)\t\n\t\t\t{\t\n\t\t\t\tif (currentsmooth[i].getSelectedItem().toString().equals(\"空\"))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString MethodName = currentsmooth[i].getSelectedItem().toString();\n\t\t\t\t\t\n\t\t\t\tString MethodClass=smoothParameters.GetClassMethod(MethodName);\n\t\t\t\tString[] Parameter=new String[2];\n\t\t\t\tString MethodParameter;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(MethodClass!=null && !MethodClass.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tParameter[0]=smoothParameters.GetMethodValue(MethodName);\n\t\t\t\t\tParameter[1]=currentpara[i].getText().trim();\n\t\t\t\t\tMethodParameter=Compute.Parameter(MethodClass, Parameter);\n\t\t\t\t\tif (!MethodParameter.equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tSmoothParamterList.add(MethodParameter + \n\t\t\t\t\t\t\t\t\twavebegin[i].getText().trim()+\n\t\t\t\t\t\t\t\t\t\",\"+waveend[i].getText().trim());\n\t\t\t\t\t\t\t//out.println(MethodParameter);\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\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*for(String one:SmoothParamterList)\n\t\t\t{\n\t\t\t\tSystem.out.println(one);\n\t\t\t}*/\n\t\t\t\n\t\t\tif (SmoothParamterList.size() == 0)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(process, \"参数错误\", \"错误\",JOptionPane.OK_OPTION);\n\t\t\t\treturn; \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (SmoothParamterList.size()>0)\n\t\t\t{\n\t\t\t\tString filename = fileField.getText().replace(\".SPA\",\"\")+ \"\\\\SmoothParameter.cop\";\n\t\t\t\t\n\t\t\t\tFileWriter fw = null;\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfw = new FileWriter(filename);\n\t\t\t\t\tfw.write(Integer.toString(SmoothParamterList.size())+\"\\n\");\n\t\t\t\t\tfor(String EachParameter:SmoothParamterList)\n\t\t\t\t\t{\n\t\t\t\t\t\tfw.write(EachParameter+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tfw.close();\n\t\t\t\t\n\t\t\t\t\tString info=SmoothProcess.CheckParameter(fileField.getText(),filename);\n\t\t\t\t\t\n\t\t\t\t\tif (!info.equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tinfo = info.replace(\"</br>\", \"\\n\");\n\t\t\t\t\t\tinfo = info.replace(\"<br>\", \"\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(process, info, \"错误\",JOptionPane.CLOSED_OPTION);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSmoothCompute smoothcomputeProcess = new SmoothCompute();;\n\t\t\t\t\tString[] Result = null ;\n\t\t\t\t\t\n\t\t\t\t\tResult = smoothcomputeProcess.Compute(fileField.getText(),filename);\n\t\t\t\t\tSystem.out.println(Result[0]);\t\n\t\t\t\t\tSystem.out.println(Result[1]);\n\t\t\t\t\tJOptionPane.showMessageDialog(process, Result[0], \"结果\",JOptionPane.CLOSED_OPTION);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void updateValue() {\n int minValue = 100; //Minimum value to be calculated, initialized to a large number\n value = 0; //Value reinitialized to 0\n for (Integer i : values) {\n if (i > value && i <= 21) {\n value = i; //Sets value to maximum value less than or equal to 21\n }\n if (i < minValue) {\n minValue = i; //Sets minimum value to lowest value in the list\n }\n }\n if (value == 0) {\n value = minValue; //Sets value to minValue if no values 21 or less\n }\n valueLabel.setText(\"Value: \" + value); //Sets text of value label\n if (value > 21) {\n bust(); //Busts if value greater than 21\n }\n }",
"public void update(Observable o, Object arg) {\n\t\t\n\t\t// for every element in the list of parsed incidents\n\t\tfor (int i = 0; i < parsedIncidents.size(); i++) {\n\t\t\t\n\t\t\t// set the element at that index in the JList model to that element\n\t\t\tjListModel.set(i, parsedIncidents.get(i));\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}",
"public void updatedValuesOriginal(List<Simbolo> symbolsUpdated){\n for(Simbolo s:symbolsUpdated){\n Nodo n=nodos.get(s.getId());\n String valor=ejemplo.getListaPasos().get(n.getId()).getValor();\n n.setValue(valor);\n Tooltip t = new Tooltip(n.getValue());\n Tooltip.install(n.getRectangle(), t);\n }\n \n }",
"private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }",
"void updateControls();",
"public void loadTextBoxs(){\n txtIndice.setText(String.valueOf(indice));\n txtDni.setText(String.valueOf(dni[indice]));\n txtNombre.setText(nombre[indice]);\n txtApellido.setText(apellido[indice]);\n txtDireccion.setText(direccion[indice]);\n txtTelefono.setText(telefono[indice]);\n txtFechaNacimiento.setText(fNacimiento[indice]);\n }",
"private void setModelValue(String str) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n model.setValueAt(str, x, y);\n }\n });\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\tCleanScr();\n\t\t\t//Get the data from the textfield\n\t\t\tString Data = Data_txt.getText();\n\t\t\t//Change the data type into short\n\t\t\tShort SData = Integer.valueOf(Data,2).shortValue();\n\t\t\t//Search for which one is changed and clean the screen then show the data\n\t\t\tif (Data_R0.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tcpu.setR0(SData);\n\t\t\t\tShowData();\n\t\t\t} else if (Data_R1.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tcpu.setR1(SData);\n\t\t\t\tShowData();\n\t\t\t} else if (Data_R2.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tcpu.setR2(SData);\n\t\t\t\tShowData();\n\t\t\t} else if (Data_R3.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tcpu.setR3(SData);\n\t\t\t\tShowData();\n\t\t\t} else if (Data_Mem.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tString Index = Ins_txt.getText();\n\t\t\t\tint IIndex = Integer.parseInt(Index);\n\t\t\t\tcpu.setMem(SData, IIndex);\n\t\t\t\tShowData();\n\t\t\t} else if (Data_PC.isSelected()) {\n\t\t\t\tCleanScr();\n\t\t\t\tcpu.setPc(SData);\n\t\t\t\tShowData();\n\t\t\t} \n\t\t}",
"private void Button_EqualsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_EqualsActionPerformed\n // TODO add your handling code here:\n //pass everything into an arrayList then cycle through list\n ScriptEngineManager mgr = new ScriptEngineManager();\n ScriptEngine engine = mgr.getEngineByName(\"JavaScript\");\n String ans = display.getText();\n try {\n display.setText(Double.toString((Double)engine.eval(ans)));\n } catch (ScriptException ex) {\n Logger.getLogger(CalculatorGUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public void update() {\n jTextField1.setText(mCalculator.getDisplay());\n }",
"private void updateData() {\n // store if checkbox is enabled and update the label accordingly\n updateOneItem(jcbMaxTracks, jsMaxTracks, jnMaxTracks, Variable.MAXTRACKS,\n Variable.MAXTRACKS_ENABLED);\n updateOneItem(jcbMaxSize, jsMaxSize, jnMaxSize, Variable.MAXSIZE, Variable.MAXSIZE_ENABLED);\n updateOneItem(jcbMaxLength, jsMaxLength, jnMaxLength, Variable.MAXLENGTH,\n Variable.MAXLENGTH_ENABLED);\n if (jcbOneMedia.isSelected()) {\n data.put(Variable.ONE_MEDIA, jcbMedia.getSelectedItem());\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.TRUE);\n } else {\n // keep old value... data.remove(Variable.KEY_MEDIA);\n data.put(Variable.ONE_MEDIA_ENABLED, Boolean.FALSE);\n }\n data.put(Variable.CONVERT_MEDIA, jcbConvertMedia.isSelected());\n data.put(Variable.RATING_LEVEL, jsRatingLevel.getValue());\n data.put(Variable.NORMALIZE_FILENAME, jcbNormalizeFilename.isSelected());\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\titem1 = tf[0].getText();\n\t\t\t\titem2 = tf[1].getText();\n\t\t\t\titem3 = tf[2].getText();\n\t\t\t\tsql = transaction.T1(inx0,item1,inx1,item2,inx2,item3);\n\t\t\t\t\n\t\t\t\tDMT_refresh(sql,0);\n\t\t\t}",
"public LinkedList<String> getyValuesAdded() {\n LinkedList<String> str = new LinkedList<String>();\n\n // Get the index of all the selected items\n int[] selectedIx = yValuesAdded.getSelectedIndices();\n // Get all the selected items using the indices\n int size = listModelYvalue.getSize();\n for (int i=0; i<size; i++) {\n Object element = listModelYvalue.get(i);\n // Object sel = yValuesAdded.getModel().getElementAt(selectedIx[i]);\n //str[i] = \"\"+element;\n str.add(element.toString());\n // boolean add = stringSel.add(\"\"+sel);\n }\n return(str);\n}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n typeText = new javax.swing.JTextField();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n qualifierList = new javax.swing.JList();\n addBtn = new javax.swing.JButton();\n delBtn = new javax.swing.JButton();\n editBtn = new javax.swing.JButton();\n\n jLabel1.setText(\"Type:\"); // NOI18N\n\n jPanel1.setBorder(BorderFactory.createTitledBorder( //\n new LineBorder(Color.GRAY), //\n \"Qualifiers\", //\n TitledBorder.LEFT, //\n TitledBorder.TOP)); // NOI18N\n\n qualifierList.setModel(getListModel());\n qualifierList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n qualifierList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n qualifierListValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(qualifierList);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE)\n );\n\n addBtn.setText(\"Add...\"); // NOI18N\n addBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBtnActionPerformed(evt);\n }\n });\n\n delBtn.setText(org.openide.util.NbBundle.getMessage(NewFetureKeyPanel.class, \"NewFetureKeyPanel.delBtn.text\")); // NOI18N\n delBtn.setEnabled(false);\n delBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n delBtnActionPerformed(evt);\n }\n });\n\n editBtn.setText(org.openide.util.NbBundle.getMessage(NewFetureKeyPanel.class, \"NewFetureKeyPanel.editBtn.text\")); // NOI18N\n editBtn.setEnabled(false);\n editBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n editBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(typeText, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addBtn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)\n .addComponent(editBtn, 0, 0, Short.MAX_VALUE)\n .addComponent(delBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(typeText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(addBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(editBtn)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(delBtn))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n );\n\n }",
"private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n lobbyList = new javax.swing.JList();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n btnSalon = new javax.swing.JButton();\n refreshButton = new javax.swing.JButton();\n labelError = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"2IDENT\");\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel1.setText(\"Liste des salons :\");\n\n lobbyList.setModel(new javax.swing.AbstractListModel() {\n String[] strings = { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\", \"Item 5\" };\n public int getSize() { return strings.length; }\n public Object getElementAt(int i) { return strings[i]; }\n });\n lobbyList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n lobbyListValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(lobbyList);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setText(\"Créer un salon :\");\n\n jLabel3.setText(\"Nom du salon :\");\n\n jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jTextField1KeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField1KeyReleased(evt);\n }\n });\n\n jLabel4.setText(\"Nombre de joueurs (3-10) :\");\n\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n jTextField2KeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n\n btnSalon.setText(\"Valider\");\n btnSalon.setEnabled(false);\n btnSalon.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSalonActionPerformed(evt);\n }\n });\n\n refreshButton.setText(\"Rafraîchir\");\n refreshButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n refreshButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(refreshButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE))\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField2))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(70, 70, 70)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(btnSalon, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(labelError))))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(3, 3, 3)\n .addComponent(labelError)\n .addGap(1, 1, 1)\n .addComponent(btnSalon))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(refreshButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"public void convert(){\n\t\t\tJTextField[] textFieldArray = { firstTextField , secondTextField };\n\t\t\tint numberArrayToConverter = ( (firstTextField.isFocusOwner() || chooseUnitSecondBox.isFocusOwner() )) ? 0 : 1 ;\n\t\t\tString s = textFieldArray[numberArrayToConverter].getText().trim();\n\t\t\tif ( s.length() > 0 ){\n\t\t\t\tfirstTextField.setForeground(Color.BLACK);\n\t\t\t\tsecondTextField.setForeground(Color.BLACK);\n\t\t\t\ttry {\n\t\t\t\t\tdouble value = Double.valueOf(s);\n\t\t\t\t\tUnit unitFirstSelected = (Unit) chooseUnitFirstBox.getSelectedItem();\n\t\t\t\t\tUnit unitSecondSelected = (Unit) chooseUnitSecondBox.getSelectedItem();\n\t\t\t\t\tUnit[] unitArray = {unitFirstSelected , unitSecondSelected};\n\t\t\t\t\tint numberSwitch = (numberArrayToConverter == 0) ? 1 : 0 ;\n\t\t\t\t\ttextFieldArray[numberSwitch].setText( String.format(\"%.5g\", unitconverter.convert(value, unitArray[numberArrayToConverter], unitArray[numberSwitch])));\n\t\t\t\t} catch (NumberFormatException e){\n\t\t\t\t\tfirstTextField.setForeground(Color.RED);\n\t\t\t\t\tsecondTextField.setForeground(Color.RED);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tLabel thirdInstruct = new Label(\"Fill in the information you want to search by\"); \t\t\n\t\t\t\t\tupdate.add(thirdInstruct,0,5,3,1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//get number of col search by\n\t\t\t\t\tint countSearch =0; \n\t\t\t\t\tfor(int i =0; i <cbSearch.length; i++){\n\t\t\t\t\t\tif(cbSearch[i].isSelected()){\n\t\t\t\t\t\t\tcountSearch++;\n\t\t\t\t\t\t}else; \n\t\t\t\t\t}\n\t\t\t\t\tfinal int counterForButton = countSearch;\n\t\t\t\t\t\n\t\t\t\t\t//storing columns Names Look\n\t\t\t\t\tString[] colNamesLook = new String[countSearch];\n\t\t\t\t\tfor(int i =0,j=0; i < cbSearch.length; i++){\n\t\t\t\t\t\tif(cbSearch[i].isSelected()){\n\t\t\t\t\t\t\tcolNamesLook[j]=cbSearch[i].getText();\n\t\t\t\t\t\t\tj++; \n\t\t\t\t\t\t}else; \n\t\t\t\t\t}\n\t\t\t\t\t//initialize TextFields to search by\n\t\t\t\t\tTextField[] tfSearchBy = new TextField[countSearch];\n\t\t\t\t\tint row =6; \n\t\t\t\t\tfor(int i =0,j=0; i<cbSearch.length;i++){\n\t\t\t\t\t\tif(cbSearch[i].isSelected()){\n\t\t\t\t\t\t\tLabel col = new Label(colName[i]);\n\t\t\t\t\t\t\tupdate.add(col, 0, row);\n\t\t\t\t\t\t\ttfSearchBy[j] = new TextField();\n\t\t\t\t\t\t\ttfSearchBy[j].setPromptText(\"Required Input\");\n\t\t\t\t\t\t\tupdate.add(tfSearchBy[j], 1,row);\n\t\t\t\t\t\t\trow++; \n\t\t\t\t\t\t\tj++; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//convert to one string\n\t\t\t\t\tString one = \"\";\n\t\t\t\t\tfor(int i =0; i < colNamesLook.length; i++){\n\t\t\t\t\t\tone = one + colNamesLook[i] + \" \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tLabel fourthInstruct = new Label(\"You will be updating any information in the database\"\n\t\t\t\t\t\t\t+\"\\n that matches your input for column(s) \" + one);\n\t\t\t\t\tfourthInstruct.setWrapText(true);\n\t\t\t\t\tupdate.add(fourthInstruct,0,row,3,1);\n\t\t\t\t\trow=row+2; \n\t\t\t\t\t\n\t\t\t\t\tLabel fifthInstruct = new Label(\"Fill in the new information \");\n\t\t\t\t\tupdate.add(fifthInstruct, 0, row,3,1);\n\t\t\t\t\trow= row+3; \n\t\t\t\t\t\n\t\t\t\t\t//get number of col to update\n\t\t\t\t\tint countUpdate = 0; \n\t\t\t\t\tfor(int i =0; i<cbUpdate.length; i++){\n\t\t\t\t\t\tif(cbUpdate[i].isSelected()){\n\t\t\t\t\t\t\tSystem.out.println(\"You've selected\" + cbUpdate[i].getText());\n\t\t\t\t\t\t\tcountUpdate++;\n\t\t\t\t\t\t}else; \n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(countUpdate);\n\t\t\t\t\t\n\t\t\t\t\t//initialize TextFields to Update by\n\t\t\t\t\tTextField[] tfUpdateBy = new TextField[countUpdate];\n\t\n\t\t\t\t\tfor(int i =0, j=0; i<colName.length;i++){\n\t\t\t\t\t\tSystem.out.println(\"Looking for \" + cbUpdate[i].getText());\n\t\t\t\t\t\tif(cbUpdate[i].isSelected()){\n\t\t\t\t\t\t\tSystem.out.println(\"SECLTED\");\n\t\t\t\t\t\t\tLabel col = new Label(colName[i]);\n\t\t\t\t\t\t\tupdate.add(col, 0, row);\n\t\t\t\t\t\t\ttfUpdateBy[j] = new TextField();\n\t\t\t\t\t\t\ttfUpdateBy[j].setPromptText(\"Required Input\");\n\t\t\t\t\t\t\tupdate.add(tfUpdateBy[j], 1,row);\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t\trow++; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tButton searchAndUpdate = new Button(\"Update\");\n\t\t\t\t\tupdate.add(searchAndUpdate, 0, row);\n\t\t\t\t\tsearchAndUpdate.setOnAction(new EventHandler<ActionEvent>(){\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//call select data first to get 2d array of all possible values\n\t\t\t\t\t\t\t//columns to Look At\n\t\t\t\t\t\t\t//variable -colNamesLook\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//values of those Columns - stored in tfSearchBy\n\t\t\t\t\t\t\tString[] valueOfCol = new String[tfSearchBy.length];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i< valueOfCol.length; i++){\n\t\t\t\t\t\t\t\tvalueOfCol[i] = tfSearchBy[i].getText();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//names of Columns to print- everything\n\t\t\t\t\t\t\tString[] colNames;\n\t\t\t\t\t\t\tString[][] dataToCompare= new String[1][1]; \n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcolNames = db.returnColumnNames();\n\t\t\t\t\t\t\t\tdataToCompare = db.selectData(colNamesLook, valueOfCol, colNames);\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\tAlertBox error = new AlertBox();\n\t\t\t\t\t\t\t\terror.display(\"Fail\", \"Failure to retrieve data. Values to be searched by may not exist\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tString[][] all = db.displayCurrentTable();\n\t\t\t\t\t\t\t\tSystem.out.println(\"Old Values\");\n\t\t\t\t\t\t\t\tfor(int row =0; row<all.length; row++){\n\t\t\t\t\t\t\t\t\tfor(int col = 0; col<all[0].length;col++ ){\n\t\t\t\t\t\t\t\t\t\tSystem.out.print(all[row][col]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t//Determine Which Column(s) will be updated and store in array\n\t\t\t\t\t\t\tint countNum=0; \n\t\t\t\t\t\t\tfor(int i =0; i<colName.length;i++){\n\t\t\t\t\t\t\t\tif(cbUpdate[i].isSelected()){\n\t\t\t\t\t\t\t\t\tcountNum++; \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString[] colNamesUpdate = new String[countNum];\n\t\t\t\t\t\t\tfor(int store =0,index=0; store<colName.length;store++){\n\t\t\t\t\t\t\t\tif(cbUpdate[store].isSelected()){\n\t\t\t\t\t\t\t\t\tcolNamesUpdate[index]= colName[store];\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\t//Storing Column Names Not Selected into Array\n\t\t\t\t\t\t\tint totalCol=0;\n\t\t\t\t\t\t\tint notChanged=0; \n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttotalCol = db.returnColumnType().length;\n\t\t\t\t\t\t\t\tnotChanged=totalCol-counterForButton;\n\t\t\t\t\t\t\t} catch (SQLException 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\t\n\t\t\t\t\t\t\tString[] colNotChangedName = new String[notChanged]; \n\t\t\t\t\t\t\tint realCol =0; \n\t\t\t\t\t\t\tfor(int col = 0; col<dataToCompare[0].length; col++){\n\t\t\t\t\t\t\t\tif(!cbUpdate[col].isSelected()){\n\t\t\t\t\t\t\t\t\tcolNotChangedName[realCol] = colName[col];\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Not Changed \" + colName[col]);\n\t\t\t\t\t\t\t\t\trealCol++; \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(\"Length of Values Not Changed Array is \" + dataToCompare.length*notChanged);\n\t\t\t\t\t\t\t//Storing ALL Values from Column's Not Selected into Array\n\t\t\t\t\t\t\tString[] valuesNotChanged = new String[dataToCompare.length*notChanged];\n\t\t\t\t\t\t\tint i=0; \n\t\t\t\t\t\t\tfor(int row =0; row<dataToCompare.length; row++){\n\t\t\t\t\t\t\t\tfor(int col = 0; col<dataToCompare[0].length;col++ ){\n\t\t\t\t\t\t\t\t\tif(!cbUpdate[col].isSelected()){\n\t\t\t\t\t\t\t\t\t\tvaluesNotChanged[i] = dataToCompare[row][col];\n\t\t\t\t\t\t\t\t\t\ti++;\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\tSystem.out.println(\"Values Not Changed Are\");\n\t\t\t\t\t\t\tfor(int k =0; k < valuesNotChanged.length;k++){\n\t\t\t\t\t\t\t\tSystem.out.println(valuesNotChanged[k]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"Value of New Column will be \");\n\t\t\t\t\t\t\t//Storing Values from TextField UpdateBy into array\n\t\t\t\t\t\t\tString[] updatedData = new String[tfUpdateBy.length];\n\t\t\t\t\t\t\tfor(int j =0; j < tfUpdateBy.length; j++){\n\t\t\t\t\t\t\t\tupdatedData[j]=tfUpdateBy[j].getText();\n\t\t\t\t\t\t\t\tSystem.out.println(updatedData[j]);\n\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\tSystem.out.println(\"Col Names To Change are\");\n\t\t\t\t\t\t\tfor(int one =0; one<colNamesUpdate.length; one++){\n\t\t\t\t\t\t\t\tSystem.out.println(colNamesUpdate[one]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tSystem.out.println(\"Updated Data are\");\n\t\t\t\t\t\t\tfor(int one =0; one<updatedData.length; one++){\n\t\t\t\t\t\t\t\tSystem.out.println(updatedData[one]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"Col Names NOT CHANGED are\");\n\t\t\t\t\t\t\tfor(int one =0; one<colNotChangedName.length; one++){\n\t\t\t\t\t\t\t\tSystem.out.println(colNotChangedName[one]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(\"DATA NOT CHANGING IS \");\n\t\t\t\t\t\t\tfor(int one =0; one<valuesNotChanged.length; one++){\n\t\t\t\t\t\t\t\tSystem.out.println(valuesNotChanged[one]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//loop to update All matched rows\n\t\t\t\t\t\t\tint shiftIndex = valuesNotChanged.length-notChanged; \n\t\t\t\t\t\t\twhile(shiftIndex!=0){\n\t\t\t\t\t\t\t\tdb.updateTableData(colNamesUpdate, updatedData, colNotChangedName,valuesNotChanged);\n\t\t\t\t\t\t\t\t//shift by number of columns\n\t\t\t\t\t\t\t\tfor(int t =0; t< shiftIndex ;t++ ){\n\t\t\t\t\t\t\t\t\tvaluesNotChanged[t] = valuesNotChanged[t+notChanged];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshiftIndex = shiftIndex-notChanged; \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\tString[][] display = null; \n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdisplay = db.displayCurrentTable();\n\t\t\t\t\t\t\t} catch (SQLException 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\t\n\t\t\t\t\t\t\tSystem.out.println(\"Updated Values\");\n\t\t\t\t\t\t\tfor(int row =0; row<display.length; row++){\n\t\t\t\t\t\t\t\tfor(int col = 0; col<display[0].length;col++ ){\n\t\t\t\t\t\t\t\t\tSystem.out.print(display[row][col]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tSystem.out.println();\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\n\t\t\t\t}",
"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 }",
"private void setObjects(){\n \n initialImg = \"\";\n initialImgDir= \"\";\n boolean first = true;\n \n \n for(IDataObject object : objects){\n \n locationFieldX.setText(doubleFormat.format(object.getXf()));\n locationFieldY.setText(doubleFormat.format(object.getYf()));\n locationFieldZ.setText(doubleFormat.format(object.getZf()));\n nameField.setText(object.getName());\n \n String rotX = doubleFormat.format(object.getRotationX());\n String rotY = doubleFormat.format(object.getRotationY());\n String rotZ = doubleFormat.format(object.getRotationZ());\n String scale = doubleFormat.format(object.getScale());\n \n //if more items are selected, check if they are different.\n if(!first && !rotationFieldX.getText().equals(rotX))\n rotationFieldX.setText(BUNDLE.getString(\"DifferentValues\"));\n else\n rotationFieldX.setText(rotX);\n \n if(!first && !rotationFieldY.getText().equals(rotY))\n rotationFieldY.setText(BUNDLE.getString(\"DifferentValues\"));\n else\n rotationFieldY.setText(rotY);\n \n if(!first && !rotationFieldZ.getText().equals(rotZ))\n rotationFieldZ.setText(BUNDLE.getString(\"DifferentValues\"));\n else\n rotationFieldZ.setText(rotZ);\n \n if(!first && !scaleField.getText().equals(scale))\n scaleField.setText(BUNDLE.getString(\"DifferentValues\"));\n else\n scaleField.setText(scale);\n\n if(initialImg != null){\n String imgNameLocal = object.getImgClass().getName();\n \n if(initialImg.equals(\"\"))\n initialImg = imgNameLocal;\n else if(initialImg.equals(imgNameLocal))\n initialImg = null;\n }\n\n if(initialImgDir != null){\n String imgDirLocal = object.getImgClass().getDir();\n \n if(initialImgDir.equals(\"\"))\n initialImgDir = imgDirLocal;\n else if(initialImgDir.equals(imgDirLocal))\n initialImgDir = null;\n }\n if(first)\n first = false;\n }\n \n initialX = locationFieldX.getText();\n initialY = locationFieldY.getText();\n initialZ = locationFieldZ.getText();\n initialRotX = rotationFieldX.getText();\n initialRotY = rotationFieldY.getText();\n initialRotZ = rotationFieldZ.getText();\n initialScale = scaleField.getText();\n initialName = nameField.getText();\n \n //lock specific fields, if there are more than one\n //item selected.\n if(objects.size()>1){\n locationFieldX.setText(\"\");\n locationFieldY.setText(\"\");\n locationFieldZ.setText(\"\");\n nameField.setText(\"\");\n locationFieldX.setEnabled(false);\n locationFieldY.setEnabled(false);\n locationFieldZ.setEnabled(false);\n nameField.setEnabled(false);\n setLabelColorStandard(xLabel, disabledColor);\n setLabelColorStandard(yLabel, disabledColor);\n setLabelColorStandard(zLabel, disabledColor);\n setLabelColorStandard(nameLabel, disabledColor);\n }else{\n locationFieldX.setEnabled(true);\n locationFieldY.setEnabled(true);\n locationFieldZ.setEnabled(true);\n nameField.setEnabled(true);\n setLabelColorStandard(xLabel, Color.red);\n setLabelColorStandard(yLabel, Color.blue);\n setLabelColorStandard(zLabel, Color.green);\n setLabelColorStandard(nameLabel, normalColor);\n }\n }",
"public Listado() {\n initComponents();\n\n for (int i=0;i<tbl_listado.getRowCount();i++)\n {\n Float precio = (Float)tbl_listado.getModel().getValueAt(i, 1);\n double iva = precio*0.12;\n tbl_listado.getModel().setValueAt(iva,i,4);\n }\n }",
"public void update()\n\t{\n\t\t//update the view's list of movies...\n\t\tthis.getRemoveButton().setEnabled((this.database.getNumberOfMovies()>0));\n\t\tthis.movieList.setListData(this.database.toList());\n\t}",
"public void applyData(Object data) {\n \t\tif (!(data instanceof String))\n \t\t\treturn;\n \n \t\tfor (int i= 0; i < fListModel.length; i++) {\n \t\t\tfinal ListItem element= fListModel[i];\n \t\t\tif (data.equals(element.label)) {\n \t\t\t\tfinal Control control= fAnnotationTypeViewer.getControl();\n \t\t\t\tcontrol.getDisplay().asyncExec(new Runnable() {\n \t\t\t\t\tpublic void run() {\n \t\t\t\t\t\tcontrol.setFocus();\n \t\t\t\t\t\tfAnnotationTypeViewer.setSelection(new StructuredSelection(element), true);\n \t\t\t\t\t}\n \t\t\t\t});\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n yValuesAvail = new javax.swing.JComboBox(graphVarNames);\n xValuesAvail = new javax.swing.JComboBox(graphVarNames);\n jButton1AddItem = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n yValuesAdded = new javax.swing.JList();\n jButton2AddItem = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n xValueAdded = new javax.swing.JTextField();\n jButton3_plot = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jButton5RemoveItem = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosed(java.awt.event.WindowEvent evt) {\n formWindowClosed(evt);\n }\n });\n\n jButton1AddItem.setText(\"-->\");\n jButton1AddItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1AddItemActionPerformed(evt);\n }\n });\n yValuesAdded.setModel(listModelYvalue);\n\n /*\n */\n jScrollPane1.setViewportView(yValuesAdded);\n\n jButton2AddItem.setText(\"-->\");\n jButton2AddItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2AddItemActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Select Y-Values\");\n\n jLabel2.setText(\"Select X-Value\");\n\n xValueAdded.setEditable(false);\n xValueAdded.setText(\"Evaluation\");\n xValueAdded.setActionCommand(\"<Not Set>\");\n\n jButton3_plot.setText(\"Plot\");\n jButton3_plot.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3_plotActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Cancel\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CloseButtonActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Lucida Grande\", 1, 18));\n jLabel3.setText(\"Create New Plot Tab\");\n\n jLabel4.setText(\"Y-Values Added\");\n\n jButton5RemoveItem.setText(\"<--\");\n jButton5RemoveItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5RemoveItemActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Help\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap(20, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(layout.createSequentialGroup()\n .add(jButton1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jButton4)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jButton3_plot))\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(39, 39, 39)\n .add(jLabel2))\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)\n .add(xValuesAvail, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(yValuesAvail, 0, 166, Short.MAX_VALUE))\n .add(layout.createSequentialGroup()\n .add(43, 43, 43)\n .add(jLabel1)))\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jLabel3))\n .add(layout.createSequentialGroup()\n .add(18, 18, 18)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(jButton5RemoveItem)\n .add(jButton1AddItem)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jButton2AddItem))))))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(xValueAdded)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE))))\n .addContainerGap())\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .add(jLabel4)\n .add(84, 84, 84))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jLabel3)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jLabel4)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(layout.createSequentialGroup()\n .add(17, 17, 17)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(yValuesAvail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(layout.createSequentialGroup()\n .add(jButton1AddItem)\n .add(20, 20, 20)\n .add(jButton5RemoveItem)))\n .add(44, 44, 44)\n .add(jLabel2)))\n .add(9, 9, 9)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(xValuesAvail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(xValueAdded, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(26, 26, 26)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jButton3_plot)\n .add(jButton4)\n .add(jButton1)))\n .add(jButton2AddItem))\n .add(60, 60, 60))\n );\n\n pack();\n }",
"@Override\n\tpublic void update(Observable o, Object arg) {\n\t\tJLabelNbMort.setText(\"Nb mort : \"+m.getMort());\n\t\tJLabelNbVivant.setText(\"Nb vivant : \"+m.getVivant());\n\t\t//JLabelTemps.setText(\"Temps : \"+m.getTemps());\n\t\tJLabelNbCoup.setText(\"Nb coups : \"+m.getCoup());\n\t}",
"@FXML void editbtnpushed(ActionEvent event5) {\t\n\tLabel Orig[] = { TitleLabel, PositionLabel, RetributionLabel, DegreeLabel, BonusLabel, ContractTypeLabel, ContractTimeLabel, SectorLabel, RegionLabel, RetxTLabel, ExpLabel };\n\tint i = 0, k = -1;\n\tTextField TxtEd[] = { EditTitleField, EditPositionField, EditRetribution, EditDegreeField, EditBonusField };\n\tChoiceBox ChbEd[] = { EditTypeContBox, EditTimeContBox, EditSectorBOx, EditRegionBox, EditRetxTField, EditExpbox };\n\tString preset[] = { \"Modifica Tipo Contratto\", \"Modifica Tempo Contratto\", \"Modifica Settore\", \"Modifica Regione\", \n\t\t\t\"Modifica Tempo Retribuzione\", \"Modifica Esperienza\" };\n\tString s1[] = new String [12];\t\n\tfor ( i = 0; i < 11; i++ ) {\n\tif ( i < 5 ) { \n\t\tif (!TxtEd[i].getText().isEmpty()) {\n\t\ts1[i] = TxtEd[i].getText().toString(); }\n\telse { s1[i] = Orig[i].getText().toString(); }\n\t} \n\tif ( i > 4 ) { \n\t\t++k;\n\t\t if ( !ChbEd[k].getValue().toString().contentEquals(preset[k])) {\n\t\t\ts1[i] = ChbEd[k].getValue().toString(); }\n\t\telse { s1[i] = Orig[i].getText().toString(); } \n\t\t}\n\t} s1[11] = EditWorkInfoArea.getText().toString(); \n\t\tk = -1;\n\tfor ( i = 0; i < 11; i++ ) {\n\t\tif ( i < 5 ) { TxtEd[i].setText(s1[i]); } \n\t\tif ( i > 4 ) { \n\t\t\t++k;\n\t\t\tChbEd[k].setValue(s1[i]); }\n\t} \t\n\ttry {\n\t\tint n = 0, j = 0, p = 1, q = 2, email = 3, r = 4, s = 5, t = 6, u = 7, w = 8, v = 9, x = 10, y = 11, z = 12; i = 0; k = 0; \n\t BufferedReader reader = new BufferedReader(new FileReader(FileCerqoLavoroBusinessFactoryImpl.OFFERS_FILE_NAME));\n\t int lines = 0;\n\t while (reader.readLine() != null) {\n\t lines++; }\n\t reader.close(); int cont = lines / 13;\n\t File f = new File(FileCerqoLavoroBusinessFactoryImpl.OFFERS_FILE_NAME);\n \t StringBuilder sb = new StringBuilder();\n \t try (Scanner sc = new Scanner(f)) {\n \t String currentLine;\n \t boolean trovato = false;\n \t while ( sc.hasNext() && n < (lines) ) {\n \t currentLine = sc.nextLine();\n \t if ( n == j ) { sb.append(EditRegionBox.getValue().toString()+\"\\n\"); }\n\t if ( n == p ) { sb.append(EditSectorBOx.getValue().toString()+\"\\n\"); }\n\t if ( n == q ) { sb.append(EditTitleField.getText().toString()+\"\\n\"); }\n \t if ( n == r ) { sb.append(EditPositionField.getText().toString()+\"\\n\"); }\n \t if ( n == s ) { sb.append(EditTypeContBox.getValue().toString()+\"\\n\"); }\n \t if ( n == t ) { sb.append(EditTimeContBox.getValue().toString()+\"\\n\"); }\n \t if ( n == u ) { sb.append(EditRetribution.getText().toString()+\"\\n\"); }\n \t if ( n == v ) { sb.append(EditExpbox.getValue().toString()+\"\\n\"); }\n \t if ( n == w ) { sb.append(EditRetxTField.getValue().toString()+\"\\n\"); }\n \t if ( n == x ) { sb.append(EditBonusField.getText().toString()+\"\\n\"); }\n \t if ( n == y ) { sb.append(EditDegreeField.getText().toString()+\"\\n\"); }\n \t if ( n == z ) { sb.append(EditWorkInfoArea.getText().toString()+\"\\n\"); }\n \t if ( n != j && n != p && n != q && n != r && n != s && n != t && n != u && n != v && n != w && n != x && n != y && n != z ) {\n \t \tif ( n == (lines-1) ) { sb.append(currentLine); }\n\t \telse { sb.append(currentLine).append(\"\\n\"); }\n \t } n++; \n \t }\n \t }\n \t PrintWriter pw = new PrintWriter(f); pw.close();\n \t BufferedWriter writer = new BufferedWriter(new FileWriter(f, true));\n \t writer.append(sb.toString()); writer.close(); \t \n \t\tif ( !EditTitleField.getText().isEmpty() ) { TitleLabel.setText(EditTitleField.getText()); } \t\t\n \t\tif ( !EditPositionField.getText().isEmpty() ) { PositionLabel.setText(EditPositionField.getText()); } \t\t\n \t\tif ( !EditTypeContBox.getValue().contentEquals(\"Modifica Tipo Contratto\") ) { ContractTypeLabel.setText(EditTypeContBox.getValue()); } \t\t\n \t\tif ( !EditTimeContBox.getValue().contentEquals(\"Modifica Tempo Contratto\") ) { ContractTimeLabel.setText(EditTimeContBox.getValue()); } \t\t\n \t\tif ( !EditRetribution.getText().isEmpty()) { RetributionLabel.setText(EditRetribution.getText() ); } \t\t\n \t\tif ( !EditSectorBOx.getValue().contentEquals(\"Modifica Settore\") ) { SectorLabel.setText(EditSectorBOx.getValue()); } \t\t\n \t\tif ( !EditRegionBox.getValue().contentEquals(\"Modifica Regione\") ) { RegionLabel.setText(EditRegionBox.getValue()); } \t\t\n \t\tif ( !EditRetxTField.getValue().contentEquals(\"Modifica Tempo Retribuzione\") ) { RetxTLabel.setText(EditRetxTField.getValue()); } \t\t\n \t\tif ( !EditBonusField.getText().isEmpty() ) { BonusLabel.setText(EditBonusField.getText()); } \t\t\n \t\tif ( !EditDegreeField.getText().isEmpty() ) { DegreeLabel.setText(EditDegreeField.getText()); }\t\t \n Alert offmodAlert = new Alert(AlertType.CONFIRMATION);\n offmodAlert.setHeaderText(\"Operazione completata\");\n offmodAlert.setContentText(\"Hai modificato questa offerta\");\n offmodAlert.showAndWait(); \n\t} catch (Exception e) {\n\t e.printStackTrace();\n Alert ripmodAlert = new Alert(AlertType.ERROR);\n ripmodAlert.setHeaderText(\"Attenzione\");\n ripmodAlert.setContentText(\"Si è verificato un errore\");\n ripmodAlert.showAndWait();\n\t} \n}",
"@Override\n\tpublic abstract void valueChanged(ListSelectionEvent arg0);"
]
| [
"0.60725635",
"0.6013935",
"0.59352744",
"0.5909069",
"0.59029496",
"0.5886844",
"0.5873612",
"0.58542067",
"0.57995677",
"0.5788612",
"0.5715489",
"0.57104146",
"0.5709595",
"0.56962043",
"0.56815344",
"0.5668073",
"0.565578",
"0.5650077",
"0.5637122",
"0.5630187",
"0.5615946",
"0.56107104",
"0.5607597",
"0.55972785",
"0.558986",
"0.55823845",
"0.5573521",
"0.5570894",
"0.554786",
"0.5546722",
"0.5545709",
"0.55362356",
"0.5529211",
"0.5524023",
"0.551519",
"0.5515127",
"0.55114955",
"0.5504511",
"0.548964",
"0.54843354",
"0.5483614",
"0.5477088",
"0.54755193",
"0.5468622",
"0.5463429",
"0.54588616",
"0.54261225",
"0.54163635",
"0.5404786",
"0.539366",
"0.5392509",
"0.5390095",
"0.53834003",
"0.53790426",
"0.5377215",
"0.5369496",
"0.5365636",
"0.5365636",
"0.53598696",
"0.5359636",
"0.5358647",
"0.53540826",
"0.5347085",
"0.53455067",
"0.53408796",
"0.5330403",
"0.53292656",
"0.5325747",
"0.5322816",
"0.5316087",
"0.530274",
"0.5296039",
"0.5295453",
"0.52926356",
"0.5291327",
"0.52909225",
"0.5290901",
"0.5290154",
"0.5290068",
"0.5287265",
"0.5284122",
"0.52824366",
"0.52813536",
"0.5279452",
"0.5277523",
"0.52725434",
"0.5272081",
"0.52718204",
"0.5270984",
"0.5264239",
"0.5264097",
"0.5258786",
"0.5253158",
"0.52496916",
"0.5249633",
"0.52484655",
"0.5242386",
"0.5241659",
"0.5234233",
"0.52326524",
"0.52309453"
]
| 0.0 | -1 |
Created by chsc on 25.03.17. | public interface BaseView<T extends BasePresenter> {
void setPresenter(T presenter);
boolean isActive();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void init() {\n\n\t}",
"private void poetries() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private void kk12() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n }",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n void init() {\n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@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 ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private void init() {\n\n\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void initialize() { \n }",
"private void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void method_4270() {}",
"public void mo6081a() {\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public abstract void mo70713b();",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}"
]
| [
"0.56738174",
"0.5643423",
"0.5630211",
"0.5569837",
"0.5502755",
"0.5461902",
"0.5459547",
"0.5459547",
"0.5459547",
"0.5459547",
"0.5459547",
"0.54513067",
"0.54513067",
"0.5435878",
"0.54277426",
"0.54275656",
"0.5416207",
"0.54077566",
"0.53892314",
"0.53890157",
"0.5379996",
"0.537937",
"0.53667575",
"0.53667575",
"0.5357894",
"0.5343807",
"0.5343527",
"0.5338382",
"0.53373003",
"0.5334571",
"0.5333603",
"0.5329632",
"0.53244925",
"0.5321948",
"0.5319974",
"0.5316246",
"0.53108966",
"0.53102016",
"0.53102016",
"0.53102016",
"0.5289216",
"0.5289216",
"0.5289216",
"0.5281958",
"0.5275091",
"0.52687514",
"0.5266796",
"0.52652943",
"0.526459",
"0.52643543",
"0.52643543",
"0.5264153",
"0.52632546",
"0.52632546",
"0.52632546",
"0.52621967",
"0.5254504",
"0.5254504",
"0.5254504",
"0.5254504",
"0.5254504",
"0.5254504",
"0.52436274",
"0.52434725",
"0.52423984",
"0.5238302",
"0.52296835",
"0.52296835",
"0.5224594",
"0.52242136",
"0.5220279",
"0.52160645",
"0.5192225",
"0.51889324",
"0.5186932",
"0.51805025",
"0.51715493",
"0.51690334",
"0.5166042",
"0.51601255",
"0.51378745",
"0.51378745",
"0.51354617",
"0.51354617",
"0.5130096",
"0.5130096",
"0.5130096",
"0.5130096",
"0.5130096",
"0.5130096",
"0.5130096",
"0.5123015",
"0.5120956",
"0.51148295",
"0.5110161",
"0.51070493",
"0.5095703",
"0.5086069",
"0.50801295",
"0.5077298",
"0.5074112"
]
| 0.0 | -1 |
Immediately draws the illumination dot on this SurfaceView's surface. | void drawIlluminationDot(@NonNull RectF sensorRect) {
if (!mHasValidSurface) {
Log.e(TAG, "drawIlluminationDot | the surface is destroyed or was never created.");
return;
}
Canvas canvas = null;
try {
canvas = mHolder.lockCanvas();
mUdfpsIconPressed.setBounds(
Math.round(sensorRect.left),
Math.round(sensorRect.top),
Math.round(sensorRect.right),
Math.round(sensorRect.bottom)
);
mUdfpsIconPressed.draw(canvas);
canvas.drawOval(sensorRect, mSensorPaint);
} finally {
// Make sure the surface is never left in a bad state.
if (canvas != null) {
mHolder.unlockCanvasAndPost(canvas);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }",
"public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}",
"private void drawLight() {\n final int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mPointProgramHandle, \"u_MVPMatrix\");\n final int pointPositionHandle = GLES20.glGetAttribLocation(mPointProgramHandle, \"a_Position\");\n\n // Pass in the position.\n GLES20.glVertexAttrib3f(pointPositionHandle, mLightPosInModelSpace[0], mLightPosInModelSpace[1], mLightPosInModelSpace[2]);\n\n // Since we are not using a buffer object, disable vertex arrays for this attribute.\n GLES20.glDisableVertexAttribArray(pointPositionHandle);\n\n // Pass in the transformation matrix.\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mLightModelMatrix, 0);\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n GLES20.glUniformMatrix4fv(pointMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Draw the point.\n GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 1);\n }",
"public void draw()\n {\n imageView.setRotate(teta);\n imageView.relocate(super.getX(),super.getY());\n }",
"public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}",
"private void draw() {\n\tSurfaceHolder holder = getSurfaceHolder();\n\tCanvas canvas = null;\n\ttry {\n\t\tcanvas = holder.lockCanvas();\n\t\tif (canvas != null) {\n\t\t\tif (bitmap == null) {\n\t\t\t\tbitmap = iniBitmap(canvas.getWidth(), canvas.getHeight());\n\t\t\t}\n\t\t\tcanvas.drawBitmap(bitmap.getBitmap(), 0, 0, paint);\n\t\t}\n\t} finally {\n\t\tif (canvas != null) holder.unlockCanvasAndPost(canvas);\n\t}\n}",
"public void drawImage() {\n mTextureRender.drawFrame(mSurfaceTexture);\n }",
"public void draw(GL2 gl) {\n\t\tif (disabled > explodeTime) {\n\t\t\treturn;\n\t\t}\n\t\tsphere.draw(gl, texture);\n\t}",
"@Override\n public void onDrawFrame(GL10 gl) {\n synchronized (this) {\n Matrix.multiplyMM(tempMatrix, 0, deviceOrientationMatrix, 0, touchYawMatrix, 0);\n Matrix.multiplyMM(viewMatrix, 0, touchPitchMatrix, 0, tempMatrix, 0);\n }\n\n Matrix.multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n scene.glDrawFrame(viewProjectionMatrix, Type.MONOCULAR);\n }",
"private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }",
"public void render() {\r\n\t\tif ((this instanceof Turtles && ((Turtles) this).isAboveWater()) || !(this instanceof Turtles)) {\r\n\t\t\timage.drawCentered(xCoordinate, yCoordinate);\r\n\t\t}\r\n\t}",
"public void draw() {\n draw(root, false);\n }",
"public void draw() {\n drawBox();\n if (root == null) {\n return;\n }\n\n draw(root, ORIENTATION_VERTICAL);\n }",
"public void paint(){\n\t\tif(this.x+GameScreen.backCam<900 && this.x+GameScreen.backCam>-60){\n\t\t\tGraphicsHandler.drawImage(texture,this.x+GameScreen.backCam,this.y+GameScreen.yCam,size,size);\n\t\t}\n\t}",
"@Override\n\t\tpublic void render()\n\t\t{\n\t\t\tif(color.alpha() > 0)\n\t\t\t{\n\t\t\t\tbind();\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\n\t\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\n\t\t\t\t\tfloat screenWidth = WindowManager.controller().width();\n\t\t\t\t\tfloat screenHeight = WindowManager.controller().height();\n\t\t\t\t\tGL11.glVertex2f(0, 0);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, 0);\n\t\t\t\t\tGL11.glVertex2f(0, screenHeight);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, screenHeight);\n\t\t\t\tGL11.glEnd();\n\t\t\t\trelease();\n\t\t\t}\n\t\t}",
"private void drawStatic() {\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mModelMatrix, 0);\n\n // Pass in the modelview matrix.\n GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix\n // (which now contains model * view * projection).\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Pass in the light position in eye space.\n GLES20.glUniform3f(mLightPosHandle, mLightPosInEyeSpace[0], mLightPosInEyeSpace[1], mLightPosInEyeSpace[2]);\n }",
"public void renderLights()\r\n\t{\r\n\t\tlightHandler.render();\r\n\t}",
"private void draw() {\n gsm.draw(g);\n }",
"public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}",
"public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }",
"@Override\n public void render() {\n Gdx.gl.glClearColor(0f, 0f, 0f, 1f);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n Gdx.gl.glDisable(GL20.GL_BLEND);\n }",
"public void draw() {\n draw(root, true);\n }",
"public void drawFloor() {\r\n GLES20.glUseProgram(program);\r\n\r\n // Set ModelView, MVP, position, normals, and color.\r\n GLES20.glUniform3fv(lightPosParam, 1, lightPosInEyeSpace, 0);\r\n GLES20.glUniformMatrix4fv(modelParam, 1, false, model, 0);\r\n GLES20.glUniformMatrix4fv(modelViewParam, 1, false, modelView, 0);\r\n GLES20.glUniformMatrix4fv(modelViewProjectionParam, 1, false, modelViewProjection, 0);\r\n GLES20.glVertexAttribPointer(positionParam, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertices);\r\n GLES20.glVertexAttribPointer(normalParam, 3, GLES20.GL_FLOAT, false, 0, normals);\r\n GLES20.glVertexAttribPointer(colorParam, 4, GLES20.GL_FLOAT, false, 0, colors);\r\n\r\n GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 6);\r\n\r\n checkGLError(\"drawing floor\");\r\n }",
"public void draw() {\n \n // TODO\n }",
"private void renderLights() {\n\t\t\n\t}",
"public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }",
"public static void render(FPoint2 viewPt) {\n V.fillCircle(viewPt, V.getScale() * .4);\n }",
"public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}",
"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 synchronized void draw()\n\t{\n\t\t// First update the lighting of the world\n\t\t//int x = avatar.getX();\n\t\t//int y = avatar.getY();\t\t\n\n\t\tfor (int x = 0; x < width; x++)\n\t\t{\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\ttiles[x][y].draw(x, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = monsters.size() - 1; i >=0; i--)\n\t\t{\n\t\t\tMonster monster = monsters.get(i);\n\t\t\tint x = monster.getX();\n\t\t\tint y = monster.getY();\n\t\t\t\n\t\t\t// Check if the monster has been killed\n\t\t\tif (monster.getHitPoints() <= 0)\n\t\t\t{\n\t\t\t\tmonsters.remove(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (tiles[x][y].getLit())\n\t\t\t\t\tmonster.draw();\n\t\t\t}\n\t\t}\t\t\n\t\tavatar.draw();\n\t}",
"@Override\n public void draw(Canvas canvas)\n {\n\n animationM.draw(canvas, rectangle);\n\n }",
"private void draw() {\n\t\tgsm.draw(g);\n\t\tg.setColor(Color.WHITE);\n\t\tif (fps < 25)\n\t\t\tg.setColor(Color.RED);\n\t\tg.drawString(\"FPS: \" + fps, 10, 15);\n\t}",
"private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }",
"void drawLine(int startx,int starty,int endx,int endy,ImageView imageView){\n imageView.setVisibility(View.VISIBLE);\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStrokeWidth(20);\n paint.setStyle(Paint.Style.STROKE);\n\n canvas.drawLine(startx,starty,endx,endy,paint);\n\n //animates the drawing to fade in\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(4000);\n imageView.startAnimation(animation);\n }",
"@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tint count = canvas.saveLayer(0, 0, this.getWidth(), this.getHeight(), null, Canvas.ALL_SAVE_FLAG);\n\t\tcanvas.translate(0, original_view.getBottom() + reflection_spacing);\n\t\tif (!missing) {\n\t\t\tcanvas.save();\n\t\t\tcanvas.translate(original_view.getLeft(), original_view.getHeight());\n\t\t\tMatrix matrix = new Matrix();\n\t\t\tmatrix.postScale(scale, scale);\n\t\t\tmatrix.postScale(1, -1, -1, 1);\n\t\t\tcanvas.drawBitmap(original_bitmap, matrix, null);\n\t\t\tcanvas.restore();\n\t\t\tPaint paint = new Paint();\n\t\t\tpaint.setAntiAlias(false);\n\t\t\tfloat line_scale = large ? 1f / anim_scale : 1f;\n\t\t\tLinearGradient shader = new LinearGradient(0, 0, 0, original_view.getHeight() * reflection_scale\n\t\t\t\t\t* line_scale, 0x70ffffff, 0x00ffffff, TileMode.MIRROR);\n\t\t\t// 设置阴影\n\t\t\tpaint.setShader(shader);\n\t\t\tpaint.setXfermode(new PorterDuffXfermode(android.graphics.PorterDuff.Mode.DST_IN));\n\t\t\t// 用已经定义好的画笔构建一个矩形阴影渐变效果\n\t\t\tcanvas.drawRect(original_view.getLeft(), original_view.getTop(),\n\t\t\t\t\toriginal_view.getWidth(), original_view.getHeight()\n\t\t\t\t\t\t\t* reflection_scale, paint);\n\t\t}\n\t\tcanvas.restoreToCount(count);\n\t}",
"public void draw(Canvas canvas)\n {\n canvas.drawBitmap(animation.getImage(), x, y, null);\n }",
"public void draw(){\n hit();\n hit();\n }",
"void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}",
"public void paint() {\n paintStrategy.paintImmediately();\n }",
"@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\n\n\t\t// Reset the Modelview Matrix\n\t\tgl.glLoadIdentity();\n\n\t\t// Drawing\n\n\t\t\t\t\t\t\t\t\t\t\t\t// is the same as moving the camera 5 units away\n float widthRation = (float)this.screenWidth / this.bitmap.getWidth();\n float heightRatio = (float)this.screenHeight / this.bitmap.getHeight();\n// Log.v(\"justin\",)\n// gl.glScalef((float)this.screenWidth / this.bitmap.getWidth(), (float)this.screenHeight / this.bitmap.getHeight(), 1.0f);\n gl.glTranslatef(0.0f, 0.0f, -5.0f);\t\t// move 5 units INTO the screen\n\n//\t\tgl.glScalef(0.5f, 0.5f, 0.5f);\t\t\t// scale the square to 50% \n\t\t\t\t\t\t\t\t\t\t\t\t// otherwise it will be too large\n\t\t/*\n if(!this.bitmapDrawed) {\n WeakReference<Bitmap> weakBm = this.getBitmap();\n square.loadGLTexture(gl, this.context, weakBm.get());\n }else{\n\t\t\tsquare.loadGLTexture(gl, this.context);\n\t\t}\n\t\t*/\n\t\tsquare.loadGLTexture(gl, this.context, this.bitmap);\n\t\tsquare.draw(gl);\t\t\t\t\t\t// Draw the triangle\n\n\t}",
"protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"@SuppressLint(\"WrongCall\")\n private void drawMask() {\n clear(mMaskCanvas);\n draw(mMaskCanvas, mPaintTransparent);\n }",
"public void mo38880a() {\n mo38883a(this.f30731b0, (View) this.f30729a0);\n mo38883a(this.f30732c0, (View) this.f30736g0);\n mo38883a(this.f30733d0, (View) this.f30737h0);\n mo38883a(this.f30734e0, (View) this.f30738i0);\n }",
"private void initPaint() {\n paint = new Paint();\n paint.setAntiAlias(true);\n Bitmap bitmap = Bitmap.createBitmap(starSize, starSize, Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n lightDrawable.setBounds(0,0,starSize,starSize);\n lightDrawable.draw(canvas);\n paint.setShader(new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP));\n }",
"public void redraw(double angle, double speed) {\n }",
"public void drawOn(DrawSurface surface) {\n surface.setColor(this.color);\n surface.fillCircle(this.getX(), this.getY(), this.radius);\n }",
"private void drawDynamic() {\n GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix\n // (which now contains model * view * projection).\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Pass in the light position in eye space.\n GLES20.glUniform3f(mLightPosHandle, mLightPosInEyeSpace[0], mLightPosInEyeSpace[1], mLightPosInEyeSpace[2]);\n }",
"public void drawOn(DrawSurface surface){\r\n surface.setColor(color);\r\n surface.fillCircle((int)center.getX(),(int)center.getY(),radius);\r\n }",
"void render() {\n smooth();\n for (int x = 0; x < yvalues.length; x++) {\n noStroke();\n fill(0,0,255,100);\n ellipseMode(CENTER);\n ellipse(x*xspacing,yvalues[x],16,16);\n }\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}",
"@Override\n public void render(float v) {\n game.batch.begin();\n game.batch.draw(game.backgroundImg,0,0,viewport.getWorldWidth(), viewport.getWorldHeight());\n game.batch.end();\n\n stage.act();\n stage.draw();\n\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 }",
"void withDraw() {\n if (this.pointer != 0) {\n this.pointer--;\n }\n }",
"public void draw() {\r\n\t\tfor(int i=0; i<2; i++) {\r\n\t\t\trenderer[i].setView(camera[i]);\r\n\t\t\trenderer[i].render();\r\n\t\t}\r\n\t}",
"public void drawOn(DrawSurface surface) {\n surface.setColor(Color.WHITE);\n surface.fillCircle(this.getX(), this.getY(), this.radius);\n surface.setColor(Color.BLACK);\n surface.drawCircle(this.getX(), this.getY(), this.radius);\n }",
"protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}",
"private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void redraw() {\n firePropertyChange(AVKey.LAYER, null, this);\n }",
"public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }",
"public void draw() {\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n StdDraw.setXscale(-drawLength * 0.1, drawLength * 1.2);\n StdDraw.setYscale(-drawLength * 0.65, drawLength * 0.65);\n StdDraw.line(0, 0, drawLength, 0);\n StdDraw.text(-drawLength * 0.05, 0, \"0\");\n StdDraw.text(drawLength * 1.1, 0, Integer.toString(size()));\n }",
"void drawX(int startx1,int starty1,int endx1,int endy1,int startx2,int starty2,int endx2,int endy2,ImageView imageView){\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setStrokeWidth(10);\n canvas.drawLine(startx1,starty1,endx1,endy1,paint);\n canvas.drawLine(startx2,starty2,endx2,endy2,paint);\n imageView.setVisibility(View.VISIBLE);\n\n //animates the drawing to fadein\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(2000);\n imageView.startAnimation(animation);\n }",
"public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}",
"void drawO(float x,int y,ImageView imageView){\n Bitmap bitmap = Bitmap.createBitmap(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight(),Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n imageView.setImageBitmap(bitmap);\n\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setStrokeWidth(10);\n paint.setStyle(Paint.Style.STROKE);\n canvas.drawCircle(x,y,100,paint);\n imageView.setVisibility(View.VISIBLE);\n\n //animates the drawing to fade int\n Animation animation = new AlphaAnimation(0.0f,1.0f);\n animation.setDuration(2000);\n imageView.startAnimation(animation);\n }",
"private void initPaint() {\n mPaint = new Paint();\n mPaint.setAntiAlias(true);\n mStrokeWidth = 2.0f;\n mPaint.setStyle(Paint.Style.STROKE);// Hollow effect\n mPaint.setColor(mRippleColor);\n mPaint.setStrokeWidth(mStrokeWidth);// set the line width\n }",
"@Override public void onTap () {\n _vx = _rando.nextFloat() * (_rando.nextBoolean() ? -0.25f : 0.25f);\n _vy = _rando.nextFloat() * (_rando.nextBoolean() ? -0.25f : 0.25f);\n }",
"private void showDraw() {\n StdDraw.show(0);\n // reset the pen radius\n StdDraw.setPenRadius();\n }",
"public void drawOn(DrawSurface surface) {\n surface.setColor(this.color);\n surface.fillCircle(this.getX(), this.getY(), r);\n surface.setColor(Color.BLACK);\n surface.drawCircle(this.getX(), this.getY(), r);\n }",
"public void draw() {\n // Default widget draws nothing.\n }",
"public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}",
"public void drawSquareView() {\r\n \tview.updateSquare();\r\n \tview.drawSquare();\r\n }",
"public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }",
"public void update() {\n z += speed; // increase z by speed\n if (z > 750) { z = -5000; reset(); } // if beyond the camera, reset() and start again\n transparency = z<-2500?map(z, -5000, -2500, 0, 255):255; // far away slowly increase the transparency, within range is fully opaque\n }",
"public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }",
"private void renderEngine() {\r\n GL11.glDisable(GL11.GL_LIGHTING);\r\n\r\n GL11.glEnable(GL11.GL_BLEND);\r\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);\r\n\r\n shotTexture.bind();\r\n engine.render();\r\n\r\n GL11.glDisable(GL11.GL_BLEND);\r\n }",
"void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}",
"public void render() { image.drawFromTopLeft(getX(), getY()); }",
"public void setIllumination(Float illumination) {\n this.illumination = illumination;\n }",
"public void drawOn(DrawSurface surface) {\n //setting the color of the ball on the surface\n surface.setColor(this.color);\n\n //setting the ball on the surface as a full circle with center point and radius\n surface.fillCircle((int) center.getX(), (int) center.getY(), radius);\n }",
"public void drawHills() {Please try to remember how this retarded way of drawing hills works!\n //\n batch.draw(hill, hill1.getX(), hill1.getY(), hill1.getWidth(), hill1.getHeight());\n batch.draw(hill, hill2.getX(), hill2.getY(), hill2.getWidth(), hill2.getHeight());\n batch.draw(hill, hill3.getX(), hill3.getY(), hill3.getWidth(), hill3.getHeight());\n batch.draw(hill, hill4.getX(), hill4.getY(), hill4.getWidth(), hill4.getHeight());\n }",
"@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }",
"public void render() {\n this.canvas.repaint();\n }",
"public void drawElement(GL10 gl){\n\t\tgl.glTranslatef(x, y, 0);\n\t\tbaseDrawElement(gl);\n\t\tgl.glTranslatef(-x, -y, 0);\n//\t\tgl.glColor4f(1, 1, 1, 1);\n\t}",
"public void DrawScreen() {\r\n DrawScreen(0, false, null);\r\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制五角形\");\n\t}",
"public void drawOn(DrawSurface surface) {\n surface.setColor(Color.BLACK);\n surface.fillCircle(this.getX() + 1, this.getY() + 1, this.r);\n surface.setColor(this.color);\n surface.fillCircle(this.getX(), this.getY(), this.r);\n surface.setColor(Color.black);\n surface.drawCircle(this.getX(), this.getY(), this.r);\n }",
"private void setBitmapViewFull(Bitmap bitmap) {\n\n\t\t\tmCanvas.drawBitmap(bitmap, 0, 0, null);\n\t\t\tmCanvas.drawBitmap(bitmap, null, screenRect, null);\n\n\t\t\tif (DEBUG) {\n\t\t\t\tmCanvas.drawRect(recordRect, mRectPaint);\n\t\t\t\tmCanvas.drawRect(playRect, mRectPaint);\n\t\t\t}\n\t\t\tinvalidate();\n\t\t}",
"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 }",
"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 }",
"public void draw() {\n\n // Make sure our drawing surface is valid or we crash\n if (ourHolder.getSurface().isValid()) {\n // Lock the canvas ready to draw\n canvas = ourHolder.lockCanvas();\n // Draw the background color\n paint.setTypeface(tf);\n canvas.drawColor(Color.rgb(178,223,219));\n paint.setColor(Color.rgb(255,255,255));\n canvas.drawRect(offsetX, offsetY, width-offsetX, (height-100)-offsetY, paint);\n // Choose the brush color for drawing\n paint.setColor(Color.argb(50,0,0,0));\n paint.setFlags(Paint.ANTI_ALIAS_FLAG);\n // Make the text a bit bigger\n paint.setTextSize(40);\n paint.setStrokeWidth(5);\n paint.setStrokeCap(Paint.Cap.ROUND);\n // Display the current fps on the screen\n canvas.drawText(\"FPS:\" + fps, 20, 40, paint);\n paint.setTextSize(400);\n if(hasTouched == true) {\n if (count < 0) {\n canvas.drawText(0 + \"\", (width / 2) - 100, height / 2, paint);\n } else if(count<=numLines) {\n canvas.drawText(count + \"\", (width / 2) - 100, height / 2, paint);\n }\n } else {\n paint.setTextSize(100);\n canvas.drawText(\"TAP TO START\", (width / 2) - 300, height / 2, paint);\n }\n paint.setColor(Color.rgb(0,150,136));\n\n paint.setColor(color);\n\n canvas.drawCircle(xPosition, yPosition, radius, paint);\n\n paint.setColor(lineColor);\n\n if(isMoving==true && hasHit == false && count>=0) {\n canvas.drawLine(initialX, initialY, endX, endY, paint);\n }\n paint.setColor(Color.rgb(103,58,183));\n\n for(int i=0; i<verts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, verts[0].length, verts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n for (int i=0; i<innerVerts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, innerVerts[0].length, innerVerts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(canvas);\n\n //Display size and width\n\n }\n\n }",
"@Override\n public void fill(GL2 gl) {\n super.draw(gl);\n }",
"public void draw() {\n if (!myTurn()) {\n return;\n }\n draw(4 - handPile.size());\n }",
"public void drawRadar () {\n // material red (229,28,35)\n // philo red 204,17, 17 \n stroke(229,28,35, 255-cursorRad*(255/cursorRadMax));\n if (cursorRad < cursorRadMax) {\n ellipse(mouseX, mouseY, cursorRad, cursorRad);\n }\n else if (cursorRad > (cursorRadMax + cursorThreshold)) {\n cursorRad = 5;\n }\n cursorRad = cursorRad + cursorDelta;\n noStroke();\n }",
"public void display(GLAutoDrawable gLDrawable) {\n final GL2 gl = gLDrawable.getGL().getGL2(); \n gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); //clear buffers\n gl.glMatrixMode(GL2.GL_MODELVIEW);\n gl.glLoadIdentity();\t\n\n EffectsManager.getManager().updateLights(gl);\n //eye positition is set by Animator class, it looks at 0, 0, 0\n glu.gluLookAt(eyeLocation.x, eyeLocation.y, eyeLocation.z, 0, 0, 0, 0, 1, 0);\n \n gl.glPushMatrix();\n gl.glBegin(GL2.GL_QUADS);\n \n Random rand = new Random(100);\n \n for (QuadFace f : mesh) {\n \tfor (Vector3f v : f.getVertices()) {\n \t\tVector3f norm = normals.get(v);\n \t\tgl.glColor3f(rand.nextFloat(), rand.nextFloat(), rand.nextFloat());\n \t\tgl.glNormal3f(norm.x, norm.y, norm.z);\n \t\tgl.glVertex3f(v.x, v.y, v.z);\n \t}\n }\n gl.glEnd();\n gl.glPopMatrix();\n gl.glFlush(); \n }",
"void start() throws LWJGLException {\n\t\tthis.drawable = getDrawable();\n\t}",
"private void m76755g() {\n this.f61635e = new Paint();\n this.f61635e.setAntiAlias(true);\n this.f61635e.setColor(this.f61636f);\n this.f61635e.setStyle(Style.FILL);\n this.f61635e.setStrokeWidth(2.0f);\n }",
"public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}"
]
| [
"0.5516414",
"0.5372028",
"0.53547645",
"0.53069025",
"0.52468926",
"0.5233459",
"0.52130705",
"0.5170754",
"0.5147314",
"0.51389086",
"0.5076036",
"0.5069208",
"0.50561035",
"0.5054478",
"0.50410014",
"0.5036764",
"0.50349873",
"0.5028911",
"0.5022074",
"0.49968034",
"0.49957156",
"0.49860987",
"0.49815747",
"0.49767184",
"0.49706373",
"0.49700084",
"0.49217016",
"0.49196562",
"0.49177894",
"0.49154422",
"0.49122384",
"0.4900774",
"0.48931107",
"0.48858556",
"0.48567072",
"0.4854096",
"0.48507503",
"0.48503417",
"0.48251346",
"0.48229364",
"0.48209786",
"0.48140648",
"0.48137504",
"0.4811965",
"0.48108256",
"0.48094058",
"0.48058558",
"0.4796811",
"0.4792164",
"0.47868866",
"0.47858596",
"0.47853622",
"0.4784612",
"0.4777577",
"0.4773937",
"0.4771085",
"0.47686964",
"0.4768599",
"0.47672346",
"0.47664773",
"0.47467497",
"0.4746061",
"0.47447553",
"0.47429717",
"0.47354284",
"0.47211665",
"0.47180325",
"0.47173747",
"0.47148493",
"0.47124413",
"0.47066972",
"0.46962148",
"0.4695792",
"0.4695405",
"0.46909475",
"0.4684879",
"0.4677798",
"0.46771827",
"0.46703768",
"0.46699914",
"0.4669699",
"0.46671048",
"0.46642488",
"0.4654618",
"0.4654618",
"0.4654618",
"0.4654618",
"0.46542475",
"0.46492165",
"0.46487916",
"0.46463856",
"0.46463364",
"0.46356466",
"0.4635625",
"0.4634419",
"0.46311027",
"0.4627815",
"0.46248528",
"0.46239358",
"0.4622506"
]
| 0.6039536 | 0 |
Defines some reserved/commonly used property keys and values. | public interface ObjectPropConstants {
/**
* A property key for models used to store the last-modified time stamp.
* <p>
* Type: A time stamp, encoded using ISO 8601. (Can be parsed using {@code java.time.Instant}.)
* </p>
*/
String MODEL_FILE_LAST_MODIFIED = "tcs:modelFileLastModified";
/**
* A property key for the orientation of a vehicle on a path.
* <p>
* Type: String (any string - details currently not specified)
* </p>
*
* @deprecated Will be removed.
*/
@Deprecated
@ScheduledApiChange(when = "5.0", details = "Will be removed.")
String PATH_TRAVEL_ORIENTATION = "tcs:travelOrientation";
/**
* A property key for {@link VisualLayout} instances used to provide a hint for which
* {@link LocationTheme} implementation should be used for rendering locations in the
* visualization client.
* <p>
* Type: String (the fully qualified class name of an implementation of {@link LocationTheme})
* </p>
*
* @deprecated The theme to be used is now set directly via configuration.
*/
@Deprecated
@ScheduledApiChange(when = "5.0", details = "Will be removed.")
String LOCATION_THEME_CLASS = "tcs:locationThemeClass";
/**
* A property key for {@link LocationType} instances used to provide a hint for the visualization
* how locations of the type should be visualized.
* <p>
* Type: String (any element of {@link LocationRepresentation})
* </p>
*/
String LOCTYPE_DEFAULT_REPRESENTATION = "tcs:defaultLocationTypeSymbol";
/**
* A property key for {@link Location} instances used to provide a hint for the visualization how
* the locations should be visualized.
* <p>
* Type: String (any element of {@link LocationRepresentation})
* </p>
*/
String LOC_DEFAULT_REPRESENTATION = "tcs:defaultLocationSymbol";
/**
* A property key for {@link Vehicle} instances to store a preferred initial position to be used
* by simulating communication adapter, for example.
* <p>
* Type: String (any name of a {@link Point} existing in the same model.
* </p>
*
* @deprecated Use vehicle driver-specific properties to specify the vehicle's initial position.
*/
@Deprecated
@ScheduledApiChange(when = "5.0", details = "Will be removed.")
String VEHICLE_INITIAL_POSITION = "tcs:initialVehiclePosition";
/**
* A property key for {@link VisualLayout} instances used to provide a hint for which
* {@link VehicleTheme} implementation should be used for rendering vehicles in the visualization
* client.
* <p>
* Type: String (the fully qualified class name of an implementation of {@link VehicleTheme})
* </p>
*
* @deprecated The theme to be used is now set directly via configuration.
*/
@Deprecated
@ScheduledApiChange(when = "5.0", details = "Will be removed.")
String VEHICLE_THEME_CLASS = "tcs:vehicleThemeClass";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initReservedAttributes()\n {\n addIgnoreProperty(ATTR_IF_NAME);\n addIgnoreProperty(ATTR_REF);\n addIgnoreProperty(ATTR_UNLESS_NAME);\n addIgnoreProperty(ATTR_BEAN_CLASS);\n addIgnoreProperty(ATTR_BEAN_NAME);\n }",
"private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}",
"private static Map<String, String> createPropertiesAttrib() {\r\n Map<String, String> map = new HashMap<String, String>();\r\n map.put(\"Property1\", \"Value1SA\");\r\n map.put(\"Property3\", \"Value3SA\");\r\n return map;\r\n }",
"protected abstract Property createProperty(String key, Object value);",
"protected static void initPropertyKey() {\n String path = URL_PREFIX + SCHEMA_PKS;\n\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"name\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"age\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"city\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"lang\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"date\\\",\\n\"\n + \"\\\"data_type\\\": \\\"TEXT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"price\\\",\\n\"\n + \"\\\"data_type\\\": \\\"INT\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n createAndAssert(path, \"{\\n\"\n + \"\\\"name\\\": \\\"weight\\\",\\n\"\n + \"\\\"data_type\\\": \\\"DOUBLE\\\",\\n\"\n + \"\\\"cardinality\\\": \\\"SINGLE\\\",\\n\"\n + \"\\\"check_exist\\\": false,\\n\"\n + \"\\\"properties\\\":[]\\n\"\n + \"}\", 202);\n }",
"public String[] getUsedPropertyKeys() {\n\t\treturn new String[] { IDevice.OFFSET, IDevice.FACTOR, IDevice.REDUCTION };\n\t}",
"private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }",
"Map<String, String> properties();",
"Map<String, String> properties();",
"public interface Keys {\n String VIEW_PAGER_INDEX = \"view_pager_index\";\n String LOCAL_MUSIC_POSITION = \"local_music_position\";\n String LOCAL_MUSIC_OFFSET = \"local_music_offset\";\n String PLAYLIST_POSITION = \"playlist_position\";\n String PLAYLIST_OFFSET = \"playlist_offset\";\n}",
"@Override\n\t\tpublic Iterable<String> getPropertyKeys() {\n\t\t\treturn null;\n\t\t}",
"private Hashtable<String, ?> declareSpaceProps() {\n\t\tfinal Hashtable<String, Object> props = new Hashtable<String, Object>();\n\n\t\tprops.put(\"sapere.rdf-based\", Boolean.TRUE);\n\t\tprops.put(\"sapere.acid-transactions\", Boolean.FALSE);\n\t\tprops.put(\"sapere.lsa-space.with-reasoner\", Boolean.TRUE);\n\n\t\treturn props;\n\t}",
"Map<String, Object> properties();",
"public void setupProperties() {\n // left empty for subclass to override\n }",
"private void LoadCoreValues()\n\t{\n\t\tString[] reservedWords = \t{\"program\",\"begin\",\"end\",\"int\",\"if\",\"then\",\"else\",\"while\",\"loop\",\"read\",\"write\"};\n\t\tString[] specialSymbols = {\";\",\",\",\"=\",\"!\",\"[\",\"]\",\"&&\",\"||\",\"(\",\")\",\"+\",\"-\",\"*\",\"!=\",\"==\",\"<\",\">\",\"<=\",\">=\"};\n\t\t\n\t\t//Assign mapping starting at a value of 1 for reserved words\n\t\tfor (int i=0;i<reservedWords.length;i++)\n\t\t{\n\t\t\tcore.put(reservedWords[i], i+1);\n\t\t}\n\t\t//Assign mapping for special symbols\n\t\tfor (int i=0; i<specialSymbols.length; i++)\n\t\t{\t\n\t\t\tcore.put(specialSymbols[i], reservedWords.length + i+1 );\n\t\t}\n\t}",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }",
"public interface KeyValueConst {\n\n String PUBLIC_KEY = \"PublicKey\";\n String PRIVATE_KEY = \"PrivateKey\";\n}",
"public static Map<String, Property> getDefaultMapping() {\n\t\tMap<String, Property> props = new HashMap<String, Property>();\n\t\tprops.put(\"nstd\", Property.of(p -> p.nested(n -> n.enabled(true))));\n\t\tprops.put(\"properties\", Property.of(p -> {\n\t\t\t\tif (nestedMode()) {\n\t\t\t\t\tp.nested(n -> n.enabled(true));\n\t\t\t\t} else {\n\t\t\t\t\tp.object(n -> n.enabled(true));\n\t\t\t\t}\n\t\t\t\treturn p;\n\t\t\t}\n\t\t));\n\t\tprops.put(\"latlng\", Property.of(p -> p.geoPoint(n -> n.nullValue(v -> v.text(\"0,0\")))));\n\t\tprops.put(\"_docid\", Property.of(p -> p.long_(n -> n.index(false))));\n\t\tprops.put(\"updated\", Property.of(p -> p.date(n -> n.format(DATE_FORMAT))));\n\t\tprops.put(\"timestamp\", Property.of(p -> p.date(n -> n.format(DATE_FORMAT))));\n\n\t\tprops.put(\"tag\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"id\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"key\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"name\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"type\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"tags\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"token\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"email\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"appid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"groups\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"password\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"parentid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"creatorid\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\tprops.put(\"identifier\", Property.of(p -> p.keyword(n -> n.index(true))));\n\t\treturn props;\n\t}",
"public PropertiesQDoxPropertyExpander() {\n super();\n }",
"@SuppressWarnings(\"unused\")\n private MyPropertiesMapEntry() {\n this.key = null;\n this.value = null;\n }",
"public interface Properties {\r\n\r\n\t/**\r\n\t * Returns the raw value of the key, or null if not found.\r\n\t */\r\n\tpublic Object getObject(String key);\r\n\t\r\n\t/**\r\n\t * Returns an untyped Iterable for iterating through the raw contents of an array. \r\n\t */\r\n\tpublic Iterable<Object> getObjects(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a string, or default value if not found.\r\n\t */\r\n\tpublic String getString(String key, String defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a string Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<String> getStrings(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a boolean, or default value if not found.\r\n\t */\r\n\tpublic Boolean getBoolean(String key, Boolean defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a boolean Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Boolean> getBooleans(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an integer, or default value if not found.\r\n\t */\r\n\tpublic Integer getInteger(String key, Integer defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns an integer Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Integer> getIntegers(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a long, or default value if not found.\r\n\t */\r\n\tpublic Long getLong(String key, Long defaultValue);\r\n\r\n\t/**\r\n\t * Returns a long Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Long> getLongs(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an float, or default value if not found.\r\n\t */\r\n\tpublic Float getFloat(String key, Float defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a float Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Float> getFloats(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a double, or default value if not found.\r\n\t */\r\n\tpublic Double getDouble(String key, Double defaultValue);\r\n\r\n\t\r\n\t/**\r\n\t * Returns a double Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Double> getDoubles(String key);\r\n\t\r\n\r\n\t\r\n\t/**\r\n\t * Returns a nested set of properties for the specified key, or default value if not found.\r\n\t */\r\n\tpublic Properties getPropertiesSet(String key, Properties defaultValue);\r\n\r\n\t/**\r\n\t * Returns a Properties Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Properties> getPropertiesSets(String key);\r\n\t\r\n}",
"@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}",
"public interface PrefsKey {\n\n String Ssid = \"Ssid\";\n String HotKeys = \"HotKeys\";\n String HistoryKeys = \"HistoryKeys\";\n String HistoryCooking = \"HistoryCooking\";\n\n String Guided = \"Guided\";\n}",
"@Override\n\t\tpublic Map<String, Object> getProperties(String... keys) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic void addProperty(String key, String value) {\n\n\t\tif (key.equals(key_delimiter) && value.length() == 1) {\n\t\t\tvalue = \"#\" + String.valueOf((int) value.charAt(0));\n\t\t}\n\t\tsuper.addProperty(key, value);\n\t}",
"String[] getPropertyKeys();",
"protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }",
"public void testCustomerProperties()\n {\n final String KEY = \"Schlüssel ä\";\n final String VALUE_1 = \"Wert 1\";\n final String VALUE_2 = \"Wert 2\";\n\n CustomProperty cp;\n CustomProperties cps = new CustomProperties();\n assertEquals(0, cps.size());\n\n /* After adding a custom property the size must be 1 and it must be\n * possible to extract the custom property from the map. */\n cps.put(KEY, VALUE_1);\n assertEquals(1, cps.size());\n Object v1 = cps.get(KEY);\n assertEquals(VALUE_1, v1);\n \n /* After adding a custom property with the same name the size must still\n * be one. */\n cps.put(KEY, VALUE_2);\n assertEquals(1, cps.size());\n Object v2 = cps.get(KEY);\n assertEquals(VALUE_2, v2);\n \n /* Removing the custom property must return the remove property and\n * reduce the size to 0. */\n cp = (CustomProperty) cps.remove(KEY);\n assertEquals(KEY, cp.getName());\n assertEquals(VALUE_2, cp.getValue());\n assertEquals(0, cps.size());\n }",
"public void setupKeys()\n {\n KeyAreaInfo keyArea = null;\n keyArea = new KeyAreaInfo(this, Constants.UNIQUE, \"PrimaryKey\");\n keyArea.addKeyField(\"ID\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, \"CurrencyCode\");\n keyArea.addKeyField(\"CurrencyCode\", Constants.ASCENDING);\n keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, \"Description\");\n keyArea.addKeyField(\"Description\", Constants.ASCENDING);\n }",
"@Test\n public void testGetReservedKeys() {\n assertEquals(\"Timestamp must match\",TIMESTAMP.toString(), ev.get(\"_timestamp\"));\n assertEquals(\"Sources must match\",source,ev.get(\"_source\"));\n }",
"public interface Keys {\n String STRING = \"string\";\n String NUM = \"num\";\n String PERSON = \"person\";\n}",
"private void prepKeyBindings() { \r\n prepNumberKeys();\r\n prepOperatorKeys();\r\n prepSupplementalKeys();\r\n }",
"private PropertiesUtils() {}",
"void setProperty(String key, Object value);",
"protected void fillMapFromProperties(Properties props)\n {\n Enumeration<?> en = props.propertyNames();\n\n while (en.hasMoreElements())\n {\n String propName = (String) en.nextElement();\n\n // ignore map, pattern_map; they are handled separately\n if (!propName.startsWith(\"map\") &&\n !propName.startsWith(\"pattern_map\"))\n {\n String propValue = props.getProperty(propName);\n String fieldDef[] = new String[4];\n fieldDef[0] = propName;\n fieldDef[3] = null;\n if (propValue.startsWith(\"\\\"\"))\n {\n // value is a constant if it starts with a quote\n fieldDef[1] = \"constant\";\n fieldDef[2] = propValue.trim().replaceAll(\"\\\"\", \"\");\n }\n else\n // not a constant\n {\n // split it into two pieces at first comma or space\n String values[] = propValue.split(\"[, ]+\", 2);\n if (values[0].startsWith(\"custom\") || values[0].equals(\"customDeleteRecordIfFieldEmpty\") ||\n values[0].startsWith(\"script\"))\n {\n fieldDef[1] = values[0];\n\n // parse sections of custom value assignment line in\n // _index.properties file\n String lastValues[];\n // get rid of empty parens\n if (values[1].indexOf(\"()\") != -1)\n values[1] = values[1].replace(\"()\", \"\");\n\n // index of first open paren after custom method name\n int parenIx = values[1].indexOf('(');\n\n // index of first unescaped comma after method name\n int commaIx = Utils.getIxUnescapedComma(values[1]);\n\n if (parenIx != -1 && commaIx != -1 && parenIx < commaIx) {\n // remainder should be split after close paren\n // followed by comma (optional spaces in between)\n lastValues = values[1].trim().split(\"\\\\) *,\", 2);\n\n // Reattach the closing parenthesis:\n if (lastValues.length == 2) lastValues[0] += \")\";\n }\n else\n // no parens - split comma preceded by optional spaces\n lastValues = values[1].trim().split(\" *,\", 2);\n\n fieldDef[2] = lastValues[0].trim();\n\n fieldDef[3] = lastValues.length > 1 ? lastValues[1].trim() : null;\n // is this a translation map?\n if (fieldDef[3] != null && fieldDef[3].contains(\"map\"))\n {\n try\n {\n fieldDef[3] = loadTranslationMap(props, fieldDef[3]);\n }\n catch (IllegalArgumentException e)\n {\n logger.error(\"Unable to find file containing specified translation map (\" + fieldDef[3] + \")\");\n throw new IllegalArgumentException(\"Error: Problems reading specified translation map (\" + fieldDef[3] + \")\");\n }\n }\n } // end custom\n else if (values[0].equals(\"xml\") ||\n values[0].equals(\"raw\") ||\n values[0].equals(\"date\") ||\n values[0].equals(\"json\") ||\n values[0].equals(\"json2\") ||\n values[0].equals(\"index_date\") ||\n values[0].equals(\"era\"))\n {\n fieldDef[1] = \"std\";\n fieldDef[2] = values[0];\n fieldDef[3] = values.length > 1 ? values[1].trim() : null;\n // NOTE: assuming no translation map here\n if (fieldDef[2].equals(\"era\") && fieldDef[3] != null)\n {\n try\n {\n fieldDef[3] = loadTranslationMap(props, fieldDef[3]);\n }\n catch (IllegalArgumentException e)\n {\n logger.error(\"Unable to find file containing specified translation map (\" + fieldDef[3] + \")\");\n throw new IllegalArgumentException(\"Error: Problems reading specified translation map (\" + fieldDef[3] + \")\");\n }\n }\n }\n else if (values[0].equalsIgnoreCase(\"FullRecordAsXML\") ||\n values[0].equalsIgnoreCase(\"FullRecordAsMARC\") ||\n values[0].equalsIgnoreCase(\"FullRecordAsJson\") ||\n values[0].equalsIgnoreCase(\"FullRecordAsJson2\") ||\n values[0].equalsIgnoreCase(\"FullRecordAsText\") ||\n values[0].equalsIgnoreCase(\"DateOfPublication\") ||\n values[0].equalsIgnoreCase(\"DateRecordIndexed\"))\n {\n fieldDef[1] = \"std\";\n fieldDef[2] = values[0];\n fieldDef[3] = values.length > 1 ? values[1].trim() : null;\n // NOTE: assuming no translation map here\n }\n else if (values.length == 1)\n {\n fieldDef[1] = \"all\";\n fieldDef[2] = values[0];\n fieldDef[3] = null;\n }\n else\n // other cases of field definitions\n {\n String values2[] = values[1].trim().split(\"[ ]*,[ ]*\", 2);\n fieldDef[1] = \"all\";\n if (values2[0].equals(\"first\") ||\n (values2.length > 1 && values2[1].equals(\"first\")))\n fieldDef[1] = \"first\";\n\n if (values2[0].startsWith(\"join\"))\n fieldDef[1] = values2[0];\n\n if ((values2.length > 1 && values2[1].startsWith(\"join\")))\n fieldDef[1] = values2[1];\n\n if (values2[0].equalsIgnoreCase(\"DeleteRecordIfFieldEmpty\") ||\n (values2.length > 1 && values2[1].equalsIgnoreCase(\"DeleteRecordIfFieldEmpty\")))\n fieldDef[1] = \"DeleteRecordIfFieldEmpty\";\n\n fieldDef[2] = values[0];\n fieldDef[3] = null;\n\n // might we have a translation map?\n if (!values2[0].equals(\"all\") &&\n !values2[0].equals(\"first\") &&\n !values2[0].startsWith(\"join\") &&\n !values2[0].equalsIgnoreCase(\"DeleteRecordIfFieldEmpty\"))\n {\n fieldDef[3] = values2[0].trim();\n if (fieldDef[3] != null)\n {\n try\n {\n fieldDef[3] = loadTranslationMap(props, fieldDef[3]);\n }\n catch (IllegalArgumentException e)\n {\n logger.error(\"Unable to find file containing specified translation map (\" + fieldDef[3] + \")\");\n throw new IllegalArgumentException(\"Error: Problems reading specified translation map (\" + fieldDef[3] + \")\");\n }\n }\n }\n } // other cases of field definitions\n\n } // not a constant\n\n fieldMap.put(propName, fieldDef);\n\n } // if not map or pattern_map\n\n } // while enumerating through property names\n\n // verify that fieldMap is valid\n verifyCustomMethodsAndTransMaps();\n }",
"private DatabaseValidationProperties() {}",
"private static Properties createLoaderProperties(String inPrefix) {\r\n Properties props = new Properties();\r\n props.setProperty(inPrefix + \"Property1\", \"Value1Prop\");\r\n props.setProperty(inPrefix + \"Property2\", \"Value2Prop\");\r\n return props;\r\n }",
"public\n YutilProperties()\n {\n super(new Properties());\n }",
"StringMap getProperties();",
"protected abstract void loadProperty(String key, String value);",
"public static void registerProps() throws API_Exception {\n\t\tProperties.registerProp( DOCKER_IMG_VERSION, Properties.STRING_TYPE, DOCKER_IMG_VERSION_DESC );\n\t\tProperties.registerProp( SAVE_CONTAINER_ON_EXIT, Properties.BOOLEAN_TYPE, SAVE_CONTAINER_ON_EXIT_DESC );\n\t\tProperties.registerProp( DOCKER_HUB_USER, Properties.STRING_TYPE, DOCKER_HUB_USER_DESC );\n\t}",
"public void addProperty(String key, String value);",
"public void setProperty(String key, Object value);",
"public void setProperty( String key, Object value );",
"public static void setProp(PropertiesAllowedKeys key, String value) {\n\t\tproperties.setProperty(key.toString(), value);\n\t\tpersistSettings();\n\t}",
"public interface Keys {\n\n String PUBLIC_REPOS = \"repos\";\n String USER = \"user\";\n String ID = \"id\";\n}",
"public DefaultProperties() {\n\t\t// Festlegung der Werte für Admin-Zugang\n\t\tthis.setProperty(\"admin.username\", \"admin\");\n\t\tthis.setProperty(\"admin.password\", \"password\");\n\t\tthis.setProperty(\"management.port\", \"8443\");\n\n\t\t// Festlegung der Werte für CouchDB-Verbindung\n\t\tthis.setProperty(\"couchdb.adress\", \"http://localhost\");\n\t\tthis.setProperty(\"couchdb.port\", \"5984\");\n\t\tthis.setProperty(\"couchdb.databaseName\", \"profiles\");\n\n\t\t// Festlegung der Werte für Zeitvergleiche\n\t\tthis.setProperty(\"server.minTimeDifference\", \"5\");\n\t\tthis.setProperty(\"server.monthsBeforeDeletion\", \"18\");\n\t}",
"@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}",
"@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }",
"public Q706DesignHashMap() {\n keys = new ArrayList<>();\n values = new ArrayList<>();\n\n }",
"protected PropertyPreference(ExternalKey stakeholderKey, ExternalKey propertyKey,\n String namespace) {\n super(stakeholderKey, namespace);\n setPropertyKey(propertyKey);\n }",
"public Key()\n {\n name = \"\";\n fields = new Vector<String>();\n options = new Vector<String>();\n isPrimary = false;\n isUnique = false;\n }",
"void createPropertyKeyToken( String key, int id );",
"public interface GlobalKeys {\n\n\tString MESSAGE = \"message\";\n\n\tString PERSON = \"person\";\n\n\tString PERSON_TOKEN = \"personToken\";\n}",
"public Map<String, Property> keyValueMap(){\n int paddingCount = 1;\n Map<String, Property> result = new HashMap<String, Property>();\n String lastKey = null;\n for (Property parameter : this.getProperties()) {\n String newKey = new String(parameter.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.put(newKey, new Property(parameter));\n lastKey = newKey;\n }\n return result;\n }",
"public abstract boolean isAllowCustomProperties();",
"public interface WatermarkerProperty {\n\n String TEXT = \"application.default.text\";\n String COLOR = \"application.default.color\";\n String FONT = \"application.default.font\";\n String OPACITY = \"application.default.opacity\";\n String TEXT_SIZE = \"application.default.text.size\";\n String STEP_X = \"application.default.stepx\";\n String STEP_Y = \"application.default.stepy\";\n String RADIUS = \"application.default.radius\";\n\n\n}",
"protected void addRequestedProperty(String key, String value)\n\t{\n\t\tLinkedHashSet<String> values = requestedProperties.get(key);\n\t\tif (values == null)\n\t\t{\n\t\t\tvalues = new LinkedHashSet<String>();\n\t\t\trequestedProperties.put(key.trim(), values);\n\t\t}\n\t\tvalues.add(value == null ? \"null\" : value.trim());\n\t}",
"public MagicDictionary() {\n this.map = new HashMap<>();\n }",
"public Iterator<String> getUserDefinedProperties();",
"protected Map createPropertiesMap() {\n return new HashMap();\n }",
"public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}",
"protected final void addPropNames(String ... theNames) { Collections.addAll(getPropertyNames(), theNames); }",
"public void initProperties() {\n propAssetClass = addProperty(AssetComponent.PROP_CLASS, \"MilitaryOrganization\");\n propAssetClass.setToolTip(PROP_CLASS_DESC);\n propUniqueID = addProperty(AssetComponent.PROP_UID, \"UTC/RTOrg\");\n propUniqueID.setToolTip(PROP_UID_DESC);\n propUnitName = addProperty(AssetComponent.PROP_UNITNAME, \"\");\n propUnitName.setToolTip(PROP_UNITNAME_DESC);\n propUIC = addProperty(PROP_UIC, \"\");\n propUIC.setToolTip(PROP_UIC_DESC);\n }",
"private static void setProperty(String key, String value)\r\n/* 84: */ throws IOException\r\n/* 85: */ {\r\n/* 86: 83 */ log.finest(\"OSHandler.setProperty. Key=\" + key + \" Value=\" + value);\r\n/* 87: 84 */ File propsFile = getPropertiesFile();\r\n/* 88: 85 */ FileInputStream fis = new FileInputStream(propsFile);\r\n/* 89: 86 */ Properties props = new Properties();\r\n/* 90: 87 */ props.load(fis);\r\n/* 91: 88 */ props.setProperty(key, value);\r\n/* 92: 89 */ FileOutputStream fos = new FileOutputStream(propsFile);\r\n/* 93: 90 */ props.store(fos, \"\");\r\n/* 94: 91 */ fos.close();\r\n/* 95: */ }",
"public interface PropertyValues {\n\n String DEFAULT_PRO_FILE = \"/data/MyPerf4J/MyPerf4J.properties\";\n\n String RECORDER_MODE_ACCURATE = \"accurate\";\n\n String RECORDER_MODE_ROUGH = \"rough\";\n\n int MIN_BACKUP_RECORDERS_COUNT = 1;\n\n int MAX_BACKUP_RECORDERS_COUNT = 8;\n\n String DEFAULT_PERF_STATS_PROCESSOR = DefaultStdoutProcessor.class.getName();\n\n long DEFAULT_TIME_SLICE = 60 * 1000L;\n\n long MIN_TIME_SLICE = 1000L;\n\n long MAX_TIME_SLICE = 10 * 60 * 1000L;\n\n String FILTER_SEPARATOR = \";\";\n\n}",
"public KanbanProperties(String description) {\n this.description = description;\n }",
"@Override\n public Map<String, String> getProperties()\n {\n return null;\n }",
"@Override\n public Map<String, String> getProperties() {\n return null;\n }",
"@Override\n\tpublic void setProperty(int arg0, Object arg1) {\n\t\tif (arg1 == null)\n\t\t\treturn;\n\t\tswitch (arg0) {\n\t\tcase 0:\n\t\t\tthis.EntityKey=arg1.toString();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tthis.Id=Integer.valueOf(arg1.toString());\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.Description=arg1.toString();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.StartDate=arg1.toString();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.EndDate=arg1.toString();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public interface RouterParamKey {\n\n String NAME = \"name\";\n String VALUE = \"value\";\n String KEY = \"key\";\n String PHONE = \"phone\";\n String USERNAME = \"username\";\n String PASSWORD = \"password\";\n String ID = \"id\";\n String USER_INFO = \"user_info\";\n String PATH = \"path\";\n String PARAM_DATA = \"param_data\";\n\n}",
"public Property(String key, Object value)\r\n {\r\n m_key = key;\r\n m_value = value;\r\n }",
"public GeneralDictionary() {\n map = new TreeMap<String, String>();\n map.put(\"book\", \"a set of written or printed pages, usually bound with \" + \"a protective cover\");\n map.put(\"editor\", \"a person who edits\");\n }",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"public interface Constants\n{\n\tString EMAIL = \"email\";\n\tString RECORD_ID = \"_id\";\n\tString ENTRY_DATE = \"entryDate\";\n\tString DATE_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssXXX\";\n\tString LEADS = \"leads\";\n}",
"void putClientProperty(Object key, Object value);",
"private void storeProperties() {\n storeValue(Variable.MODE);\n storeValue(Variable.ITEM);\n storeValue(Variable.DEST_PATH);\n storeValue(Variable.MAXTRACKS_ENABLED);\n storeValue(Variable.MAXTRACKS);\n storeValue(Variable.MAXSIZE_ENABLED);\n storeValue(Variable.MAXSIZE);\n storeValue(Variable.MAXLENGTH_ENABLED);\n storeValue(Variable.MAXLENGTH);\n storeValue(Variable.ONE_MEDIA_ENABLED);\n storeValue(Variable.ONE_MEDIA);\n storeValue(Variable.CONVERT_MEDIA);\n storeValue(Variable.CONVERT_COMMAND);\n storeValue(Variable.NORMALIZE_FILENAME);\n storeValue(Variable.RATING_LEVEL);\n }",
"protected NodeProperties() {\r\n }",
"public void setPropKey(String propKey) {\n this.propKey = propKey;\n }",
"private DataKeys(String pKey) {\n key = pKey;\n }",
"private PropertyHolder() {\n }",
"private NoValue(K key) {\n this.key = key;\n }",
"public void testSpecialNames() throws MPXJException {\n TaskManager taskManager = getTaskManager();\n CustomPropertyDefinition col1 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(String.class), \"Text1\", null);\n CustomPropertyDefinition col2 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Boolean.class), \"Flag2\", null);\n CustomPropertyDefinition col3 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"Number3\", null);\n CustomPropertyDefinition col4 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Double.class), \"Number4\", null);\n CustomPropertyDefinition col5 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(GanttCalendar.class), \"Date5\", null);\n CustomPropertyDefinition col6 = taskManager.getCustomPropertyManager().createDefinition(\n CustomPropertyManager.PropertyTypeEncoder.encodeFieldType(Integer.class), \"Cost6\", null);\n\n Map<CustomPropertyDefinition, FieldType> mapping = CustomPropertyMapping.buildMapping(taskManager);\n assertEquals(TaskField.TEXT1, mapping.get(col1));\n assertEquals(TaskField.FLAG2, mapping.get(col2));\n assertEquals(TaskField.NUMBER3, mapping.get(col3));\n assertEquals(TaskField.NUMBER4, mapping.get(col4));\n assertEquals(TaskField.DATE5, mapping.get(col5));\n assertEquals(TaskField.COST6, mapping.get(col6));\n }",
"public Iterable<String> getPropertyKeys();",
"public void setProp(String key, String value){\t\t\n \t\t//Check which of property to set & set it accordingly\n \t\tif(key.equals(\"UMPD.latestReport\")){\n \t\t\tthis.setLatestReport(value);\n<<<<<<< HEAD\n\t\t} \n=======\n \t\t\treturn;\n \t\t} \n \t\tif (key.equals(\"UMPD.latestVideo\")) {\n \t\t\tthis.setLastestVideo(value);\n \t\t\treturn;\n \t\t}\n>>>>>>> 45a14c6cf04ac0844f8d8b43422597ae953e0c42\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return - a list of <code>FieldAndval</code> objects representing the set \n \t * properties\n \t */\n \tpublic ArrayList<FieldAndVal> getSetPropsList(){\n \t\tcreateSetPropsList();\n \t\treturn setPropsList;\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * \n \t */\n \tprivate void createSetPropsList(){\n \t\tif((this.latestReport).length()>0){\n \t\t\tsetPropsList.add(new FieldAndVal(\"UMPD.latestReport\", this.latestReport));\n \t\t}\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return lastestVideo - \n \t */\n \tpublic String getLastestVideo() {\n \t\treturn lastestVideo;\n \t}",
"void initProperties()\n\t{\n\t\tpropertyPut(LIST_SIZE, 10);\n\t\tpropertyPut(LIST_LINE, 1);\n\t\tpropertyPut(LIST_MODULE, 1); // default to module #1\n\t\tpropertyPut(COLUMN_WIDTH, 70);\n\t\tpropertyPut(UPDATE_DELAY, 25);\n\t\tpropertyPut(HALT_TIMEOUT, 7000);\n\t\tpropertyPut(BPNUM, 0);\t\t\t\t// set current breakpoint number as something bad\n\t\tpropertyPut(LAST_FRAME_DEPTH, 0);\t\t// used to determine how much context information should be displayed\n\t\tpropertyPut(CURRENT_FRAME_DEPTH, 0); // used to determine how much context information should be displayed\n\t\tpropertyPut(DISPLAY_FRAME_NUMBER, 0); // houses the current frame we are viewing\n\t\tpropertyPut(FILE_LIST_WRAP, 999999); // default 1 file name per line\n\t\tpropertyPut(NO_WAITING, 0);\n\t\tpropertyPut(INFO_STACK_SHOW_THIS, 1); // show this pointer for info stack\n\t}",
"protected Map<String, Object> getVariables() throws NamingException {\r\n\t\tMap<String, Object> variables = new HashMap<String, Object>();\r\n\t\tvariables.put(\"account.id\", getAccountUser().getAccount().getId());\r\n\t\tvariables.put(\"user.id\", getAccountUser().getUser().getId());\r\n\t\tvariables.put(\"now\", new Date());\r\n\t\tvariables.put(\"placeholder.id:patient\", getPlaceholderId());\r\n\t\treturn variables;\r\n\t}",
"public MagicDictionary() {\n\n }",
"public final void setDefautlVals() {\n this.createTime = this.writeTime = GlobalMethods.getTimeStamp(null);\n this.createId = this.writeId = PackagingVars.context.getUser().getId();\n }",
"public PropertyMap createPCDATAMap()\n {\n checkState();\n return super.createPCDATAMap();\n }",
"private PropertiesHelper() {\n throw new AssertionError(\"Cannot instantiate this class\");\n }",
"public\n YutilProperties(YutilProperties argprops)\n {\n super(new Properties());\n setPropertiesDefaults(argprops);\n }",
"private GestionnaireLabelsProperties() {\r\n\t\tsuper();\r\n\t}",
"protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}",
"@Override\n protected void setInitialValues() {\n overrideProperty.set(false);\n typeProperty.set(\"0800\");\n }",
"public void setProperties(String primitive, AnimationProperties properties){\r\n\t\tpropMap.put(primitive, properties);\r\n\t}",
"private void addAlmostAll(Hashtable props) {\n Enumeration e = props.keys();\n while (e.hasMoreElements()) {\n String key = e.nextElement().toString();\n if (\"basedir\".equals(key) || \"ant.file\".equals(key)) {\n // basedir and ant.file get special treatment in execute()\n continue;\n }\n \n String value = props.get(key).toString();\n // don't re-set user properties, avoid the warning message\n if (newProject.getProperty(key) == null) {\n // no user property\n newProject.setNewProperty(key, value);\n }\n }\n }",
"public interface KeyValueConstants {\n String HARDWARE_NAME = \"hardwareName\";\n String HARDWARE_TYPE = \"HardwareType\";\n String SOFTWARE_ID = \"SoftwareId\";\n String SOFTWARE_COUNT = \"SoftwareCount\";\n String SOFTWARE_DETAILS = \"SoftwareDetails\";\n String HARDWARE_TYPE_ID = \"Type\";\n String HARDWARE_TYPE_NAME = \"HardwareType\";\n String RESOURCE_NAME = \"ResourceName\";\n String RESOURCE_TYPE = \"ResourceType\";\n String ADMIN_NAME = \"AdminName\";\n String REQUESTED_ON=\"RequestedOn\";\n String REQUESTED_TILL=\"RequestedTill\";\n String MAC_ID = \"MacId\";\n String HARDWARE_BRAND = \"HardwareBrand\";\n String AVAILABILITY = \"Availablity\";\n String DESCRIPTION = \"Description\";\n String REQUESTED_BY = \"RequestedBy\";\n String USER_ID = \"UserId\";\n String REQUEST_ID = \"RequestId\";\n String HARDWARE_PENDING_REQUEST_OBJECT = \"hardwarePendingRequestObject\";\n String BRAND = \"Brand\";\n String MODEL = \"Model\";\n String HARDWARE_DETAILS = \"HardwareDetails\";\n String HARDWARE_ID = \"HardwareId\";\n String FIRST_NAME = \"FirstName\";\n String USER_NAME = \"UserName\";\n String FULLNAME = \"FullNAme\";\n String COUNT = \"Count\";\n String RESOURCE_CATEGORY = \"ResourceCategory\";\n String RESOURCE_CATEGORY_ID = \"ResourceCategoryId\";\n String REQUESTED_RESOURCE = \"RequestedResource\";\n String ASSIGNED_TO = \"AssignedTo\";\n String ASSIGNED_FROM_DATE = \"AssignedFromDate\";\n String ASSIGNED_TO_DATE = \"AssignedToDate\";\n String RESOURCE_TITLE = \"RequestTitle\";\n String REQUEST_STATUS = \"RequestStatus\";\n String LICENCE_KEY = \"LicenceKey\";\n String SOFTWARE_KEY_ID = \"SoftwareKeyId\";\n String ASSIGNED_BY = \"AssignedBy\";\n String RESOURCE_ID = \"ResourceId\";\n String ASSIGNED_ON = \"AssignedOn\";\n String SOFTWARE_TYPE = \"SoftwareType\";\n}",
"private static Properties processCommandLineProperties(String[] args)\n {\n Properties props = new Properties();\n\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) {\n continue;\n }\n String definition = arg.substring(1);\n int definitionEquals = definition.indexOf('=');\n if (definitionEquals < 0)\n continue;\n String propName = definition.substring(0, definitionEquals); \n String propValue = definition.substring(definitionEquals+1);\n if (!propName.equals(\"\") && !propValue.equals(\"\"))\n props.put(propName, propValue);\n }\n return props;\n }"
]
| [
"0.6389632",
"0.6317179",
"0.63068366",
"0.57488346",
"0.572303",
"0.5495292",
"0.5481834",
"0.54471004",
"0.54471004",
"0.5417051",
"0.539525",
"0.5362478",
"0.53585446",
"0.53545725",
"0.5343337",
"0.5323998",
"0.52697235",
"0.52642524",
"0.52636665",
"0.52510035",
"0.5244598",
"0.5220634",
"0.5194664",
"0.51908755",
"0.5181768",
"0.51793236",
"0.5178775",
"0.5173437",
"0.5172379",
"0.516863",
"0.5163934",
"0.5158821",
"0.5148835",
"0.5142695",
"0.5141062",
"0.51368016",
"0.5128989",
"0.5124053",
"0.5119707",
"0.51036936",
"0.51014084",
"0.50890034",
"0.5080144",
"0.50765526",
"0.50671077",
"0.506515",
"0.505172",
"0.504834",
"0.5036458",
"0.5024311",
"0.5023135",
"0.5020645",
"0.50164104",
"0.5009766",
"0.50058514",
"0.4990707",
"0.49856478",
"0.4984926",
"0.49733388",
"0.49630237",
"0.49613482",
"0.49606705",
"0.4956398",
"0.4935838",
"0.49331784",
"0.49314794",
"0.4927313",
"0.49195367",
"0.4913323",
"0.4912496",
"0.49051276",
"0.48933637",
"0.48909703",
"0.4887983",
"0.48744217",
"0.4863225",
"0.48486462",
"0.48462436",
"0.48432726",
"0.4842067",
"0.48405486",
"0.48398343",
"0.48358288",
"0.48327628",
"0.4831425",
"0.48301527",
"0.48294538",
"0.48243302",
"0.4819365",
"0.48168322",
"0.48148638",
"0.48099354",
"0.48089767",
"0.48040786",
"0.47998846",
"0.47997135",
"0.47974244",
"0.47951084",
"0.47905084",
"0.47861543"
]
| 0.56101227 | 5 |
restorna uma lista de device | public List<Device> findAll() throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Collection<String> listDevices();",
"List<DeviceDetails> getDevices();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Device> \n getDevicesList();",
"private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }",
"public abstract List<NADevice> getDevices(Context context);",
"public List getDevices() {\n return devices;\n }",
"public List<Device> getListDevice() {\n\n\t\tList<Device> listDevice = new ArrayList<Device>();\n\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\tlistDevice.add(device);\n\n\t\treturn listDevice;\n\n\t}",
"private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}",
"public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}",
"public List<Device> getRunningDevices();",
"@Path(\"device\")\n DeviceAPI devices();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();",
"public static void getDevicesList()\n {\n MidiDevice.Info[]\taInfos = MidiSystem.getMidiDeviceInfo();\n\t\tfor (int i = 0; i < aInfos.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tMidiDevice\tdevice = MidiSystem.getMidiDevice(aInfos[i]);\n\t\t\t\tboolean\t\tbAllowsInput = (device.getMaxTransmitters() != 0);\n\t\t\t\tboolean\t\tbAllowsOutput = (device.getMaxReceivers() != 0);\n\t\t\t\tif (bAllowsInput || bAllowsOutput)\n\t\t\t\t{\n\n\t\t\t\t\tSystem.out.println(i + \"\" + \" \"\n\t\t\t\t\t\t+ (bAllowsInput?\"IN \":\" \")\n\t\t\t\t\t\t+ (bAllowsOutput?\"OUT \":\" \")\n\t\t\t\t\t\t+ aInfos[i].getName() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVendor() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getVersion() + \", \"\n\t\t\t\t\t\t+ aInfos[i].getDescription());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\" + i + \" \" + aInfos[i].getName());\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (MidiUnavailableException e)\n\t\t\t{\n\t\t\t\t// device is obviously not available...\n\t\t\t\t// out(e);\n\t\t\t}\n\t\t}\n\t\tif (aInfos.length == 0)\n\t\t{\n\t\t\tSystem.out.println(\"[No devices available]\");\n\t\t}\n\t\t//System.exit(0);\n }",
"public IDevice[] getDevices() { return devices; }",
"public ArrayList getDeviceInfo();",
"public static List<String> getDeviceList() {\n\t\tList<String> str = CommandRunner.exec(CMD_GET_DEVICE_ID);\n\t\tList<String> ids = new ArrayList<String>();\n\t\tfor (int i = 1; i < str.size(); i++) {\n\t\t\tString id = str.get(i).split(\" |\\t\")[0].trim();\n\t\t\tif (!id.isEmpty()) {\n\t\t\t\tids.add(id);\n\t\t\t}\n\t\t}\n\t\treturn ids;\n\t}",
"public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }",
"private void onDeviceList(RequestDeviceList r){\n\t\t//Answer the request with the list of devices from the group\n\t\tgetSender().tell(new ReplyDeviceList(r.requestId, deviceActors.keySet()), getSelf());\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Device> getAllDevices() {\n\n Query query = em.createQuery(\"SELECT d FROM Device d\");\n List<Device> devices = new ArrayList<Device>();\n devices = query.getResultList();\n return devices;\n }",
"private native void nGetDevices(Vector deviceList);",
"public List<String> execAdbDevices() {\n System.out.println(\"adb devices\");\n\n List<String> ret_device_id_list = new ArrayList<>();\n Process proc = null;\n try {\n proc = new ProcessBuilder(this.adb_path, \"devices\").start();\n proc.waitFor();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (InterruptedException ire) {\n ire.printStackTrace();\n }\n\n String devices_result = this.collectResultFromProcess(proc);\n String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\n\n if (device_id_list.length <= 1) {\n System.out.println(\"No Devices Attached.\");\n return ret_device_id_list;\n }\n\n /**\n * collect the online devices\n */\n String str_device_id = null;\n String device = null;\n String[] str_device_id_parts = null;\n // ignore the first line which is \"List of devices attached\"\n for (int i = 1; i < device_id_list.length; i++) {\n str_device_id = device_id_list[i];\n str_device_id_parts = str_device_id.split(\"\\\\s+\");\n // add the online device\n if (str_device_id_parts[1].equals(\"device\")) {\n device = str_device_id_parts[0];\n ret_device_id_list.add(device);\n System.out.println(device);\n }\n }\n\n return ret_device_id_list;\n }",
"private void bonded_devices_get()\n\t\t{\n\t\t\tmPairedDevList.clear();\n\t\t\tSet<BluetoothDevice> PairedDevices = btAdapter.getBondedDevices();\n\t\t\tif(PairedDevices.size() > 0)\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.VISIBLE);\n\t\t\t\tfor(BluetoothDevice device : PairedDevices)\n\t\t\t\t{\n\t\t\t\t\tString device_info = device.getName()+\"\\n\"+device.getAddress();\n\t\t\t\t\tmPairedDevList.add(device_info);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmPairedTitle.setVisibility(View.GONE);\n\t\t\t\tmPairedDevList.add(\"No Bonded Devices\");\n\t\t\t}\n\t\t}",
"List<PCDevice> getAllPC();",
"public static void listDevices()\n\t{\n\t\tfor(SerialPort port : SerialPort.getCommPorts())\n\t\t{\n\t String portName = port.getSystemPortName();\n\t System.out.println(portName);\n\t\t}\n\t}",
"public final TestDevice[] getDeviceList() {\n return mDevices.toArray(new TestDevice[mDevices.size()]);\n }",
"public List<String> execAdbDevices()\r\n\t{\r\n\t\tList<String> ret_device_id_list = new ArrayList<>();\r\n\t\t\r\n\t\tProcess proc = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tproc = new ProcessBuilder(this.adb_directory, \"devices\").start();\r\n\t\t\tproc.waitFor();\r\n\t\t} catch (IOException ioe)\r\n\t\t{\r\n\t\t\tioe.printStackTrace();\r\n\t\t} catch (InterruptedException ire)\r\n\t\t{\r\n\t\t\tire.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tString devices_result = this.collectResultFromProcess(proc);\r\n\t String[] device_id_list = devices_result.split(\"\\\\r?\\\\n\");\r\n\r\n\t if (device_id_list.length <= 1)\r\n\t {\r\n\t \tSystem.out.println(\"No Devices Attached.\");\r\n\t \treturn ret_device_id_list;\r\n\t }\r\n\t \r\n\t /**\r\n\t * collect the online devices \r\n\t */\r\n\t String str_device_id = null;\r\n\t String[] str_device_id_parts = null;\r\n\t // ignore the first line which is \"List of devices attached\"\r\n\t for (int i = 1; i < device_id_list.length; i++)\r\n\t\t{\r\n\t\t\tstr_device_id = device_id_list[i];\r\n\t\t\tstr_device_id_parts = str_device_id.split(\"\\\\s+\");\r\n\t\t\t// add the online device\r\n\t\t\tif (str_device_id_parts[1].equals(\"device\"))\r\n\t\t\t\tret_device_id_list.add(str_device_id_parts[0]);\r\n\t\t}\r\n\t \r\n\t return ret_device_id_list;\r\n\t}",
"public String[] getVideoDevicesList();",
"public static native String JavaGetDeviceSerialList(int Number);",
"public DeviceUserAuthorization[] getDeviceList() {\n return deviceList;\n }",
"public List<PushDevice> listDevices() {\n checkUsbLibState();\n\n List<PushDevice> devices = new ArrayList<>();\n\n // Read the USB device list\n DeviceList list = new DeviceList();\n int result = LibUsb.getDeviceList(null, list);\n if (result < 0) {\n throw new LibUsbException(\"Unable to get device list\", result);\n }\n\n try {\n // Iterate over all devices and scan for the right one\n for (Device device : list) {\n DeviceDescriptor descriptor = new DeviceDescriptor();\n result = LibUsb.getDeviceDescriptor(device, descriptor);\n if (result != LibUsb.SUCCESS) {\n throw new LibUsbException(\"Unable to read device descriptor\", result);\n }\n if (descriptor.bDeviceClass() == LibUsb.CLASS_PER_INTERFACE &&\n descriptor.idVendor() == VENDOR_ID && descriptor.idProduct() == PRODUCT_ID) {\n\n devices.add(new PushDevice(device));\n }\n }\n } finally {\n // Ensure the allocated device list is freed\n LibUsb.freeDeviceList(list, true);\n }\n\n return devices;\n }",
"public SmartDevice[] readDevices() {\n SQLiteDatabase db = getReadableDatabase();\n\n // Get data from database\n Cursor cursor = db.query(TABLE_NAME, null, null, null, null, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n\n\n // Go trough data and create class objects\n SmartDevice[] devices = new SmartDevice[cursor.getCount()];\n int i = 0;\n for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {\n devices[i++] = createDevice(cursor);\n }\n\n close();\n return devices;\n }",
"public DeviceList(BinaryReader reader) throws IOException {\n\t\tdeviceList = new ArrayList<>();\n\n\t\t// The device ID list is zero-terminated.\n\t\tshort lastDeviceID = reader.readNextShort();\n\t\twhile (lastDeviceID != 0) {\n\t\t\tdeviceList.add(lastDeviceID);\n\t\t\tlastDeviceID = reader.readNextShort();\n\t\t}\n\t}",
"public static void printDevices(List<DeviceResponse> list) {\n\t\tSystem.out.println(\"******** DEVICE LIST *********\");\n\n\t\tfor (DeviceResponse response : list) {\n\t\t\tSystem.out.println(response);\n\t\t}\n\n\t\tSystem.out.println(\"******** LIST EX *********\");\n\t}",
"public void listDevices(final BluetoothAdapter bluetoothAdapter){\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n ArrayList pairedDeviceList = new ArrayList();\n String address = null;\n\n if (pairedDevices.size() > 0) {\n int i = 0;\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName().trim();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n if (deviceName.equals(DEVICE_NAME)){\n address = device.getAddress().trim();\n System.out.println(address +\"\\n\");\n }\n pairedDeviceList.add(\"Device Name: \" + deviceName + \" Device MAC Address: \" + deviceHardwareAddress);\n }\n\n System.out.println(pairedDeviceList.get(0) + \"\\n\");\n\n final String finalAddress = address;\n AsyncTask.execute(new Runnable(){\n @Override\n public void run(){\n bluetoothDevice = bluetoothAdapter.getRemoteDevice(finalAddress);\n BLEDevice = new BluetoothLeService(bluetoothDevice, quantifenUUID);\n BLEDevice.connect(BluetoothActivity.this, testUUID);\n }\n });\n\n\n }\n }",
"public Peripheral[] getDevices() {\r\n\treturn (Peripheral[]) this.deviceList.toArray(new Peripheral[0]);\r\n }",
"public void configureDeviceListView(){\n deviceListView = findViewById(R.id.device_listView);\n combinedDeviceList = new ArrayList<>();\n deviceListAdapter = new DeviceListAdapter(this, combinedDeviceList);\n deviceListView.setAdapter(deviceListAdapter);\n }",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"@Override\n public Object getData() {\n return devices;\n }",
"public String[] getSoundDevicesList();",
"public Cursor getDevices(){\n String tabla = devicesContract.deviceEntry.tableName,\n selection = null,\n groupBy = null,\n having = null,\n orderBy = null;\n String[] columnas = null, selectionArgs = null;\n Cursor d = getDevice(tabla,columnas,selection,selectionArgs,groupBy,having,orderBy);\n return d;\n }",
"public synchronized Hashtable getDevices() {\n Hashtable hashtable;\n hashtable = new Hashtable();\n Enumeration keys = this.deviceList.keys();\n while (keys.hasMoreElements()) {\n Integer num = (Integer) keys.nextElement();\n hashtable.put(num, this.deviceList.get(num));\n }\n return hashtable;\n }",
"public static ArrayList<File> findDevices() {\n return findDevices(\"/dev/\");\n }",
"protected List<PCIDevice> probeDevices() {\n final ArrayList<PCIDevice> result = new ArrayList<PCIDevice>();\n rootBus.probeDevices(result);\n return result;\n }",
"private void bluetoothList(CallbackContext callbackContext) throws JSONException {\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n JSONArray arrayList = new JSONArray();\n\n // Lista todos os dispositivos pareados.\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n String name = device.getName();\n String address = device.getAddress();\n arrayList.put(name + \"_\" + address);\n }\n callbackContext.success(arrayList);\n }\n }",
"@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter, Context context) {\n return this.serviceClient.getAllDevices(filter, context);\n }",
"@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter) {\n return this.serviceClient.getAllDevices(filter);\n }",
"private void getDevice(){\n\t\tdialog.setContentView(R.layout.device_list_popup);\n\t\tdialog.setCancelable(true);\n\t\tdialog.setTitle(\"Paired Bluetooth Devices\");\n\t\tdialog.show();\n\t\tProgressBar tempSpinner = (ProgressBar)dialog.findViewById(R.id.progressBar);\n\t\ttempSpinner.setVisibility(View.INVISIBLE); //Hide the progress bar while we aren't connecting\n\n\t\tListView lv = (ListView) dialog.findViewById(R.id.device_list_display);\n\t\tlv.setAdapter(new ArrayAdapter<String> (this, R.layout.device_list_popup));\n\n\t\tlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\t\t\tpublic void onItemClick(AdapterView<?> arg, View view, int position, long id) {\n\t\t\t\tString address = (String) ((TextView) view).getText();\n\t\t\t\tfor (String temp : address.split(\"\\n\")) {\n\t\t\t\t\taddress = temp; //Only get address, discard name\n\t\t\t\t}\n\t\t\t\tBluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address);\n\t\t\t\tnew ConnectTask().execute(device);\n\t\t\t}\n\t\t});\n\t}",
"@GET(\"device\")\n Call<DevicesResponse> getDevice();",
"public List<Device> getAllDevices(DeviceType type) {\n LOG.info(\"Starting get all OpenCL device by platform \" + platform + \".\");\n int[] numDevicesArray = new int[1];\n long deviceType = type.toCLType();\n CL.clGetDeviceIDs(platform, deviceType, 0, null, numDevicesArray);\n int numDevices = numDevicesArray[0];\n LOG.info(\"Found \" + numDevices + \" OpenCL devices.\");\n cl_device_id[] allRawDevices = new cl_device_id[numDevices];\n CL.clGetDeviceIDs(platform, deviceType, numDevices, allRawDevices, null);\n return Arrays.stream(allRawDevices)\n .filter(Objects::nonNull)\n .map(rawDevice -> new Device(rawDevice, this))\n .collect(Collectors.toList());\n }",
"@Subscribe(threadMode = ThreadMode.MAIN)\n public void onDevicesReceived(OnReceiverDevicesEvent event){\n //if(!devicesListAdapter.isEmpty()) devicesListAdapter.clear(); // clear old names\n\n\n devicesListAdapter.removeAll();\n Log.d(\"P2P\", \"Found something on events!\");\n //Toast.makeText(getContext(), \"Found something\", Toast.LENGTH_LONG).show();\n Collection<WifiP2pDevice> devs = event.getDevices().getDeviceList();\n devsList.addAll(devs);\n\n\n\n for(int i = 0; i < devsList.size(); i++){\n\n if(!devicesListAdapter.hasItem(devsList.get(i))){\n Log.d(\"P2P\", \"Device Found: \" + devsList.get(0).deviceName);\n devicesListAdapter.add(devsList.get(i).deviceName);\n devicesListAdapter.notifyDataSetChanged();\n }\n\n }\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(value = \"/getdevcon\", method = RequestMethod.GET)\n public JSONObject getdevcon(@RequestParam(value=\"sid\", \t\trequired=false) String sid, \n \t\t\t\t\t\t\t@RequestParam(value=\"spid\", \trequired=false) String spid,\n \t\t\t\t\t\t\t@RequestParam(value=\"swid\", \trequired=false) String swid,\n \t\t\t\t\t\t\t@RequestParam(value=\"uid\", \t \trequired=false) String uid,\n \t\t\t\t\t\t\t@RequestParam(value=\"duration\", required=false, defaultValue=\"5m\") String duration) throws IOException {\n \t\n \tJSONArray dev_array = null; \t\n \tJSONObject devlist \t = new JSONObject();\n\t\tdev_array = new JSONArray();\n\t\t\n\t\tDevice dv = getDeviceService().findOneByUid(uid);\n\t\t\n\t\tif (dv != null) {\n\t\t\t\n\t\t\tJSONArray dev_array1 = new JSONArray();\n\t\t\tJSONArray dev_array2 = new JSONArray();\n\t\t\tJSONArray dev_array3 = new JSONArray();\n\t\t\tJSONArray dev_array4 = new JSONArray();\n\t \t\n\t\t\tdev_array1.add (0, \"Mac\");\n\t\t\tdev_array1.add (1, dv.getIos());\n\t\t\tdev_array2.add (0, \"Android\");\n\t\t\tdev_array2.add (1, dv.getAndroid());\n\t\t\tdev_array3.add (0, \"Win\");\n\t\t\tdev_array3.add (1, dv.getWindows());\n\t\t\tdev_array4.add (0, \"Others\");\n\t\t\tdev_array4.add (1, dv.getOthers());\t\t\n\t\t\t\n\t\t\tdev_array.add (0, dev_array1);\n\t\t\tdev_array.add (1, dev_array2);\n\t\t\tdev_array.add (2, dev_array3);\n\t\t\tdev_array.add (3, dev_array4);\t\t\t\n\t\t\t\n\t\t}\n \t\t\t\t\t\n\t\tdevlist.put(\"devicesConnected\", dev_array);\t\n\t\t\n \t//LOG.info(\"Connected Clients\" +devlist.toString());\n \t\n \treturn devlist;\n \t\n }",
"public static ArrayList<Device> getDevices (JSONArray jsonArray){\n ArrayList<Device> devices = new ArrayList<Device>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n Device d = new Device(o.getString(Utility.DeviceName), o.getString(Utility.Technology), o.getBoolean(Utility.AlwaysOn));\n\n /* Servs */\n JSONArray servsJson = o.getJSONArray(Utility.Services);\n for (int j = 0; j < servsJson.length(); j++) {\n DeviceService ds = new DeviceService(servsJson.getJSONObject(j).getString(Utility.ServiceName), servsJson.getJSONObject(j).getString(Utility.ServiceType));\n ds.assignToDevice(d);\n d.addService(ds);\n\n JSONArray coms = servsJson.getJSONObject(j).getJSONArray(Utility.Commands);\n for (int z = 0; z < coms.length(); z++) {\n try {\n ds.addCommand(new Command(coms.getJSONObject(z).getString(Utility.CommandName),\n coms.getJSONObject(z).getString(Utility.CommandType)));\n }\n catch (JSONException e) {\n Log.w(\"Command\", \"Error adding command\");\n }\n }\n }\n\n\n\n devices.add(d);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return devices;\n }",
"private void updateDeviceList() {\r\n\t\tavailableCams.removeAllElements();\r\n\t\tavailableCams.addElement(NO_CAMERA);\r\n\t\t\r\n\t\tmediaSrc.updateDeviceList();\r\n\t\tfor(CameraController c : mediaSrc.getAvailableCameras()) {\r\n\t\t\tavailableCams.addElement(c);\r\n\t\t}\r\n\t\t\r\n\t\tif(mediaSrc.getActiveCamera() != null) {\r\n\t\t\tavailableCams.setSelectedItem(mediaSrc.getActiveCamera());\r\n\t\t} else {\r\n\t\t\tavailableCams.setSelectedItem(NO_CAMERA);\r\n\t\t}\r\n\t}",
"public static List<FTDevice> getDevices() throws FTD2XXException {\n return getDevices(false);\n }",
"@Override\n public List<Object> getDeviceSerialByMcu(String sys_id) {\n return null;\n }",
"@Override\n public List<CECDevice> scanDevices() {\n sendCommand(\"scan\");\n return CECClientParser.parseScanResult(waitForOutputLine(\"===================\"));\n }",
"public Integer getDevices() {\r\n return devices;\r\n }",
"@Override\n public ListWirelessDevicesResult listWirelessDevices(ListWirelessDevicesRequest request) {\n request = beforeClientExecution(request);\n return executeListWirelessDevices(request);\n }",
"public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> getDevicesForApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"@Deprecated\r\n private void setDevices() throws ClassNotFoundException {\n\r\n installedDevices = new Device[deviceName.length];\r\n\r\n for (int i = 0; i < deviceName.length; i++) {\r\n\r\n //Class<?> eine = Class.forName(deviceName[0]);\r\n try {\r\n Constructor<?>[] ctors = Class.forName(deviceName[i]).getDeclaredConstructors();\r\n Constructor<?> ctor = null;\r\n for (Constructor<?> c : ctors) {\r\n if (c.getGenericParameterTypes().length == 0) {\r\n ctor = c;\r\n }\r\n }\r\n ctor.setAccessible(true);\r\n Device device = (Device) ctor.newInstance();\r\n\r\n installedDevices[i] = device;\r\n\r\n } catch (Exception e) {\r\n throw new ClassNotFoundException(\r\n \"Ist abgestuerzt, weil Klasse aus Config nicht existiert oder im falschen ordner sich befindet\"\r\n + e + \".\");\r\n }\r\n\r\n }\r\n\r\n }",
"Collection<? extends ReflexDevice> getDevices() {\n return processors.values();\n }",
"public static List<IOTAddress> discoverIOTDevicesSyn() {\n\n\t\tAbsTaskSyn<List<IOTAddress>> udpSocketTask = new UDPSocketTask(\n\t\t\t\t\"connect task\", -1, true, broadcastAddress, data);\n\n\t\tmThreadPool.executeSyn(udpSocketTask, CONSTANTS_DYNAMIC.UDP_BROADCAST_TIMEOUT_DYNAMIC, TimeoutUnit);\n\n\t\tList<IOTAddress>responseList = udpSocketTask.getResult();\n\n\t\treturn responseList;\n\t}",
"public org.hl7.fhir.ResourceReference[] getDeviceArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(DEVICE$12, targetList);\n org.hl7.fhir.ResourceReference[] result = new org.hl7.fhir.ResourceReference[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"private void getPairedDevices() {\n\t\tdevicesArray = btAdapter.getBondedDevices();\n\t\tif(devicesArray.size()>0){\n\t\t\tfor(BluetoothDevice device:devicesArray){\n\t\t\t\tpairedDevices.add(device.getName());\n\t\t\t}\n\t\t}\n\t}",
"public void populateVitals() {\n try {\n Statement stmt = con.createStatement();\n\n ResultSet rs = stmt.executeQuery(\"select * from device\");\n while (rs.next()) {\n\n String guid = rs.getString(\"DeviceGUID\");\n int deviceId = rs.getInt(\"DeviceID\");\n int deviceTypeId = rs.getInt(\"DeviceTypeID\");\n int locationId = rs.getInt(\"LocationID\");\n float deviceProblem = rs.getFloat(\"ProblemPercentage\");\n\n String dateService = rs.getString(\"DateOfInitialService\");\n\n Device device = new Device();\n device.setDateOfInitialService(dateService);\n device.setDeviceGUID(guid);\n device.setDeviceID(deviceId);\n device.setDeviceTypeID(deviceTypeId);\n device.setLocationID(locationId);\n device.setProblemPercentage(deviceProblem);\n\n deviceList.add(device);\n\n }\n } catch (SQLException e) {\n log.error(\"Error populating devices\", e);\n }\n\n }",
"public void setDevices(Peripheral[] devices) {\r\n\tthis.deviceList.clear();\r\n\tif (devices != null) {\r\n\t int numEl = devices.length;\r\n\t for (int i = 0; i < numEl; i++) {\r\n\t\tthis.deviceList.add(devices[i]);\r\n\t }\r\n\t}\r\n }",
"public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }",
"public void DiscoverUsb(View view) {\n \t// Initiate variables\n \tString UsbList = \"Detailed Device List:\\n\";\n \tArrayAdapter<String> connectedDevicesAdapter;\n \tconnectedDevicesAdapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, android.R.id.text1) ;\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \t// Do something in response to button\n \t\n // Retrieve the text view\n TextView textView = (TextView) findViewById(R.id.usb_list_view);\n\n \n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n \n UsbList=UsbList.concat(\"Device Name:\\n\"+device.getDeviceName()+\"\\n\") ;\n UsbList=UsbList.concat(\"VendorId:\"+Integer.toHexString(device.getVendorId())+\"\\t\"+\"ProductId:\"+Integer.toHexString(device.getProductId())+\"\\n\") ;\n\n UsbList=UsbList.concat(\"VendorId:\"+device.getVendorId()+\"\\t\"+\"ProductId:\"+device.getProductId()+\"\\n\") ;\n\n\n UsbList=UsbList.concat(\"Device Class:\"+Integer.toHexString(device.getDeviceClass())+\"\\t\"+\"subClass:\"+device.getDeviceSubclass()+\"\\n\") ;\n UsbList=UsbList.concat(\"DeviceId:\"+device.getDeviceId()+\"\\t\"+\"InterfaceCount:\"+device.getInterfaceCount()+\"\\n\") ;\n \n int Vid = device.getVendorId();\n \n test();\n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n UsbList=UsbList.concat(VendorName+\"\\n\"+ProductName+\"\\n\") ;\n \n connectedDevicesAdapter.add(VendorName+\"\\t\"+ProductName);\n UsbList=UsbList.concat(\"\\n\");\n }\n textView.setText(UsbList);\n \n\t\tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner); \n\t\t\n\t\t\n\t\t\n\t\tUsbListSpinner.setAdapter(connectedDevicesAdapter);\n \n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceSensorOutputs/{device}\")\n List<JsonSensorOutput> byDevice(@PathParam(\"device\") int device);",
"public List<Agent> listAgentNotMappedwithDevice();",
"private void displayList(){\n\t\tmArrayAdapter.clear();\n\t\tBT.setupBT();\n\n\t\tListView newDevicesListView = (ListView)\n\t\t\t\tdialog.findViewById(R.id.device_list_display);\n\n\t\tnewDevicesListView.setAdapter(mArrayAdapter);\n\t\tnewDevicesListView.setClickable(true);\n\t}",
"public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }",
"@GET\n\t@Path(\"types\")\n public Response getDeviceTypes() {\n List<DeviceType> deviceTypes;\n try {\n deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes();\n return Response.status(Response.Status.OK).entity(deviceTypes).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the list of device types.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }",
"public void displayPairedDevices() {\n\t\tBluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n\t\t\t\t.getDefaultAdapter();\n\t\tSet<BluetoothDevice> bondedDevices = mBluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\n\t\tList<String> s = new ArrayList<String>();\n\t\tpairedDevices = new ArrayList<BluetoothDevice>();\n\t\tfor (BluetoothDevice bt : bondedDevices) {\n\t\t\ts.add(bt.getName());\n\t\t\tpairedDevices.add(bt);\n\t\t}\n\t\tListView List = (ListView) findViewById(R.id.paired_devices);\n\n\t\tList.setAdapter(new ArrayAdapter<String>(this, R.layout.device_row, s));\n\t}",
"public List<Device> getUserDevices(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n List <Device> devices = new ArrayList<>();\n try {\n tx = session.beginTransaction();\n \n User user = this.getUser(id);\n\n // Add restriction to get user with username\n Criterion deviceCr = Restrictions.eq(\"userId\", user);\n Criteria cr = session.createCriteria(Device.class);\n cr.add(deviceCr);\n devices = cr.list();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return devices;\n }",
"void refresh() {\n List<IDevice> list = Lists.newArrayList();\n// if (fan == null) {\n// ToastUtils.showShort(R.string.dev_invalid_error);\n// } else {\n// list.add(fan);\n// if (stove != null) {\n// list.add(stove);\n// }\n// }\n list = Plat.deviceService.queryDevices();\n adapter.loadData(list);\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);",
"@Override\n public List<Object> getModemIdListByDevice_serial(String device_serial) {\n return null;\n }",
"public Set<BluetoothDevice> getPairedDevicesList(){\n if(isBluetoothSupported()){\n if(!baBTAdapter.isEnabled()){\n turnOnBluetooth();\n }\n }\n else{\n return null;\n }\n\n return baBTAdapter.getBondedDevices();\n }",
"public List<String> getConnectedDevices() {\n if (services.size() == 0) {\n return new ArrayList<String>();\n }\n\n HashSet<String> toRet = new HashSet<String>();\n\n for (String s : services.keySet()) {\n ConnectionService service = services.get(s);\n\n if (service.getState() == ConnectionConstants.STATE_CONNECTED) {\n toRet.add(s);\n }\n }\n\n return new ArrayList<String>(toRet);\n }",
"public void getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> responseObserver);",
"List<DeviceInfo> getDevicesInfo(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;",
"@RequestMapping(value = \"/api/v1/device/query\", method = RequestMethod.POST, consumes = \"application/json\", produces = \"application/json\")\n\tpublic RestResponse list(@RequestBody DeviceRegistrationQuery query) {\n\t\tRestResponse response = new RestResponse();\n\n\t\ttry {\n\t\t\tAuthenticatedUser user = this.authenticate(query.getCredentials(), EnumRole.ROLE_USER);\n\n\t\t\tArrayList<Device> devices = deviceRepository.getUserDevices(user.getKey(), query);\n\n\t\t\tDeviceRegistrationQueryResult queryResponse = new DeviceRegistrationQueryResult();\n\t\t\tqueryResponse.setDevices(devices);\n\n\t\t\treturn queryResponse;\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(ex.getMessage(), ex);\n\n\t\t\tresponse.add(this.getError(ex));\n\t\t}\n\n\t\treturn response;\n\t}",
"private void updateDevicesList() {\n\n netDevicesPanel.removeAll();\n\n netManager.getRecentlySeenDevices().forEach(device -> {\n netDevicesPanel.add(new DevicePanel(device));\n });\n\n netDevicesPanel.revalidate();\n netDevicesPanel.repaint();\n }",
"public void ConnectUsb(View view) {\n \tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner);\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \tTextView textView = (TextView) findViewById(R.id.usb_list_view);\n \tString UsbList = (String) textView.getText();\n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n String SelectedText = String.valueOf(UsbListSpinner.getSelectedItem());\n int Vid = device.getVendorId();\n \n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n String IteratorText = VendorName+\"\\t\"+ProductName;\n// UsbList=UsbList.concat(\"\\n Selected:\" + SelectedText);\n// UsbList=UsbList.concat(\"\\n Device:\" + IteratorText);\n if(SelectedText.equalsIgnoreCase(IteratorText)){\n \tmanager.requestPermission(device, mPermissionIntent);\n// \tToast.makeText(view.getContext(), \n// \t\t\t\"OnItemSelectedListener : \" + String.valueOf(device.getDeviceName()),\n// \t\t\tToast.LENGTH_SHORT).show();\n }\n }\n textView.setText(UsbList);\n }",
"public void getDevices(final Subscriber<List<Device>> devicesSubscriber) {\n if (smartThingsService==null) {\n devicesSubscriber.onError(new Throwable(\"Please login to SmartThings before trying to get devices\"));\n return;\n }\n Observable.combineLatest(smartThingsService.getSwitchesObservable(), smartThingsService.getLocksObservable(), new Func2<List<Device>, List<Device>, List<Device>>() {\n @Override\n public List<Device> call(List<Device> switches, List<Device> locks) {\n List<Device> devices = new ArrayList<>();\n devices.addAll(switches);\n devices.addAll(locks);\n return devices;\n }\n }).doOnError(new Action1<Throwable>() {\n @Override\n public void call(Throwable throwable) {\n devicesSubscriber.onError(throwable);\n }\n }).doOnCompleted(new Action0() {\n @Override\n public void call() {\n //\n }\n }).subscribe(new Action1<List<Device>>() {\n @Override\n public void call(List<Device> devices) {\n devicesSubscriber.onNext(devices);\n }\n });\n }",
"public interface ConfigWarDeviceService {\n\n List<ConfigWarDevice> select();\n}",
"protected void fetchMySmartDevices() {\n setIsLoading(true);\n getCompositeDisposable().add(getDataManager()\n .getAllSmartDevices()\n .subscribeOn(getSchedulerProvider().io())\n .observeOn(getSchedulerProvider().ui())\n .subscribe(mySmartDevices -> {\n mySmartDevicesListLiveData.setValue(mySmartDevices);\n\n setIsLoading(false);\n }, throwable -> {\n setIsLoading(false);\n }));\n }",
"@GET\n @Produces(\"application/json\")\n public List<OsData> listAllOs() {\n return osBO.getAllOs();\n }",
"@Override\n public List<CrSDevice> findDevice(String building, String roomNumber) throws SQLException {\n String sql = \"call GetClassroomDevice(?,?);\";\n return qr.query(conn, sql, new BeanListHandler<CrSDevice>(CrSDevice.class, processor), building, roomNumber);\n\n }",
"public List<MediaDevice> getMediaDevices() {\n\n List<MediaDevice> mediaDevices = new ArrayList<>();\n\n for (MediaDevice d : this.devices) {\n if (d.hasMediaInterface() && d.hasInstance()) {\n mediaDevices.add(d);\n }\n }\n\n return mediaDevices;\n }",
"private void setDeviceListAdapter(ArrayList<DeviceEntity> deviceListResponse) {\n\n mControlDeviceRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n mControlDeviceRecyclerView.setNestedScrollingEnabled(false);\n mControlDeviceRecyclerView.setAdapter(new DeviceAdapter(deviceListResponse, this));\n\n }",
"private void selectAvailableDevices() {\n\n ArrayList deviceStrs = new ArrayList();\n final ArrayList<String> devices = new ArrayList();\n\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n // checking and enabling bluetooth\n if (!btAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n btAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = btAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n deviceStrs.add(device.getName() + \"\\n\" + device.getAddress());\n devices.add(device.getAddress());\n }\n }\n\n // show a list of paired devices to connect with\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.select_dialog_singlechoice,\n deviceStrs.toArray(new String[deviceStrs.size()]));\n alertDialog.setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n int position = ((AlertDialog) dialog).getListView().getCheckedItemPosition();\n String deviceAddress = devices.get(position);\n setDeviceAddress(deviceAddress);\n chosen = true;\n //notify user for ongoing connection\n launchRingDialog();\n\n }\n });\n\n alertDialog.setTitle(R.string.blueChose);\n alertDialog.show();\n }\n }",
"public interface DeviceService extends BaseService<PDevice,String> {\n\n int checkDeviceName(String dname);\n List<String> getallIp();\n int count();\n String authDevice(String msg1);\n void updateDeviceCon(String eid,String conStatue);\n ReType showCon(PDevice pDevice, int page, int limit);\n\n\n List<PDevice> getAlldevice();\n\n void addDevice(PDevice pDevice);\n\n void updateDeviceIp(String eid, String inetAddress);\n\n PDevice selectDevicebyeid(String eid);\n\n JsonUtil deletebydeviceId(String eid, boolean flag);\n\n void updateDevice(PDevice pDevice);\n\n\n List<HashMap<String,String>> getDeviceConnect(List<String> deviceids);\n}",
"void getDevicesCurrentlyOnline(String deviceType, AsyncCallback<List<String>> callback);",
"@Override\n\tpublic List<DeviceData> getList(DeviceData condition) {\n\t\treturn null;\n\t}",
"public void setDevices(Integer devices) {\r\n this.devices = devices;\r\n }",
"@Override\n public Map<String, List<Sensor>> getDeviceSchemaList() {\n Path path = Paths.get(config.getFILE_PATH(), Constants.SCHEMA_PATH);\n if (!Files.exists(path) || !Files.isRegularFile(path)) {\n LOGGER.error(\"Failed to find schema file in \" + path.getFileName().toString());\n System.exit(0);\n }\n Map<String, List<Sensor>> result = new HashMap<>();\n try {\n List<String> schemaLines = Files.readAllLines(path);\n for (String schemaLine : schemaLines) {\n if (schemaLine.trim().length() != 0) {\n String line[] = schemaLine.split(\" \");\n String deviceName = line[0];\n if (!result.containsKey(deviceName)) {\n result.put(deviceName, new ArrayList<>());\n }\n Sensor sensor = new Sensor(line[1], SensorType.getType(Integer.parseInt(line[2])));\n result.get(deviceName).add(sensor);\n }\n }\n } catch (IOException exception) {\n LOGGER.error(\"Failed to init register\");\n }\n return result;\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"@Override\n\tpublic List<String> getDeviceListModem(Map<String, Object> condition) {\n\t\treturn null;\n\t}"
]
| [
"0.8063264",
"0.8008549",
"0.78828",
"0.7799075",
"0.7670278",
"0.7633977",
"0.74125165",
"0.7404809",
"0.7311456",
"0.7297188",
"0.71639156",
"0.7085612",
"0.7062528",
"0.70387125",
"0.70180196",
"0.6977368",
"0.6918504",
"0.68500304",
"0.6835736",
"0.6821133",
"0.6818151",
"0.6809818",
"0.68030894",
"0.6763662",
"0.67208654",
"0.6709071",
"0.66781384",
"0.6626815",
"0.6624663",
"0.6623462",
"0.6589819",
"0.6537824",
"0.6467938",
"0.6451963",
"0.6444828",
"0.64104116",
"0.63926154",
"0.6389795",
"0.6383023",
"0.63310736",
"0.6327499",
"0.63193345",
"0.63148326",
"0.63089734",
"0.62815505",
"0.6255876",
"0.624715",
"0.6234281",
"0.62287277",
"0.6225002",
"0.62161016",
"0.62024534",
"0.61870015",
"0.61699885",
"0.616576",
"0.61648625",
"0.6135612",
"0.61265314",
"0.6090053",
"0.6043001",
"0.60327154",
"0.6022319",
"0.60007715",
"0.60007024",
"0.5988559",
"0.5984638",
"0.59775555",
"0.5968064",
"0.5965468",
"0.5964521",
"0.59580797",
"0.5939808",
"0.5898081",
"0.5897423",
"0.5894871",
"0.58758754",
"0.5869643",
"0.58688486",
"0.5861529",
"0.5852081",
"0.58501345",
"0.5844759",
"0.5827668",
"0.58142185",
"0.58057386",
"0.58026254",
"0.5802461",
"0.5799432",
"0.5798032",
"0.57964575",
"0.5777658",
"0.5777061",
"0.5753391",
"0.5751803",
"0.57452697",
"0.5728379",
"0.5710619",
"0.57045984",
"0.56998557",
"0.56845856"
]
| 0.71098256 | 11 |
retorna o device pelo seu identificador | public Device findById(Long id) throws Exception; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"UUID getDeviceId();",
"java.lang.String getDeviceId();",
"Integer getDeviceId();",
"DeviceId deviceId();",
"DeviceId deviceId();",
"public SmartHomeDevice getCustomDevice(String id);",
"Device createDevice();",
"public Device findDeviceById(int id);",
"Reference getDevice();",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public String getDevice() {\r\n return device;\r\n }",
"String getDeviceName();",
"public String getDeviceid() {\n return deviceid;\n }",
"public final int getDevice()\n\t{\n\t\treturn address & 0xFF;\n\t}",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"public final String getDeviceId(){\n return peripheralDeviceId;\n }",
"private String getDeviceID() {\n try {\n TelephonyManager telephonyManager;\n\n telephonyManager =\n (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n\n /*\n * getDeviceId() function Returns the unique device ID.\n * for example,the IMEI for GSM and the MEID or ESN for CDMA phones.\n */\n return telephonyManager.getDeviceId();\n }catch(SecurityException e){\n return null;\n }\n }",
"PCDevice getPC(UUID uID);",
"public String getDeviceName(){\n\t return deviceName;\n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"public String getDevice_id() {\r\n\t\treturn device_id;\r\n\t}",
"public SmartDevice readDevice(String id) {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_NAME, null, COLUMN_ID + \"=?\", new String[]{id}, null, null, null);\n if (cursor.getCount() <= 0) // If there is nothing found\n return null;\n cursor.moveToFirst(); // In case there are more users with same ID\n SmartDevice device = createDevice(cursor);\n\n close();\n return device;\n }",
"@Override\n public String getDeviceId() {\n return this.strDevId;\n }",
"public final int getDeviceID() {\n return device.getDeviceID();\n }",
"public VinDevices getDevice(String id_device)\n\t\t{\n\t\t\tList<?> dataAux;\n\t\t\tVinDevices Arecord = new VinDevices();\n\t\t\ttry{\n\t\t\t\tdataAux =\tthis.getListaBaseTable(\"id_device='\"+id_device+\"'\");\n\t\t\t\tArecord = (VinDevices)dataAux.get(0);\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tdataAux = null;\n\t\t\t}\n\t\t\treturn Arecord;\t\t\t\t\n\t\t\t\n\t\t}",
"@SuppressLint(\"HardwareIds\")\n String getDeviceID() {\n return Settings.Secure.getString(getApplicationContext().getContentResolver(),\n Settings.Secure.ANDROID_ID);\n }",
"public String getRingerDevice();",
"public String getDeviceId() {\n String deviceId = ((TelephonyManager) LoginActivity.this.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();\n if (deviceId != null && !deviceId.equalsIgnoreCase(\"null\")) {\n // System.out.println(\"imei number :: \" + deviceId);\n return deviceId;\n }\n\n deviceId = android.os.Build.SERIAL;\n // System.out.println(\"serial id :: \" + deviceId);\n return deviceId;\n\n }",
"org.hl7.fhir.String getDeviceIdentifier();",
"private String getDeviceId() {\n String deviceId = telephonyManager.getDeviceId(); \n \n \n // \"generic\" means the emulator.\n if (deviceId == null || Build.DEVICE.equals(\"generic\")) {\n \t\n // This ID changes on OS reinstall/factory reset.\n deviceId = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);\n }\n \n return deviceId;\n }",
"@Test\n public void findDevice() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n UDN udn = device.getIdentity().getUdn();\n\n Registry registry = upnpService.getRegistry(); // DOC: FIND_ROOT_UDN\n Device foundDevice = registry.getDevice(udn, true);\n\n assertEquals(foundDevice.getIdentity().getUdn(), udn); // DOC: FIND_ROOT_UDN\n\n LocalDevice localDevice = registry.getLocalDevice(udn, true); // DOC: FIND_LOCAL_DEVICE\n assertEquals(localDevice.getIdentity().getUdn(), udn);\n\n SampleDeviceRootLocal.assertLocalResourcesMatch(\n upnpService.getConfiguration().getNamespace().getResources(device)\n );\n }",
"public static ElectronicDevice getDevice(){\n\t\treturn new Television();\n\t\t\n\t}",
"public String getDeviceUDID() {\r\n\t\tTelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n\t\treturn telephonyManager.getDeviceId();\r\n\t}",
"public String getDeviceId() {\n return this.DeviceId;\n }",
"public String getDeviceName() {\n return this.deviceName;\n }",
"Device selectByPrimaryKey(String deviceNo);",
"Builder forDevice(DeviceId deviceId);",
"private String getDeviceId(Context context){\n TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n //\n ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);\n String tmDevice = tm.getDeviceId();\n\n String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n String serial = null;\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) serial = Build.SERIAL;\n\n if(tmDevice != null) return \"01\" + tmDevice;\n if(androidId != null) return \"02\" + androidId;\n if(serial != null) return \"03\" + serial;\n\n return null;\n }",
"public String getDeviceName(){\n\t\treturn deviceName;\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<org.thethingsnetwork.management.proto.HandlerOuterClass.Device> getDevice(\n org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public void setDevice(String device) {\r\n this.device = device;\r\n }",
"public String getDeviceId() {\n //TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);\n String number = Build.SERIAL;\n return number;\n }",
"@Override\n public String getDeviceName() {\n return null;\n }",
"public DeviceLocator getDeviceLocator();",
"public Device getById(String id) {\n\n try {\n return deviceRepository.findOne(id);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"@Override\n\tpublic IDevice byId( String deviceId )\n\t{\n\t\treturn new DeviceOperations(this.getPartner(), this.getContext().getItem1(), this.getContext().getItem2(), deviceId);\n\t}",
"public UUID getDeviceUuid() {\n return uuid;\n }",
"public String getDeviceName() {\r\n return name_;\r\n }",
"public String getDeviceName() {\n return deviceName;\n }",
"public String getDeviceName() {\n return deviceName;\n }",
"private String mapDeviceToCloudDeviceId(String device) throws Exception {\n if (device.equalsIgnoreCase(\"/dev/sdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/sdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/sde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/sdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/sdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/sdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/sdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/sdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"/dev/xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"/dev/xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"/dev/xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"/dev/xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"/dev/xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"/dev/xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"/dev/xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"/dev/xvdj\"))\n return \"9\";\n\n else if (device.equalsIgnoreCase(\"xvdb\"))\n return \"1\";\n else if (device.equalsIgnoreCase(\"xvdc\"))\n return \"2\";\n else if (device.equalsIgnoreCase(\"xvde\"))\n return \"4\";\n else if (device.equalsIgnoreCase(\"xvdf\"))\n return \"5\";\n else if (device.equalsIgnoreCase(\"xvdg\"))\n return \"6\";\n else if (device.equalsIgnoreCase(\"xvdh\"))\n return \"7\";\n else if (device.equalsIgnoreCase(\"xvdi\"))\n return \"8\";\n else if (device.equalsIgnoreCase(\"xvdj\"))\n return \"9\";\n\n else\n throw new Exception(\"Device is not supported\");\n }",
"public Device getDevice() {\n\t\treturn this.device;\n\t}",
"@Override\n\tpublic Device loadwDeviceById(int id) {\n\t\treturn (Device) dataAccessUtil.findById(Device.class,id);\n\t}",
"public Integer getDeviceId() {\n return deviceId;\n }",
"public Integer getDeviceId() {\n return deviceId;\n }",
"public final String getVendorId(){\n return peripheralVendorId;\n }",
"public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}",
"public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }",
"public ProductModel getDevice(String did) {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getDevice()\");\r\n\t\treturn deviceData.getDevice(did);\r\n\t}",
"public void setRingerDevice(String devid);",
"@Test\n public void getDeviceIDTest() {\n assertEquals(deviceID, device.getDeviceID());\n }",
"public String getName() {\n\t\treturn \"Device\";\r\n\t}",
"private static DeviceId getDeviceId(int i) {\n return DeviceId.deviceId(\"\" + i);\n }",
"public static String getPseudoDeviceID() {\n final String ID = \"42\";\n return ID +\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n }",
"String getSelectedDevice() {\n return selectedDevice;\n }",
"DeviceClass getDeviceClass();",
"@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}",
"String getDeviceName() {\n return deviceName;\n }",
"public String getDeviceId() {\n String info = \"\";\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentResolver();\n info = resolver.getType(queryurl);\n if (null == info && null != mContext) {\n info = getIMEI();\n }\n if (null == info) {\n info = \"\";\n }\n } catch (Exception e) {\n System.out.println(\"in or out strean exception\");\n }\n return info;\n }",
"public String deviceId() {\n return this.deviceId;\n }",
"@Test\n public void getDeviceTest() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n\n assertEquals(device, getDevice(DatabaseTest.DEVICE_ID));\n DatabaseTest.cleanDatabase();\n }",
"public String getMyDeviceId() {\n return myDeviceId;\n }",
"@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"@Override\n public int targetDevice() {\n return 0;\n }",
"public String getDeviceCode() {\n return deviceCode;\n }",
"public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }",
"public SmartDevice getDevice(String type) {\n\t\treturn null;\n\t}",
"@NonNull\n private String getDeviceId() {\n String ANDROID_ID = Settings.Secure.getString(cordova.getActivity().getContentResolver(), Settings.Secure.ANDROID_ID);\n return md5(ANDROID_ID).toUpperCase();\n }",
"public static FlexID testDeviceID() {\n byte[] identity = {\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0\n };\n\n return new FlexID(identity, FlexIDType.DEVICE, new AttrValuePairs(), null);\n }",
"public Device getDevice() {\n Long __key = this.deviceId;\n if (device__resolvedKey == null || !device__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n DeviceDao targetDao = daoSession.getDeviceDao();\n Device deviceNew = targetDao.load(__key);\n synchronized (this) {\n device = deviceNew;\n \tdevice__resolvedKey = __key;\n }\n }\n return device;\n }",
"boolean hasDeviceId();",
"boolean hasDeviceId();",
"public abstract void addDevice(Context context, NADevice device);",
"public void setDevice(final String device)\n {\n this.device = device;\n }",
"private String getDeviceName() {\n String permission = \"android.permission.BLUETOOTH\";\n int res = context.checkCallingOrSelfPermission(permission);\n if (res == PackageManager.PERMISSION_GRANTED) {\n try {\n BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();\n if (myDevice != null) {\n return myDevice.getName();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return \"Unknown\";\n }",
"public String getDeviceName() {\n\t\treturn deviceName;\n\t}",
"public static DeviceId getInstance()\n {\n if (deviceId == null) {\n synchronized (DeviceId.class) {\n if (deviceId == null) {\n deviceId = new DeviceId();\n }\n }\n }\n return deviceId;\n }",
"@Test\n public void findDeviceByType() throws Exception {\n MockUpnpService upnpService = new MockUpnpService();\n LocalDevice device = SampleData.createLocalDevice();\n upnpService.getRegistry().addDevice(device);\n\n Registry registry = upnpService.getRegistry();\n\n try {\n DeviceType deviceType = new UDADeviceType(\"MY-DEVICE-TYPE\", 1); // DOC: FIND_DEV_TYPE\n Collection<Device> devices = registry.getDevices(deviceType); // DOC: FIND_DEV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n\n try {\n ServiceType serviceType = new UDAServiceType(\"MY-SERVICE-TYPE-ONE\", 1); // DOC: FIND_SERV_TYPE\n Collection<Device> devices = registry.getDevices(serviceType); // DOC: FIND_SERV_TYPE\n assertEquals(devices.size(), 1);\n } finally {}\n }",
"public final String getDeviceKey(){\n return peripheralKey;\n }",
"public String getCaptureDevice();",
"@Override\n\tpublic DeviceBean getDeviceById(int deviceId) {\n\t\treturn dao.getDeviceById(deviceId);\n\t}",
"private Device getDevFromElement(Element devElement, String address) {\n\n String devId = devElement.getElementsByTagName(\"Id\").item(0).getTextContent();\n NodeList nodeList = devElement.getElementsByTagName(\"Names\").item(0).getChildNodes();\n Map<Locale, String> actNames = new HashMap<>();\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n NodeList nameNodes = nodeList.item(i).getChildNodes();\n String locale = nameNodes.item(0).getTextContent();\n String name = nameNodes.item(1).getTextContent();\n actNames.put(new Locale(locale.split(\"_\")[0], locale.split(\"_\")[1]), name);\n }\n\n String type = devElement.getElementsByTagName(\"Type\").item(0).getTextContent();\n String image = devElement.getElementsByTagName(\"Image\").item(0).getTextContent();\n // create device\n Device device = new Device(devId, actNames, Integer.parseInt(address), type, image);\n\n NodeList capList = devElement.getElementsByTagName(\"Capabilities\").item(0).getChildNodes();\n\n for (int j = 0; j < capList.getLength(); j++) {\n String capId = capList.item(j).getTextContent();\n Capability cap = readFromCapabilityFile(capId);\n cap.setDevice(device);\n device.addCapability(cap);\n }\n return device;\n }",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"public void onPickDevice(ConnectDevice device);",
"public String getMyDeviceName() {\n return bluetoothName;\n }",
"Device selectByPrimaryKey(Integer id);",
"public void getDeviceByModelNumber()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Model number \");\r\n\t\t\tString searchModelNumber = sc.nextLine();\r\n\t\t\t\r\n\t\t\tDevice d = record.getDeviceByModelNumber(searchModelNumber);\r\n\t\t\tprintDeviceDetails(d);\r\n\t\t}",
"public device() {\n\t\tsuper();\n\t}",
"public Device(String d_name, String s_name, String d_mac, String s_id, String s_alive) {\n this.d_name = d_name;\n this.s_name = s_name;\n this.d_mac = d_mac;\n this.s_id = s_id;\n this.s_alive = s_alive;\n // this.d_alive = d_alive; // 0 : die , 1 : alive\n }",
"public SyncDevice(String id) {\n this.id = id;\n this.displayName = id;\n }"
]
| [
"0.7534319",
"0.7505682",
"0.7398574",
"0.72641647",
"0.72641647",
"0.72422713",
"0.7208559",
"0.7154882",
"0.71260226",
"0.70974946",
"0.70348954",
"0.698764",
"0.6975008",
"0.69131666",
"0.68793356",
"0.68361324",
"0.67809534",
"0.6747019",
"0.6702116",
"0.6682845",
"0.66783744",
"0.66645515",
"0.6646765",
"0.6641215",
"0.6633316",
"0.6612949",
"0.6610711",
"0.6581428",
"0.65790564",
"0.65760237",
"0.6499397",
"0.64571846",
"0.6456859",
"0.6441971",
"0.6438722",
"0.6438314",
"0.64317685",
"0.6410556",
"0.6396307",
"0.6389434",
"0.6388333",
"0.63759196",
"0.63748646",
"0.6367255",
"0.6332647",
"0.63288546",
"0.63248056",
"0.63045454",
"0.6300949",
"0.6299896",
"0.6292122",
"0.6290667",
"0.62895423",
"0.62818485",
"0.62818485",
"0.6278289",
"0.62778926",
"0.62714744",
"0.6259418",
"0.62583786",
"0.6256225",
"0.6253378",
"0.62492675",
"0.6238891",
"0.6236987",
"0.6213951",
"0.61947274",
"0.61765784",
"0.61729956",
"0.6164797",
"0.61395884",
"0.6126748",
"0.61219907",
"0.6116619",
"0.61131114",
"0.6111252",
"0.6100882",
"0.60959715",
"0.6049318",
"0.6032969",
"0.6028376",
"0.6028376",
"0.6011499",
"0.60107535",
"0.6002593",
"0.6002264",
"0.5992301",
"0.5991065",
"0.5981859",
"0.59799236",
"0.5979153",
"0.59651613",
"0.59496355",
"0.59256804",
"0.5914439",
"0.59107375",
"0.59093505",
"0.5907293",
"0.590729",
"0.58995026"
]
| 0.6754982 | 17 |
encapsula os valores ao objeto device | public Device createObject(String brand, String model, Integer price, String photo, String date); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"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\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(mBSSID);\n\t\tdest.writeString(mSSID);\n\t\tdest.writeParcelable(mForm, PARCELABLE_WRITE_RETURN_VALUE);\n\t}",
"public void apkk() {\n\t\tthis.apkInfo = new apkinfo();\n\t\tthis.apkInfo.selectAPKInput();\n\t}",
"public void DiscoverUsb(View view) {\n \t// Initiate variables\n \tString UsbList = \"Detailed Device List:\\n\";\n \tArrayAdapter<String> connectedDevicesAdapter;\n \tconnectedDevicesAdapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_dropdown_item, android.R.id.text1) ;\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \t// Do something in response to button\n \t\n // Retrieve the text view\n TextView textView = (TextView) findViewById(R.id.usb_list_view);\n\n \n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n \n UsbList=UsbList.concat(\"Device Name:\\n\"+device.getDeviceName()+\"\\n\") ;\n UsbList=UsbList.concat(\"VendorId:\"+Integer.toHexString(device.getVendorId())+\"\\t\"+\"ProductId:\"+Integer.toHexString(device.getProductId())+\"\\n\") ;\n\n UsbList=UsbList.concat(\"VendorId:\"+device.getVendorId()+\"\\t\"+\"ProductId:\"+device.getProductId()+\"\\n\") ;\n\n\n UsbList=UsbList.concat(\"Device Class:\"+Integer.toHexString(device.getDeviceClass())+\"\\t\"+\"subClass:\"+device.getDeviceSubclass()+\"\\n\") ;\n UsbList=UsbList.concat(\"DeviceId:\"+device.getDeviceId()+\"\\t\"+\"InterfaceCount:\"+device.getInterfaceCount()+\"\\n\") ;\n \n int Vid = device.getVendorId();\n \n test();\n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n UsbList=UsbList.concat(VendorName+\"\\n\"+ProductName+\"\\n\") ;\n \n connectedDevicesAdapter.add(VendorName+\"\\t\"+ProductName);\n UsbList=UsbList.concat(\"\\n\");\n }\n textView.setText(UsbList);\n \n\t\tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner); \n\t\t\n\t\t\n\t\t\n\t\tUsbListSpinner.setAdapter(connectedDevicesAdapter);\n \n }",
"public void ConnectUsb(View view) {\n \tSpinner UsbListSpinner = (Spinner) findViewById(R.id.usb_list_spinner);\n \tString VendorName = \"Dummy\";\n \tString ProductName = \"Dummy\";\n \tTextView textView = (TextView) findViewById(R.id.usb_list_view);\n \tString UsbList = (String) textView.getText();\n // Retrieve the UsbManager service with its message\n UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);\n PendingIntent mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n\n HashMap<String, UsbDevice> deviceList = manager.getDeviceList();\n Iterator<UsbDevice> deviceIterator = deviceList.values().iterator();\n while(deviceIterator.hasNext()){\n UsbDevice device = deviceIterator.next();\n String SelectedText = String.valueOf(UsbListSpinner.getSelectedItem());\n int Vid = device.getVendorId();\n \n \n switch (Vid) {\n case 2372:\n \tVendorName = \"KORG, Inc.\";\n \tProductName = \"nanoKONTROL studio controller\";\n \tbreak;\t\n case 2235:\n \tVendorName = \"Texas Instruments Japan\";\n \tProductName = \"PCM2900 Audio Codec\";\n \tbreak;\n default:\n\t\t\t\t// do nothing.\n\t\t\t\tbreak;\t\n }\n \n String IteratorText = VendorName+\"\\t\"+ProductName;\n// UsbList=UsbList.concat(\"\\n Selected:\" + SelectedText);\n// UsbList=UsbList.concat(\"\\n Device:\" + IteratorText);\n if(SelectedText.equalsIgnoreCase(IteratorText)){\n \tmanager.requestPermission(device, mPermissionIntent);\n// \tToast.makeText(view.getContext(), \n// \t\t\t\"OnItemSelectedListener : \" + String.valueOf(device.getDeviceName()),\n// \t\t\tToast.LENGTH_SHORT).show();\n }\n }\n textView.setText(UsbList);\n }",
"public void writeToStorage() throws Exception {\n TaggingDeviceRestTest.ensureDeviceExists(eKey);\n String baseUrl = REST_URL + \"/core/device\";\n TaggingDeviceRestTest\n .putSecurityIPs(baseUrl,\n eKey,\n Collections.singletonList(IPv4.fromIPv4Address(ip)));\n }",
"private void doYourOpenUsbDevice(UsbDevice usbDevice) {\n connection = mUsbManager.openDevice(usbDevice);\n //add your operation code here\n\n if (connection == null) {\n Log.e(LOG_TAG, \"UsbDeviceConnection null\");\n }\n\n ProbeTable customTable = new ProbeTable();\n customTable.addProduct(0x067B, 0x2303, ProlificSerialDriver.class);\n customTable.addProduct(0x04E2, 0x1410, CdcAcmSerialDriver.class);\n\n UsbSerialProber prober = new UsbSerialProber(customTable);\n\n List<UsbSerialDriver> availableDrivers = prober.findAllDrivers(mUsbManager);\n if (availableDrivers.isEmpty()) {\n\n Log.e(LOG_TAG, \"No available drivers\");\n\n return;\n }\n\n // Open a connection to the first available driver.\n UsbSerialDriver driver = availableDrivers.get(0);\n// mUsbManager.requestPermission(driver.getDevice(), mPermissionIntent);\n boolean hasPermission = mUsbManager.hasPermission(driver.getDevice());\n\n Log.e(LOG_TAG, \"is permission \" + hasPermission);\n\n if (connection == null) {\n\n // You probably need to call UsbManager.requestPermission(driver.getDevice(), ..)\n return;\n }\n\n\n sPort = driver.getPorts().get(0);\n\n\n boundRate = Integer.parseInt(preferences.getString(\"boundRate\", \"9600\"));\n\n dataBits = Integer.parseInt(preferences.getString(\"dataBits\", \"8\"));\n\n String parityStr = preferences.getString(\"parity\", \"NONE\");\n\n\n if (parityStr.equalsIgnoreCase(\"ODD\")) {\n parity = UsbSerialPort.PARITY_ODD;\n } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n parity = UsbSerialPort.PARITY_EVEN;\n } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n parity = UsbSerialPort.PARITY_NONE;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n String stopBitsStr = preferences.getString(\"stopBits\", \"1\");\n\n if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n stopBits = UsbSerialPort.STOPBITS_1;\n } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n stopBits = UsbSerialPort.STOPBITS_1_5;\n } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n stopBits = UsbSerialPort.STOPBITS_2;\n } else {\n Toast.makeText(getApplicationContext(),\n \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n }\n\n\n try {\n sPort.open(connection);\n sPort.setParameters(boundRate, dataBits, stopBits, parity);\n sPort.setRTS(true);\n sPort.setDTR(true);\n\n tvResult.append(\"Connected to device.\\n\");\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n tvResult.append(\"Error opening device: \" + e.getMessage());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n try {\n sPort.close();\n } catch (IOException e2) {\n // Ignore.\n }\n sPort = null;\n return;\n }\n tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n\n onDeviceStateChange();\n\n Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n\n// if (preferences.getString(\"boundRate\", null) != null) {\n//\n// boundRate = Integer.parseInt(preferences.getString(\"boundRate\", null));\n//\n//\n// if (preferences.getString(\"dataBits\", null) != null) {\n//\n// dataBits = Integer.parseInt(preferences.getString(\"dataBits\", null));\n//\n//\n// if (preferences.getString(\"parity\", null) != null) {\n//\n// String parityStr = preferences.getString(\"parity\", null);\n//\n// if (parityStr.equalsIgnoreCase(\"ODD\")) {\n// parity = UsbSerialPort.PARITY_ODD;\n// } else if (parityStr.equalsIgnoreCase(\"EVEN\")) {\n// parity = UsbSerialPort.PARITY_EVEN;\n// } else if (parityStr.equalsIgnoreCase(\"NONE\")) {\n// parity = UsbSerialPort.PARITY_NONE;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid parity from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// if (preferences.getString(\"stopBits\", null) != null) {\n//\n// String stopBitsStr = preferences.getString(\"stopBits\", null);\n//\n// if (stopBitsStr.equalsIgnoreCase(\"1\")) {\n// stopBits = UsbSerialPort.STOPBITS_1;\n// } else if (stopBitsStr.equalsIgnoreCase(\"1.5\")) {\n// stopBits = UsbSerialPort.STOPBITS_1_5;\n// } else if (stopBitsStr.equalsIgnoreCase(\"2\")) {\n// stopBits = UsbSerialPort.STOPBITS_2;\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select valid stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// try {\n// sPort.open(connection);\n// sPort.setParameters(boundRate, dataBits, stopBits, parity);\n// sPort.setRTS(true);\n// sPort.setDTR(true);\n//\n// tvResult.append(\"Connected to device.\\n\");\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n//// showStatus(mDumpTextView, \"CD - Carrier Detect\", sPort.getCD());\n//// showStatus(mDumpTextView, \"CTS - Clear To Send\", sPort.getCTS());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"DTR - Data Terminal Ready\", sPort.getDTR());\n//// showStatus(mDumpTextView, \"DSR - Data Set Ready\", sPort.getDSR());\n//// showStatus(mDumpTextView, \"RI - Ring Indicator\", sPort.getRI());\n//// showStatus(mDumpTextView, \"RTS - Request To Send\", sPort.getRTS());\n//\n// } catch (IOException e) {\n// Log.e(LOG_TAG, \"Error setting up device: \" + e.getMessage(), e);\n// tvResult.append(\"Error opening device: \" + e.getMessage());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n// try {\n// sPort.close();\n// } catch (IOException e2) {\n// // Ignore.\n// }\n// sPort = null;\n// return;\n// }\n// tvResult.append(\"Serial device: \" + sPort.getClass().getSimpleName());\n// svDemoScroller.smoothScrollTo(0, tvResult.getBottom());\n//\n// onDeviceStateChange();\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Stop bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Parity bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Data bits from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// } else {\n// Toast.makeText(getApplicationContext(),\n// \"Please select Bound rate from settings\", Toast.LENGTH_SHORT).show();\n// }\n//\n// Log.e(LOG_TAG, \"Setting: \" + boundRate + \" \" + dataBits + \" \" + parity + \" \" + stopBits);\n }",
"public void setCaptureDevice(String devid);",
"private void aumentaCapacidade(){\n\t\tif(this.tamanho == this.elementos.length){\n\t\t\tObject[] elementosNovos = new Object[this.elementos.length*2];\n\t\t\tfor(int i =0; i<this.elementos.length;i++){\n\t\t\t\telementosNovos[i]=this.elementos[i];\n\t\t\t}\n\t\t\tthis.elementos=elementosNovos;\n\t\t}\n\t}",
"public void callSetCmd(){\n if(spinCmdValue.getSelectedItem().toString().equals(\"Select Value\")){\n Toast.makeText(getApplicationContext(),\"Please select value\",Toast.LENGTH_SHORT).show();\n return;\n }\n int floorNo = Integer.valueOf(String.valueOf(spinCmd.getSelectedItemPosition()));\n int a1 = 18;\n int a2 = 17;\n int a3 = 112;\n int a4 = 240 + floorNo;\n int a5 = Integer.parseInt(spinCmdValue.getSelectedItem().toString());\n int a6 = 00;\n\n int[] sendValChkSum = {a1, a2, a3, a4, a5, a6};\n String strChkSum = CalculateCheckSum.calculateChkSum(sendValChkSum);\n String asciiString = String.format(\"%04x\", a1).substring(2, 4) + String.format(\"%04x\", a2).substring(2, 4) + String.format(\"%04x\", a3).substring(2, 4) + String.format(\"%04x\", a4).substring(2, 4) + String.format(\"%04x\", a5).substring(2, 4) + String.format(\"%04x\", a6).substring(2, 4);\n asciiString = asciiString + strChkSum + \"\\r\";\n// Log.e(TAG, \"asciiString = \" + asciiString);\n\n if (isConnected()) {\n sendMessage(asciiString.getBytes());\n } else {\n Toast.makeText(getApplicationContext(), \"Connect to the device\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"private void updateDist2DestCharacteristic() {\n String editTextValue = ((EditText) view.findViewById(R.id.dist2DestEditText)).getText().toString();\n byte[] dist2Dest = editTextValue.getBytes();\n\n //Check if the entered distance is too long or too short -> modify it\n if (dist2Dest.length > 8) {\n dist2Dest = Arrays.copyOfRange(dist2Dest, 0, 7);\n }\n if (dist2Dest.length < 8) {\n byte[] dist2Dest_new = new byte[8];\n\n for (int i = 0; i < dist2Dest.length; i++) {\n dist2Dest_new[i] = dist2Dest[i];\n }\n\n for (int i = dist2Dest.length; i < 8; i++) {\n dist2Dest_new[i] = 0;\n }\n\n dist2Dest = dist2Dest_new;\n }\n\n //Fill the characteristic array with the 8 bytes (from 17 to 24)\n int i1 = 0;\n for (int i2 = 17; i2 <= 24; i2++) {\n dist2DestCharacteristic_value[i2] = dist2Dest[i1];\n i1++;\n }\n\n //Set the visibility (byte 17) and set the value\n dist2DestCharacteristic_value[16] = visibility;\n dist2DestCharacteristic.setValue(dist2DestCharacteristic_value);\n }",
"@Override\n public void writeToParcel( Parcel dest, int flags )\n {\n dest.writeString( emoticonId );\n dest.writeString( emoticonName );\n dest.writeString( emoticonStatic );\n dest.writeString( emoticonDynamic );\n dest.writeString( packageId );\n dest.writeByteArray( emoticonStaticByte );\n dest.writeByteArray( emoticonDynamicByte );\n dest.writeString( userPhone );\n dest.writeBooleanArray( new boolean[]{ isOnlyBrowse } );\n }",
"void writeEeprom(ImuEepromWriter sensor, int scaleNo, short[] data);",
"private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }",
"@Override\n public Object getData() {\n return devices;\n }",
"private void updateTurnInfoCharacteristic() {\n String editTextValue = ((EditText) view.findViewById(R.id.turnInfoEditText)).getText().toString();\n byte[] turnInfo = editTextValue.getBytes();\n\n //Check if the entered distance is too long or too short -> modify it\n if (turnInfo.length > 16) {\n turnInfo = Arrays.copyOfRange(turnInfo, 0, 15);\n }\n if (turnInfo.length < 16) {\n byte[] turnInfo_new = new byte[16];\n\n for (int i = 0; i < turnInfo.length; i++) {\n turnInfo_new[i] = turnInfo[i];\n }\n\n for (int i = turnInfo.length; i < 16; i++) {\n turnInfo_new[i] = 0;\n }\n\n turnInfo = turnInfo_new;\n }\n\n //Fill the characteristic array with the 8 bytes (from 17 to 32)\n int i1 = 0;\n for (int i2 = 17; i2 <= 32; i2++) {\n turnInfoCharacteristic_value[i2] = turnInfo[i1];\n i1++;\n }\n\n //Set the visibility (byte 17) and set the value\n turnInfoCharacteristic_value[16] = visibility;\n turnInfoCharacteristic.setValue(turnInfoCharacteristic_value);\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\tAverageFuelRate = CAN1Comm.Get_AverageFuelRate_333_PGN65390();\n\t\tLatestFuelConsumed = CAN1Comm.Get_ADaysFuelUsed_1405_PGN65390();\t\n\t}",
"public void openUsbDevice() {\n tryGetUsbPermission();\n }",
"public com.google.protobuf.Empty setDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);",
"private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }",
"public boolean writeToDeviceFile(Device dev) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element device = doc.createElement(\"Device\");\n rootElement.appendChild(device);\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(dev.getDeviceID()));\n device.appendChild(id);\n Element names = doc.createElement(\"Names\");\n device.appendChild(names);\n\n for (Map.Entry<Locale, String> entry : dev.getDeviceNames().entrySet()) {\n Element name = doc.createElement(\"Name\");\n Element locale = doc.createElement(\"Locale\");\n Element nameStr = doc.createElement(\"Value\");\n\n locale.appendChild(doc.createTextNode(entry.getKey().toString()));\n nameStr.appendChild(doc.createTextNode(entry.getValue()));\n\n name.appendChild(locale);\n name.appendChild(nameStr);\n names.appendChild(name);\n }\n\n Element type = doc.createElement(\"Type\");\n type.appendChild(doc.createTextNode(dev.getType()));\n device.appendChild(type);\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(dev.getImgName()));\n device.appendChild(image);\n Element capabilities = doc.createElement(\"Capabilities\");\n device.appendChild(capabilities);\n\n for (int j = 0; j < dev.getCapabilities().size(); j++) {\n Element cap = doc.createElement(\"capability\");\n cap.appendChild(doc.createTextNode(dev.getCapabilities().get(j).getCapID()));\n capabilities.appendChild(cap);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.DEV_FILE_DIR + dev.getDeviceID() + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n return true;\n\n } catch (ParserConfigurationException | TransformerException pce) {\n return false;\n }\n }",
"private static void prepareAdvData() {\n ADV_DATA.add(createDateTimePacket());\n ADV_DATA.add(createDeviceIdPacket());\n ADV_DATA.add(createDeviceSettingPacket());\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutTimePacket(i));\n }\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutDatePacket(i));\n }\n }",
"public void initDevice() {\r\n\t\t\r\n\t}",
"private byte[] ionBytes(IonValue val)\n {\n IonDatagram dg = system().newDatagram(val);\n return dg.getBytes();\n }",
"@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(vooleAuth);\n\t\tdest.writeString(authCompile);\n\t\tdest.writeString(vooleAgent);\n\t\tdest.writeString(agentCompile);\n\t\tdest.writeString(agentLibs);\n\t\tdest.writeString(upgradeVersion);\n\t\tdest.writeString(terminaLogVersion);\n\t\tdest.writeString(apkStartType);\n\t\tdest.writeString(isAuth);\n\t\tdest.writeString(deviceid);\n\t\tdest.writeString(sn);\n\t\tdest.writeString(sdkModuleVersion);\n\t\tdest.writeString(sdkModuleType);\n\t\tdest.writeString(packageName);\n\t\tdest.writeParcelable(info, PARCELABLE_WRITE_RETURN_VALUE);\n\t}",
"@Override\n\tpublic void LoadUSB()\n\t{\n\t\t\n\t\tSystem.out.println(\"▓ňU┼╠\");\n\t\t\n\t}",
"private void processDeviceStream(SelectionKey key, byte[] data) throws IOException{\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tString sDeviceID = \"\";\n\t\t// Initial call where the device sends it's IMEI# - Sarat\n\t\tif ((data.length >= 10) && (data.length <= 17)) {\n\t\t\tint ii = 0;\n\t\t\tfor (byte b : data)\n\t\t\t{\n\t\t\t\tif (ii > 1) { // skipping first 2 bytes that defines the IMEI length. - Sarat\n\t\t\t\t\tchar c = (char)b;\n\t\t\t\t\tsDeviceID = sDeviceID + c;\n\t\t\t\t}\n\t\t\t\tii++;\n\t\t\t}\n\t\t\t// printing the IMEI #. - Sarat\n\t\t\tSystem.out.println(\"IMEI#: \"+sDeviceID);\n\n\t\t\tLinkedList<String> lstDevice = new LinkedList<String>();\n\t\t\tlstDevice.add(sDeviceID);\n\t\t\tdataTracking.put(channel, lstDevice);\n\n\t\t\t// send message to module that handshake is successful - Sarat\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, true);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// second call post handshake where the device sends the actual data. - Sarat\n\t\t}else if(data.length > 17){\n\t\t\tmClientStatus.put(channel, System.currentTimeMillis());\n\t\t\tList<?> lst = (List<?>)dataTracking.get(channel);\n\t\t\tif (lst.size() > 0)\n\t\t\t{\n\t\t\t\t//Saving data to database\n\t\t\t\tsDeviceID = lst.get(0).toString();\n\t\t\t\tDeviceState.put(channel, sDeviceID);\n\n\t\t\t\t//String sData = org.bson.internal.Base64.encode(data);\n\n\t\t\t\t// printing the data after it has been received - Sarat\n\t\t\t\tStringBuilder deviceData = byteToStringBuilder(data);\n\t\t\t\tSystem.out.println(\" Data received from device : \"+deviceData);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t//publish device IMEI and packet data to Nats Server\n\t\t\t\t\tnatsPublisher.publishMessage(sDeviceID, deviceData);\n\t\t\t\t} catch(Exception nexp) {\n\t\t\t\t\tnexp.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t//sending response to device after processing the AVL data. - Sarat\n\t\t\t\ttry {\n\t\t\t\t\tsendDataReceptionCompleteMessage(key, data);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//storing late timestamp of device\n\t\t\t\tDeviceLastTimeStamp.put(sDeviceID, System.currentTimeMillis());\n\n\t\t\t}else{\n\t\t\t\t// data not good.\n\t\t\t\ttry {\n\t\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t// data not good.\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t}\n\t\t}\n\t}",
"private DisplayDevice(){\t\t\r\n\t\t\r\n\t}",
"public void receberValores() {\n Bundle b = getIntent().getExtras();\n if (b != null) {\n cpf3 = b.getString(\"valor2\");\n renda = b.getDouble(\"valor3\");\n data = b.getString(\"valor4\");\n data2 = b.getString(\"valor5\");\n }\n }",
"public void onPrepareDevice(ConnectDevice device);",
"public void limparCamposOutPut(){\n lblDisciplina.setText(\"\");\n lblAssunto.setText(\"\");\n lblDescricao.setText(\"\");\n imagemRecebidaEnunciado.setImage(imageDefault);\n imagemRecebidaResposta.setImage(imageDefault);\n }",
"public void setEncDesc(byte[] value) {\n this.encDesc = value;\n }",
"public void sendInfo(){\r\n\t\tfor(int i = 0; i < attachedChooser.getNumberOfCommandsInChooser(); i++){\r\n\t\t\tthis.writeStringData(i + \" \" + attachedChooser.getCommand(i).toString() + \">>>\"); // >>> denoted the end of the current command to the arduino\r\n\t\t}\r\n\t\tthis.writeStringData(\"!!!\"); //denoted to arduino that we have given it all of the commands and it can do its thing \r\n\t}",
"void askDevCardProduction();",
"@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putSerializable(\"device\", mDevice);\n }",
"@Override\n\tvoid putData() {\n\t\tSystem.out.println(\"Brand : \"+brand);\n\t\tSystem.out.println(\"Model : \"+model);\n\t\tSystem.out.println(\"Year of manufacture : \"+year_of_manufacture);\n\t\tSystem.out.println(\"CC : \"+cc);\n\t}",
"public void limparCamposInput(){\n txtDisciplina.setText(\"\");\n txtAssunto.setText(\"\");\n txtDescricao.setText(\"\");\n imagemEnunciado.setImage(imageDefault);\n imagemResposta.setImage(imageDefault);\n }",
"public void populateVitals() {\n try {\n Statement stmt = con.createStatement();\n\n ResultSet rs = stmt.executeQuery(\"select * from device\");\n while (rs.next()) {\n\n String guid = rs.getString(\"DeviceGUID\");\n int deviceId = rs.getInt(\"DeviceID\");\n int deviceTypeId = rs.getInt(\"DeviceTypeID\");\n int locationId = rs.getInt(\"LocationID\");\n float deviceProblem = rs.getFloat(\"ProblemPercentage\");\n\n String dateService = rs.getString(\"DateOfInitialService\");\n\n Device device = new Device();\n device.setDateOfInitialService(dateService);\n device.setDeviceGUID(guid);\n device.setDeviceID(deviceId);\n device.setDeviceTypeID(deviceTypeId);\n device.setLocationID(locationId);\n device.setProblemPercentage(deviceProblem);\n\n deviceList.add(device);\n\n }\n } catch (SQLException e) {\n log.error(\"Error populating devices\", e);\n }\n\n }",
"@Override\n public void run() {\n chooseUsbAudioDeviceDialog(audio_out);\n }",
"public void setDeviceName(String dn) {\r\n \tthis.deviceName = dn;\r\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n passwordEditTextValue = edittext.getText().toString() + \"\\n\";\n\n byte[] bytes = passwordEditTextValue.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 1000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"public void writeValue(PropertyIdentifier poid, Encodable value) {\n // 8 is default priority for manual operations\n LOG.info(\"Write on: \" + poid.toString() + \" @ \" + getObjectName() +\" with: \" + value.toString());\n try {\n RequestUtils.writeProperty(DeviceService.localDevice,bacnetDevice,getObjectIdentifier(),poid,value,8);\n } catch (BACnetException bac) {\n LOG.warn(\"Cant write: \" + poid.toString() + \" at \" + getObjectIdentifier().toString());\n }\n\n }",
"public void createValue() {\n value = new AES_GetBusa_Lib_1_0.AES_GetBusa_Request();\n }",
"protected void resumeSetting() {\n\t\tString screenIdString = Configuration.getInstance().getScreenIdConfig();\n\t\tString keyString = Configuration.getInstance().getServerKeyConfig();\n\t\tString addresString = Configuration.getInstance().getServerIpConfig();\n\t\tint port = Configuration.getInstance().getServerPortConfig();\n\t\tString screenKeyString = Configuration.getInstance().getScreenKeyConfig();\n\t\t\n\t\tscreenIdTextView.setText(screenIdString);\n\t\tkeyTextView.setText(keyString);\n\t\tipAddressTextView.setText(addresString);\n\t\tportTextView.setText(String.valueOf(port));\n\t\tscreenKeyTextView.setText(screenKeyString);\n\t}",
"private void initValues(){\n\t\tProduct p = GetMockEnitiy.getProduct();\n\t\t\n\t\tString s = JSONhelper.toJSON(p);\n\t\ttvJSON.setText(s);\n\t\t\n\t}",
"public void Send_To_Arduino()\n{\n float[] toSend = new float[6];\n\n toSend[0] = PApplet.parseFloat(SPField.getText());\n toSend[1] = PApplet.parseFloat(InField.getText());\n toSend[2] = PApplet.parseFloat(OutField.getText());\n toSend[3] = PApplet.parseFloat(PField.getText());\n toSend[4] = PApplet.parseFloat(IField.getText());\n toSend[5] = PApplet.parseFloat(DField.getText());\n Byte a = (AMLabel.valueLabel().getText()==\"Manual\")?(byte)0:(byte)1;\n Byte d = (DRLabel.valueLabel().getText()==\"Direct\")?(byte)0:(byte)1;\n myPort.write(a);\n myPort.write(d);\n myPort.write(floatArrayToByteArray(toSend));\n justSent=true;\n}",
"public void restoreValues() {\n drive_control.stopDriving();\n if (ACTUAL_DIFICULTY == EASY)\n drive_control.setSpeedScale(EASY_BASE_SPEED);\n if (ACTUAL_DIFICULTY == MEDIUM)\n drive_control.setSpeedScale(MEDIUM);\n if (ACTUAL_DIFICULTY == HARD)\n drive_control.setSpeedScale(HARD);\n drive_control.startDriving(getContext(), DriveControl.JOY_STICK);\n isUserControlAct = true;\n }",
"public void llenarDatosConfiguracion(){\n\n hoseEntities = new ArrayList<>();\n //**********************************************************\n\n //Capturar Nombre Host WIFI\n int[] tramaNombreEmbedded = new int[16];\n int c = 0;\n for(int i = 8; i<= 23; i++){\n tramaNombreEmbedded[c] = bufferRecepcion[i];\n c++;\n }\n\n\n //Log.v(\"NOMBRE EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaNombreEmbedded,tramaNombreEmbedded.length)));\n //**********************************************************\n //Capturar MAC TABLET\n int[] tramaMACTablet= new int[6];\n c = 0;\n for(int i = 24; i<= 29; i++){\n tramaMACTablet[c] = bufferRecepcion[i];\n c++;\n }\n //Log.v(\"MAC TABLET EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(tramaMACTablet,tramaMACTablet.length)));\n\n\n //**********************************************************\n //Capturar Contraseña Red Host\n int[] contrasenaHostEmbedded = new int[11];\n c = 0;\n for(int i = 30; i<= 40; i++){\n contrasenaHostEmbedded[c] = bufferRecepcion[i];\n c++;\n }\n\n //Log.v(\"CONTRASENA RED EMBEDDED\", \"\" + hexToAscii(byteArrayToHexString(contrasenaHostEmbedded,contrasenaHostEmbedded.length)));\n\n\n //**********************************************************\n //Capturar Nro Bombas\n int[] numeroBombas = new int[1];\n numeroBombas[0] = bufferRecepcion[41];\n numBombas = Integer.parseInt(byteArrayToHexIntGeneral(numeroBombas,1));\n //**********************************************************\n //int pIinicial = 42;\n\n //obtener solo IDbombas\n int[] idBombas = new int[numBombas];\n\n int pIinicial = 42;\n for(int i = 0; i< numBombas; i++){\n idBombas[i] = bufferRecepcion[pIinicial];\n pIinicial+=1;\n }\n\n int auxIdBomba=0;\n for(int i = 0; i< numBombas; i++){\n Hose hose = new Hose();\n TransactionEntity transactionEntity = new TransactionEntity();\n transactionEntity.setEstadoRegistro(\"P\");\n //**********************************************************\n //Capturar idBomba\n int[] idBomba = new int[1];\n idBomba[0] = bufferRecepcion[pIinicial];\n auxIdBomba=Integer.parseInt((byteArrayToHexIntGeneral(idBomba,1)));\n transactionEntity.setIdBomba(auxIdBomba);\n transactionEntity.setNombreManguera(\"\"+auxIdBomba);\n hose.setHoseNumber(auxIdBomba);\n hose.setHoseName(\"\"+auxIdBomba);\n hose.setHardwareId(1);\n hose.setLastTicket(0);\n hose.setFuelQuantity(0.0);\n\n //**********************************************************\n //Capturar idProducto\n int[] idProducto = new int[1];\n idProducto[0] = bufferRecepcion[pIinicial + 1];\n transactionEntity.setIdProducto(Integer.parseInt(byteArrayToHexIntGeneral(idProducto,1)));\n //**********************************************************\n //Capturar cantidadDecimales\n int[] cantidadDecimales = new int[1];\n cantidadDecimales[0] = bufferRecepcion[pIinicial + 2];\n transactionEntity.setCantidadDecimales(Integer.parseInt(byteArrayToHexIntGeneral(cantidadDecimales,1)));\n //**********************************************************\n //Capturar nombreManguera\n int[] nombreManguera = new int[10];\n int contadorMangueraInicial = pIinicial + 3;\n int contadorMangueraFinal = contadorMangueraInicial + 9;\n int contadorIteracionesManguera = 0;\n for(int j=contadorMangueraInicial; j<=contadorMangueraFinal; j++){\n nombreManguera[contadorIteracionesManguera] = bufferRecepcion[j];\n contadorIteracionesManguera ++;\n }\n //transactionEntity.setNombreManguera(hexToAscii(byteArrayToHexString(nombreManguera,nombreManguera.length)));\n Log.v(\"Nombre Manguera\", hexToAscii(byteArrayToHexString(nombreManguera,nombreManguera.length)));\n\n //Capturar nombreProducto\n int[] nombreProducto = new int[10];\n int contadorProductoInicial = pIinicial + 13;\n int contadorProductoFinal = contadorProductoInicial + 9;\n int contadorIteracionesProducto = 0;\n for(int k=contadorProductoInicial; k<=contadorProductoFinal; k++){\n nombreProducto[contadorIteracionesProducto] = bufferRecepcion[k];\n contadorIteracionesProducto ++;\n }\n transactionEntity.setNombreProducto(hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n Log.v(\"Nombre Producto\",hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n hose.setNameProduct(hexToAscii(byteArrayToHexString(nombreProducto,nombreProducto.length)));\n\n hoseEntities.add(transactionEntity);\n hoseMasters.add(hose);\n pIinicial = pIinicial + 23;\n }\n\n }",
"void updateViewToDevice()\n {\n if (!mBeacon.isConnected())\n {\n return;\n }\n\n KBCfgCommon oldCommonCfg = (KBCfgCommon)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeCommon);\n KBCfgCommon newCommomCfg = new KBCfgCommon();\n KBCfgEddyURL newUrlCfg = new KBCfgEddyURL();\n KBCfgEddyUID newUidCfg = new KBCfgEddyUID();\n try {\n //check if user update advertisement type\n int nAdvType = 0;\n if (mCheckBoxURL.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyURL;\n }\n if (mCheckboxUID.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyUID;\n }\n if (mCheckboxTLM.isChecked()){\n nAdvType |= KBAdvType.KBAdvTypeEddyTLM;\n }\n //check if the parameters changed\n if (oldCommonCfg.getAdvType() != nAdvType)\n {\n newCommomCfg.setAdvType(nAdvType);\n }\n\n //adv period, check if user change adv period\n Integer changeTag = (Integer)mEditBeaconAdvPeriod.getTag();\n if (changeTag > 0)\n {\n String strAdvPeriod = mEditBeaconAdvPeriod.getText().toString();\n if (Utils.isPositiveInteger(strAdvPeriod)) {\n Float newAdvPeriod = Float.valueOf(strAdvPeriod);\n newCommomCfg.setAdvPeriod(newAdvPeriod);\n }\n }\n\n //tx power ,\n changeTag = (Integer)mEditBeaconTxPower.getTag();\n if (changeTag > 0)\n {\n String strTxPower = mEditBeaconTxPower.getText().toString();\n Integer newTxPower = Integer.valueOf(strTxPower);\n if (newTxPower > oldCommonCfg.getMaxTxPower() || newTxPower < oldCommonCfg.getMinTxPower()) {\n toastShow(\"tx power not valid\");\n return;\n }\n newCommomCfg.setTxPower(newTxPower);\n }\n\n //device name\n String strDeviceName = mEditBeaconName.getText().toString();\n if (!strDeviceName.equals(oldCommonCfg.getName()) && strDeviceName.length() < KBCfgCommon.MAX_NAME_LENGTH) {\n newCommomCfg.setName(strDeviceName);\n }\n\n //uid config\n if (mCheckboxUID.isChecked())\n {\n KBCfgEddyUID oldUidCfg = (KBCfgEddyUID)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyUID);\n String strNewNID = mEditEddyNID.getText().toString();\n String strNewSID = mEditEddySID.getText().toString();\n if (!strNewNID.equals(oldUidCfg.getNid()) && KBUtility.isHexString(strNewNID)){\n newUidCfg.setNid(strNewNID);\n }\n\n if (!strNewSID.equals(oldUidCfg.getSid()) && KBUtility.isHexString(strNewSID)){\n newUidCfg.setSid(strNewSID);\n }\n }\n\n //url config\n if (mCheckBoxURL.isChecked())\n {\n KBCfgEddyURL oldUrlCfg = (KBCfgEddyURL)mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyURL);\n String strUrl = mEditEddyURL.getText().toString();\n if (!strUrl.equals(oldUrlCfg.getUrl())){\n newUrlCfg.setUrl(strUrl);\n }\n }\n\n //TLM advertisement interval configuration (optional)\n if (mCheckboxTLM.isChecked()){\n //The default TLM advertisement interval is 10. The KBeacon will send 1 TLM advertisement packet every 10 advertisement packets.\n //newCommomCfg.setTLMAdvInterval(8);\n }\n }catch (KBException excpt)\n {\n toastShow(\"config data is invalid:\" + excpt.errorCode);\n excpt.printStackTrace();\n }\n\n ArrayList<KBCfgBase> cfgList = new ArrayList<>(3);\n cfgList.add(newCommomCfg);\n cfgList.add(newUidCfg);\n cfgList.add(newUrlCfg);\n mDownloadButton.setEnabled(false);\n mBeacon.modifyConfig(cfgList, new KBeacon.ActionCallback() {\n @Override\n public void onActionComplete(boolean bConfigSuccess, KBException error) {\n mDownloadButton.setEnabled(true);\n if (bConfigSuccess)\n {\n clearChangeTag();\n toastShow(\"config data to beacon success\");\n }\n else\n {\n if (error.errorCode == KBException.KBEvtCfgNoParameters)\n {\n toastShow(\"No data need to be config\");\n }\n else\n {\n toastShow(\"config failed for error:\" + error.errorCode);\n }\n }\n }\n });\n }",
"public ArrayList getDeviceInfo();",
"private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}",
"private void logDeviceSettingTabField() {\n\n\t\tDeviceSettingsController.logVendorID(vendorId);\n\t\tDeviceSettingsController.logProductID(productId);\n\t\tDeviceSettingsController.logManufacture(manufacture);\n\t\tDeviceSettingsController.logProductString(productString);\n\t\tDeviceSettingsController.logSerialNumber(serialNumber);\n\t\tDeviceSettingsController.logFifoClockFrequency(fifoClockFrequency);\n\t\tDeviceSettingsController.logFPGAI2CSlaveAddress(i2cSlaveAddress);\n\t\tDeviceSettingsController.logDeviceSettingFirmware(deviceSttingFirmWare);\n\t\tDeviceSettingsController.logDeviceSettingI2CFrequency(deviceSttingI2CFrequency);\n\t}",
"private void getDynamicProfie() {\n getDeviceName();\n }",
"public void onClick(DialogInterface dialog, int whichButton) {\n userNameEditTextValue = edittext.getText().toString() + \"\\n\";\n\n byte[] bytes = userNameEditTextValue.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 1000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n\n }",
"void datos(ConversionesCapsula c) {\n String v;\n\n\n v = d.readString(\"Selecciona opcion de conversion\"\n + \"\\n1 ingles a metrico\"\n + \"\\n2 metrico a ingles\"\n + \"\\n3 metrico a metrico\"\n + \"\\n4 ingles a ingles\");\n c.setopc((Integer.parseInt(v)));\n int opc = (int) conversion.getopc();\n switch (opc) {\n case 1:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a metros\"\n + \"\\n2 Pies a centimetros\"\n + \"\\n3 Pies a Metros y Centimetros\"\n + \"\\n4 Pulgadas a metros\"\n + \"\\n5 Pulgadas a centimetros\"\n + \"\\n6 Pulgadas a Metros y Centimetros\"\n + \"\\n7 Pies y Pulgadas a metros\"\n + \"\\n8 Pies y Pulgadas a centimetros\"\n + \"\\n9 Pies y Pulgadas a Metros y Centimetros\");\n c.setopc1((Integer.parseInt(v)));\n\n\n break;\n case 2:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Pies\"\n + \"\\n2 Metros a Pulgadas\"\n + \"\\n3 Metros a Pies y Pulgadas\"\n + \"\\n4 Centimetros a Pies\"\n + \"\\n5 Centimetros a Pulgadas\"\n + \"\\n6 Centimetros a Pies y Pulgadas\"\n + \"\\n7 Metros y Centimetros a Pies\"\n + \"\\n8 Metros y Centimetros a Pulgadas\"\n + \"\\n9 Metros y Centimetros a Pies y Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 3:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Centimetros\"\n + \"\\n2 Metros a Metros y Centimetros\"\n + \"\\n3 Centimetros a Metros\"\n + \"\\n4 Centimetros a Metros y Centimetros\"\n + \"\\n5 Metros y Centimetros a Centimetros\"\n + \"\\n9 Metros y Centimetros a Metros\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 4:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a Pulgadas\"\n + \"\\n2 Pies a Pies y Pulgadas\"\n + \"\\n3 Pulgadas a Pies\"\n + \"\\n4 Pulgadas a Pies y Pulgadas\"\n + \"\\n5 Pies y Pulgadas a Pies\"\n + \"\\n9 Pies y Pulgadas a Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n }\n\n do v = d.readString(\"\\n Ingrese el valor: \\n\");\n while (!isNum(v));\n c.setvalor((Double.parseDouble(v)));\n }",
"@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tIntent intent = new Intent(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity\n\t\t\t\t Bundle bundle = new Bundle(0); \n\t bundle.putString(\"fun1\",transferValue);\n\t Log.e(\"TAG\",transferValue);\n\t bundle.putString(\"search1\",\"btnRunRecord\"); \n\t intent.putExtras(bundle);//can't \n\t\t\t\tstartActivity(intent);\n//\t\t\t\tfinish();\n\t\t\t}",
"public String getCaptureDevice();",
"private void sendScreenOptionsToBrowser() {\n ScreenCap.BrowserScreenMetrics metrics = screenCap.getScreenMetrics();\n mWebkeyVisitor.sendGson(new Message(\"1\", Message.Type.SCREEN_OPTIONS, new ScreenOptionsPayload(\n metrics.getWidth(),\n metrics.getHeight(),\n metrics.getRotation(),\n hasNavBar\n )));\n }",
"public void setDevice(String device) {\r\n this.device = device;\r\n }",
"public void createValue() {\n value = new GisInfoCaptureDO();\n }",
"private void listDevices(Context context) {\n\t DeviceList list = new DeviceList();\n\t int result = LibUsb.getDeviceList(context, list);\n\t if(result < 0) throw new LibUsbException(\"Unable to get device list\", result);\n\n\t try\n\t {\n\t for(Device device: list)\n\t {\n\t DeviceDescriptor descriptor = new DeviceDescriptor();\n\t result = LibUsb.getDeviceDescriptor(device, descriptor);\n\t if (result != LibUsb.SUCCESS) throw new LibUsbException(\"Unable to read device descriptor\", result);\n\t System.out.println(\"vendorId=\" + descriptor.idVendor() + \", productId=\" + descriptor.idProduct());\n\t }\n\t }\n\t finally\n\t {\n\t // Ensure the allocated device list is freed\n\t LibUsb.freeDeviceList(list, true);\n\t }\n\t}",
"void dump()\n\t\t{\n\t\t\tlog.info(\"Ch # \"+ch+\" Mode=\"+Hex.formatByte(mode)+\" Base=\"+Hex.formatWord(base.getValue())+\" Count=\"+Hex.formatWord(count.getValue()));\n\t\t\tlog.info(\"Ch # \"+ch+\" Hold=\"+hold+\" Request=\"+request+\" TC=\"+tc+\" Enabled=\"+enabled+\" Mask=\"+mask);\n\t\t}",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(name);\n dest.writeString(description);\n dest.writeString(type);\n dest.writeString(value);\n }",
"void switchScreen()\n {\n\n byte[] data = new byte[13];\n data[0] = (byte)0xF0;\n data[1] = (byte)0x00;\n data[2] = (byte)0x01;\n data[3] = (byte)0x05;\n data[4] = (byte)0x21;\n data[5] = (byte)DEFAULT_ID; //(byte)getID();\n data[6] = (byte)0x02; // \"Write Dump\" What??? Really???\n data[7] = (byte)0x15; // UNDOCUMENTED LOCATION\n data[8] = (byte)0x00; // UNDOCUMENTED LOCATION\n data[9] = (byte)0x01; // UNDOCUMENTED LOCATION\n data[10] = (byte)0x00; \n data[11] = (byte)0x00;\n data[12] = (byte)0xF7;\n tryToSendSysex(data);\n }",
"@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }",
"private void sensorInformation(){\n\t\tthis.name = this.paramName;\n\t\tthis.version = this.paramVersion;\n\t\tthis.author = this.paramVersion;\n\t}",
"private void valoresconfiguracion() {\n\n String file_ultimanotificacion = \"ultima_notificacion\";\n\n String file_ramdom = \"ramdom_number_file\";\n\n String file_vibrar = \"vibrar_file\";\n String file_sonido = \"sonido_file\";\n String file_notificar = \"notificar_file\";\n String file_tipo = \"tipo_file\";\n String file_ringtone = \"ring_tone_file\";\n\n\n String file_nombre_ringtone = \"nombre_ringtone__file\";\n\n\n String ultimanotificacion_val = \"notexist\";\n\n\n String vibrar_val = \"11111\";\n String sonido_val = \"A\";\n String notificacion_val = \"11111\";\n String ringtone_val = \"A\";\n\n String tiposonidoval = \"11111\";\n String nombre_ringtone_val = \"A\";\n\n\n try {\n // FileOutputStream fileOutputStream = openFileOutput(file_name, MODE_PRIVATE);\n //fileOutputStream.write(parametro1.getBytes());\n\n\n // fileOutputStream.write(parametro2.getBytes());\n // fileOutputStream.write(parametro3.getBytes());\n // fileOutputStream.write(parametro4.getBytes());\n // fileOutputStream.write(parametro5.getBytes());\n // fileOutputStream.write(parametro6.getBytes());\n\n FileOutputStream fileOutputStream_ultimanot = openFileOutput(file_ultimanotificacion, MODE_PRIVATE);\n fileOutputStream_ultimanot.write(ultimanotificacion_val.getBytes());\n\n\n\n FileOutputStream fileOutputStream_ramdom = openFileOutput(file_ramdom, MODE_PRIVATE);\n fileOutputStream_ramdom.write(vibrar_val.getBytes());\n\n FileOutputStream fileOutputStream_vibrar = openFileOutput(file_vibrar, MODE_PRIVATE);\n fileOutputStream_vibrar.write(vibrar_val.getBytes());\n\n\n FileOutputStream fileOutputStream_sonido = openFileOutput(file_sonido, MODE_PRIVATE);\n fileOutputStream_sonido.write(sonido_val.getBytes());\n\n\n FileOutputStream fileOutputStream_notificar = openFileOutput(file_notificar, MODE_PRIVATE);\n fileOutputStream_notificar.write(notificacion_val.getBytes());\n\n\n FileOutputStream fileOutputStream_sonidotipo = openFileOutput(file_tipo, MODE_PRIVATE);\n fileOutputStream_sonidotipo.write(tiposonidoval.getBytes());\n\n\n FileOutputStream fileOutputStream_ring_tone = openFileOutput(file_ringtone, MODE_PRIVATE);\n fileOutputStream_ring_tone.write(ringtone_val.getBytes());\n\n\n FileOutputStream fileOutputStream_nombre_ring_tone = openFileOutput(file_nombre_ringtone, MODE_PRIVATE);\n fileOutputStream_nombre_ring_tone.write(nombre_ringtone_val.getBytes());\n\n\n fileOutputStream_nombre_ring_tone.close();\n\n fileOutputStream_ring_tone.close();\n\n\n fileOutputStream_sonidotipo.close();\n\n fileOutputStream_notificar.close();\n\n fileOutputStream_vibrar.close();\n\n fileOutputStream_sonido.close();\n\n // fileOutputStream.close();\n // Toast.makeText(getApplicationContext(), \"Configurado\", Toast.LENGTH_LONG).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void WriteAtts(CommunicationBuffer buf)\n {\n if(WriteSelect(0, buf))\n buf.WriteString(host);\n if(WriteSelect(1, buf))\n buf.WriteString(sim);\n if(WriteSelect(2, buf))\n buf.WriteString(name);\n if(WriteSelect(3, buf))\n buf.WriteInt(ivalue);\n if(WriteSelect(4, buf))\n buf.WriteString(svalue);\n if(WriteSelect(5, buf))\n buf.WriteBool(enabled);\n }",
"public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(deviceName);\n dest.writeString(deviceAddress);\n dest.writeInt(status);\n }",
"public void enviarDatos(View view){\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED ||\n connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n connected = true;\n } else {\n connected = false;\n }\n\n if(connected == true){\n String temperaturaTV =fuego.getText().toString();\n String fuegoTV = fuego.getText().toString();\n String humedadTV = humedad.getText().toString();\n String humoTV = humo.getText().toString();\n if(temperaturaTV.equals(\"El sensor no tiene datos para mostrar\")\n && fuegoTV.equals(\"El sensor no tiene datos para mostrar\")\n && humedadTV.equals(\"El sensor no tiene datos para mostrar\")\n && humoTV.equals(\"El sensor no tiene datos para mostrar\")){\n Toast toast = Toast.makeText(getApplicationContext(), \"El sensor no tiene datos que guardar\", Toast.LENGTH_SHORT);\n toast.show();\n }else{\n Map<String, Object> datos = new HashMap<>();\n datos.put(\"idSensor\", id);\n\n if(temperaturaTV.equals(\"El sensor no tiene datos para mostrar\")){\n datos.put(\"fuego\", \"no\");\n }else{\n datos.put(\"fuego\", fuego.getText().toString());\n }\n\n if(temperaturaTV.equals(\"El sensor no tiene datos para mostrar\")){\n datos.put(\"temperatura\", 0);\n }else{\n datos.put(\"temperatura\", Float.parseFloat(temperatura.getText().toString().replace(\" °C\",\"\")));\n }\n\n if(temperaturaTV.equals(\"El sensor no tiene datos para mostrar\")){\n datos.put(\"humo\", 0);\n }else{\n datos.put(\"humo\", Float.parseFloat(humo.getText().toString().replace(\" ppm\",\"\")));\n }\n\n if(temperaturaTV.equals(\"El sensor no tiene datos para mostrar\")){\n datos.put(\"humedad\", 0);\n }else{\n datos.put(\"humedad\", Float.parseFloat(humedad.getText().toString().replace(\" %\",\"\")));\n }\n\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.collection(\"parametros\").add(datos);\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Datos Cargados Exitosamente\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }else{\n InicioSesion.FireMissilesDialogFragment prueba = new InicioSesion.FireMissilesDialogFragment();\n prueba.showNow(getSupportFragmentManager(), \"mensaje\");\n }\n }",
"public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }",
"public void updateDeviceToView()\n {\n boolean isTLMEnable, isUIDEnable, isUrlEnable;\n KBCfgCommon commonCfg = (KBCfgCommon) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeCommon);\n if (commonCfg != null) {\n\n //print basic capibility\n Log.v(LOG_TAG, \"support iBeacon:\" + commonCfg.isSupportIBeacon());\n Log.v(LOG_TAG, \"support eddy url:\" + commonCfg.isSupportEddyURL());\n Log.v(LOG_TAG, \"support eddy tlm:\" + commonCfg.isSupportEddyTLM());\n Log.v(LOG_TAG, \"support eddy uid:\" + commonCfg.isSupportEddyUID());\n Log.v(LOG_TAG, \"support ksensor:\" + commonCfg.isSupportKBSensor());\n Log.v(LOG_TAG, \"beacon has button:\" + commonCfg.isSupportButton());\n Log.v(LOG_TAG, \"beacon can beep:\" + commonCfg.isSupportBeep());\n Log.v(LOG_TAG, \"support accleration sensor:\" + commonCfg.isSupportAccSensor());\n Log.v(LOG_TAG, \"support humidify sensor:\" + commonCfg.isSupportHumiditySensor());\n Log.v(LOG_TAG, \"support max tx power:\" + commonCfg.getMaxTxPower());\n Log.v(LOG_TAG, \"support min tx power:\" + commonCfg.getMinTxPower());\n\n //get support trigger\n Log.v(LOG_TAG, \"support trigger\" + commonCfg.getTrigCapability());\n\n //device model\n mBeaconModel.setText(commonCfg.getModel());\n\n //device version\n mBeaconVersion.setText(commonCfg.getVersion());\n\n //current advertisment type\n mEditBeaconName.setText(commonCfg.getAdvTypeString());\n\n //advertisment period\n mEditBeaconAdvPeriod.setText(String.valueOf(commonCfg.getAdvPeriod()));\n\n //beacon tx power\n mEditBeaconTxPower.setText(String.valueOf(commonCfg.getTxPower()));\n\n //beacon name\n mEditBeaconName.setText(String.valueOf(commonCfg.getName()));\n\n //check if Eddy TLM advertisement enable\n isTLMEnable = ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyTLM) > 0);\n mCheckboxTLM.setChecked(isTLMEnable);\n\n //check if Eddy UID advertisement enable\n isUIDEnable= ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyUID) > 0);\n mCheckboxUID.setChecked(isUIDEnable);\n mUidLayout.setVisibility(isUIDEnable? View.VISIBLE: View.GONE);\n\n //check if Eddy URL advertisement enable\n isUrlEnable= ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeEddyURL) > 0);\n mCheckBoxURL.setChecked(isUrlEnable);\n mUrlLayout.setVisibility(isUrlEnable? View.VISIBLE: View.GONE);\n\n //check if iBeacon advertisment enable\n Log.v(LOG_TAG, \"iBeacon advertisment enable:\" + ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeIBeacon) > 0));\n\n //check if KSensor advertisment enable\n Log.v(LOG_TAG, \"iBeacon advertisment enable:\" + ((commonCfg.getAdvType() & KBAdvType.KBAdvTypeSensor) > 0));\n\n //check TLM adv interval\n Log.v(LOG_TAG, \"TLM adv interval:\" + commonCfg.getTLMAdvInterval());\n }\n\n //get eddystone URL paramaters\n KBCfgEddyURL beaconUrlCfg = (KBCfgEddyURL) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyURL);\n if (beaconUrlCfg != null) {\n mEditEddyURL.setText(beaconUrlCfg.getUrl());\n }\n\n //get eddystone UID information\n KBCfgEddyUID beaconUIDCfg = (KBCfgEddyUID) mBeacon.getConfigruationByType(KBCfgType.KBConfigTypeEddyUID);\n if (beaconUIDCfg != null) {\n mEditEddyNID.setText(beaconUIDCfg.getNid());\n mEditEddySID.setText(beaconUIDCfg.getSid());\n }\n\n clearChangeTag();\n }",
"private Result fillFromMAC() {\n final Result r = getResult();\n\n final DataArray da = MacHostPropertiesMonitor.getData();\n\n r.addSet(\"CPU_idle\", da.getParam(\"cpu_idle\"));\n r.addSet(\"CPU_int\", 0);\n r.addSet(\"CPU_iowait\", 0);\n r.addSet(\"CPU_nice\", 0);\n r.addSet(\"CPU_softint\", 0);\n r.addSet(\"CPU_sys\", da.getParam(\"cpu_sys\"));\n r.addSet(\"CPU_usr\", da.getParam(\"cpu_usr\"));\n r.addSet(\"Load5\", da.getParam(\"load1\"));\n r.addSet(\"Load10\", da.getParam(\"load5\"));\n r.addSet(\"Load15\", da.getParam(\"load15\"));\n r.addSet(\"Page_in\", da.getParam(\"blocks_in_R\"));\n r.addSet(\"Page_out\", da.getParam(\"blocks_out_R\"));\n r.addSet(\"Swap_in\", da.getParam(\"swap_in_R\"));\n r.addSet(\"Swap_out\", da.getParam(\"swap_out_R\"));\n r.addSet(\"eth0_IN\", da.getParam(\"eth0_in_R\"));\n r.addSet(\"eth0_OUT\", da.getParam(\"eth0_out_R\"));\n\n return r;\n }",
"public DeviceDescription() {\n //Initialize lists\n this.capabilities = new ArrayList<>();\n this.attachments = new ArrayList<>();\n }",
"public void connect(View view) {\n if (phoneNum.getText().toString().equals(\"\")) {\n Toast.makeText(getApplication(), \"Please enter a phone number\", Toast.LENGTH_SHORT).show();\n } else {\n phoneNum.setEnabled(false);\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n }\n }",
"private void setValues() {\n textViewPrice = findViewById(R.id.textViewPrice);\n textViewStoreName = findViewById(R.id.textViewStoreName);\n textViewLocation = findViewById(R.id.textViewLocation);\n buttonAcceptOrder = findViewById(R.id.buttonAcceptOrder);\n\n order = Parcels.unwrap(getIntent().getParcelableExtra(Order.class.getSimpleName()));\n\n textViewPrice.setText(\"$\" + decimalFormat.format(order.getPrice()));\n textViewStoreName.setText(\"Store: \"+ order.getStore().getName());\n textViewLocation.setText(\"Address: \" + order.getStore().getAddress());\n }",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(nome);\n dest.writeString(email);\n dest.writeString(senha);\n }",
"Device createDevice();",
"void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }",
"private void updateDeviceImage(Shell shell) {\r\n mBusyLabel.setText(\"Capturing...\"); // no effect\r\n\r\n shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));\r\n\r\n for (int i = 0; i < 10; i++) {\r\n long start = System.currentTimeMillis();\r\n getDeviceImage();\r\n long end = System.currentTimeMillis();\r\n System.out.println(\"count \" + i + \" take \" + (end-start) + \"ms\");\r\n }\r\n mRawImage = getDeviceImage();\r\n System.out.println(\"size is \" + mRawImage.size);\r\n for (int i = 0; i < mRotateCount; i++) {\r\n mRawImage = mRawImage.getRotated();\r\n }\r\n\r\n updateImageDisplay(shell);\r\n }",
"private void fillValues() {\n // TODO\n //copy global config\n //copy player\n Player[] newPlayers = new Player[2];\n if (globalConfiguration.isFirstPlayerHuman()){\n newPlayers[0] = new ConsolePlayer(globalConfiguration.getPlayers()[0].getName());\n }else{\n newPlayers[0] = new RandomPlayer(globalConfiguration.getPlayers()[0].getName());\n }\n if (globalConfiguration.isSecondPlayerHuman()){\n newPlayers[1] = new ConsolePlayer(globalConfiguration.getPlayers()[1].getName());\n }else{\n newPlayers[1] = new RandomPlayer(globalConfiguration.getPlayers()[1].getName());\n }\n //create local config\n this.localConfig = new Configuration(globalConfiguration.getSize(),\n newPlayers, globalConfiguration.getNumMovesProtection());\n\n this.localAudio = AudioManager.getInstance().isEnabled();\n\n //fill in values\n this.sizeFiled.setText(String.valueOf(localConfig.getSize()));\n this.numMovesProtectionField.setText(String.valueOf(localConfig.getNumMovesProtection()));\n this.durationField.setText(String.valueOf(DurationTimer.getDefaultEachRound()));\n\n if (localConfig.isFirstPlayerHuman()){\n this.isHumanPlayer1Button.setText(\"Player 1: Human\");\n }else{\n this.isHumanPlayer1Button.setText(\"Player 1: Computer\");\n }\n\n if (localConfig.isSecondPlayerHuman()){\n this.isHumanPlayer2Button.setText(\"Player 2: Human\");\n }else{\n this.isHumanPlayer2Button.setText(\"Player 2: Computer\");\n }\n\n if (localAudio){\n this.toggleSoundButton.setText(\"Sound FX: Enabled\");\n }else{\n this.toggleSoundButton.setText(\"Sound FX: Disabled\");\n }\n }",
"public void onPickDevice(ConnectDevice device);",
"private void setupPhisicalDevice() {\n try (MemoryStack memstack = MemoryStack.stackPush();) {\n IntBuffer buffer = buffer = memstack.mallocInt(1);\n\n\n long result = vkEnumeratePhysicalDevices(instance, buffer, null);\n int count = buffer.get();\n if (count == 0) {\n throw new RuntimeException(\"No physical support for vulcan available!\");\n }\n\n System.out.println(count);\n buffer = memstack.mallocInt(1);\n buffer.put(buffer.position(), 1);\n PointerBuffer deviceBuffer = memstack.mallocPointer(1);\n vkEnumeratePhysicalDevices(instance, buffer, deviceBuffer);\n //TODO: select the best one\n physicalDevice = new VkPhysicalDevice(deviceBuffer.get(), instance);\n }\n }",
"@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}",
"@Override\n\t\t\tpublic String toString(Device device) {\n\t\t\t\treturn device.getModel()+\"(\"+device.getComPort()+\")\";\n\t\t\t}",
"public void flattenValues() {\r\n \r\n if (!this.isAllowAddsWhileDeprovisioned()) {\r\n this.allowAddsWhileDeprovisionedString = null;\r\n }\r\n \r\n if (this.isAutoChangeLoader() == GrouperConfig.retrieveConfig().propertyValueBoolean(\"deprovisioning.autoChangeLoader\", true)) {\r\n this.autoChangeLoaderString = null;\r\n }\r\n \r\n if (this.isAutoselectForRemoval()) {\r\n this.autoselectForRemovalString = null;\r\n }\r\n \r\n this.deprovisionString = this.isDeprovision() ? \"true\" : \"false\";\r\n\r\n // true for direct, false for inherited, blank for not assigned\r\n this.directAssignmentString = this.isDirectAssignment() ? \"true\" : \"false\";\r\n\r\n if (!this.isSendEmail()) {\r\n this.sendEmailString = null;\r\n this.emailAddressesString = null;\r\n this.emailBodyString = null;\r\n this.emailGroupMembers = null;\r\n this.mailToGroupString = null;\r\n\r\n }\r\n if (this.isShowForRemoval()) {\r\n this.showForRemovalString = null;\r\n }\r\n \r\n }",
"public void damageDevice() {\n\t\t\r\n\t}",
"@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(operate_time);\n dest.writeString(operate_name);\n dest.writeString(resume_number);\n dest.writeString(name);\n dest.writeString(echo_yes);\n dest.writeString(sex);\n dest.writeString(year);\n dest.writeString(work_beginyear);\n dest.writeString(high_education);\n dest.writeString(location);\n dest.writeString(pic_filekey);\n dest.writeString(user_id);\n dest.writeString(resume_id);\n dest.writeString(moremajor);\n dest.writeString(isnew);\n }",
"private void getphoneinformaition() {\n\t\ttry {\n\t\t\tsoftVersion = this.getPackageManager().getPackageInfo(\n\t\t\t\t\tthis.getPackageName(), 0).versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\tsoftVersion = \"NULL\";\n\t\t}\n\n\t\tif (Build.BRAND != null) {\n\t\t\tphoneBrand = Build.BRAND;\n\t\t}\n\t\tif (Build.MODEL != null) {\n\t\t\tphoneModel = Build.MODEL;\n\t\t}\n\t\tif (Build.VERSION.RELEASE != null) {\n\t\t\tphoneOs = Build.VERSION.RELEASE;\n\t\t}\n\n\t\ttry {\n\t\t\tDisplayMetrics metric = new DisplayMetrics();\n\t\t\tgetWindowManager().getDefaultDisplay().getMetrics(metric);\n\t\t\tint width = metric.widthPixels; // 屏幕宽度(像素)\n\t\t\tint height = metric.heightPixels; // 屏幕高度(像素)\n\t\t\tString w = String.valueOf(width);\n\t\t\tString h = String.valueOf(height);\n\t\t\tStringBuffer s = new StringBuffer();\n\t\t\ts.append(w);\n\t\t\ts.append(\"*\");\n\t\t\ts.append(h);\n\t\t\tphoneResolution = s.toString();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tphoneResolution = \"NULL\";\n\t\t}\n\n\t\tFileLog.i(TAG, softVersion);\n\t\tFileLog.i(TAG, phoneBrand);\n\t\tFileLog.i(TAG, phoneModel);\n\t\tFileLog.i(TAG, phoneOs);\n\t\tFileLog.i(TAG, phoneResolution);\n\n\t}",
"public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }",
"private void debug()\n {\n if (!checkTestNeeded())\n {\n String resolution = width + \"x\" + height + \"-\";\n\n boolean success = preferences.getBoolean(PREF_PREFIX + resolution + \"success\",false);\n if (!success)\n {\n throw new RuntimeException(\"Phone not supported with this resolution (\" + width + \"x\" + height + \")\");\n }\n\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(preferences.getInt(PREF_PREFIX + resolution + \"sliceHeight\", 0));\n nv21Convertor.setStride(preferences.getInt(PREF_PREFIX + resolution + \"stride\", 0));\n nv21Convertor.setYPadding(preferences.getInt(PREF_PREFIX + resolution + \"padding\", 0));\n nv21Convertor.setPlanar(preferences.getBoolean(PREF_PREFIX + resolution + \"planar\", false));\n nv21Convertor.setColorPanesReversed(preferences.getBoolean(PREF_PREFIX + resolution + \"reversed\", false));\n encoderName = preferences.getString(PREF_PREFIX + resolution + \"encoderName\", \"\");\n encoderColorFormat = preferences.getInt(PREF_PREFIX + resolution + \"colorFormat\", 0);\n base64PPS = preferences.getString(PREF_PREFIX + resolution + \"pps\", \"\");\n base64SPS = preferences.getString(PREF_PREFIX + resolution + \"sps\", \"\");\n\n return;\n }\n\n Log.d(TAG, \">>>> Testing the phone for resolution \" + width + \"x\" + height);\n\n // Builds a list of available encoders and decoders we may be able to use\n // because they support some nice color formats\n Codec[] encoders = CodecManager.findEncodersForMimeType(MIME_TYPE);\n Codec[] decoders = CodecManager.findDecodersForMimeType(MIME_TYPE);\n\n int count = 0;\n int n = 1;\n for (Codec encoder1 : encoders)\n {\n count += encoder1.formats.length;\n }\n\n // Tries available encoders\n for (Codec encoder1 : encoders)\n {\n for (int j = 0; j < encoder1.formats.length; j++)\n {\n reset();\n\n encoderName = encoder1.name;\n encoderColorFormat = encoder1.formats[j];\n\n Log.v(TAG, \">> Test \" + (n++) + \"/\" + count + \": \" + encoderName + \" with color format \" + encoderColorFormat + \" at \" + width + \"x\" + height);\n\n // Converts from NV21 to YUV420 with the specified parameters\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(height);\n nv21Convertor.setStride(width);\n nv21Convertor.setYPadding(0);\n nv21Convertor.setEncoderColorFormat(encoderColorFormat);\n\n // /!\\ NV21Convertor can directly modify the input\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n\n try\n {\n // Starts the encoder\n configureEncoder();\n searchSPSandPPS();\n\n Log.v(TAG, \"SPS and PPS in b64: SPS=\" + base64SPS + \", PPS=\" + base64PPS);\n\n // Feeds the encoder with an image repeatedly to produce some NAL units\n encode();\n\n // We now try to decode the NALs with decoders available on the phone\n boolean decoded = false;\n for (int k = 0; k < decoders.length && !decoded; k++)\n {\n for (int l = 0; l < decoders[k].formats.length && !decoded; l++)\n {\n decoderName = decoders[k].name;\n decoderColorFormat = decoders[k].formats[l];\n try\n {\n configureDecoder();\n } catch (Exception e)\n {\n Log.d(TAG, decoderName + \" can't be used with \" + decoderColorFormat + \" at \" + width + \"x\" + height, e);\n\n releaseDecoder();\n break;\n }\n\n try\n {\n decode(true);\n Log.d(TAG, decoderName + \" successfully decoded the NALs (color format \" + decoderColorFormat + \")\");\n\n decoded = true;\n }\n catch (Exception e)\n {\n Log.e(TAG, decoderName + \" failed to decode the NALs\", e);\n }\n finally\n {\n releaseDecoder();\n }\n }\n }\n\n if (!decoded)\n {\n throw new RuntimeException(\"Failed to decode NALs from the encoder.\");\n }\n\n // Compares the image before and after\n if (!compareLumaPanes())\n {\n // TODO: try again with a different stride\n // TODO: try again with the \"stride\" param\n throw new RuntimeException(\"It is likely that stride != width\");\n }\n\n int padding;\n if ((padding = checkPaddingNeeded()) > 0)\n {\n if (padding < 4096)\n {\n Log.d(TAG, \"Some padding is needed: \" + padding);\n\n nv21Convertor.setYPadding(padding);\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n encodeDecode();\n }\n else\n {\n // TODO: try again with a different sliceHeight\n // TODO: try again with the \"slice-height\" param\n throw new RuntimeException(\"It is likely that sliceHeight != height\");\n }\n }\n\n createTestImage();\n if (!compareChromaPanes(false))\n {\n if (compareChromaPanes(true))\n {\n nv21Convertor.setColorPanesReversed(true);\n Log.d(TAG, \"U and V pane are reversed\");\n }\n else\n {\n throw new RuntimeException(\"Incorrect U or V pane...\");\n }\n }\n\n saveTestResult(true);\n Log.v(TAG, \"The encoder \" + encoderName + \" is usable with resolution \" + width + \"x\" + height);\n return;\n }\n catch (Exception e)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String stack = sw.toString();\n String str = \"Encoder \" + encoderName + \" cannot be used with color format \" + encoderColorFormat;\n Log.e(TAG, str, e);\n errorLog += str + \"\\n\" + stack;\n }\n finally\n {\n releaseEncoder();\n }\n }\n }\n\n saveTestResult(false);\n Log.e(TAG,\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n throw new RuntimeException(\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"public void releaseManualCommand() {\n try {\n RequestUtils.writeProperty(DeviceService.localDevice,bacnetDevice,getObjectIdentifier(),\n PropertyIdentifier.presentValue,null,new PriorityValue(new Null()),\n new UnsignedInteger(8));\n LOG.info(\"Release: \" + getObjectIdentifier());\n } catch (BACnetException bac) {\n LOG.warn(\"Cant release: \" + getObjectIdentifier().toString());\n }\n }",
"@Override\n public final Object getValue(final GXDLMSSettings settings,\n final ValueEventArgs e) {\n if (e.getIndex() == 1) {\n return GXCommon.logicalNameToBytes(getLogicalName());\n }\n GXByteBuffer buff = new GXByteBuffer();\n if (e.getIndex() == 2) {\n buff.setUInt8(DataType.ARRAY.getValue());\n GXCommon.setObjectCount(pushObjectList.size(), buff);\n for (Entry<GXDLMSObject, GXDLMSCaptureObject> it : pushObjectList) {\n buff.setUInt8(DataType.STRUCTURE.getValue());\n buff.setUInt8(4);\n GXCommon.setData(buff, DataType.UINT16,\n new Integer(it.getKey().getObjectType().getValue()));\n GXCommon.setData(buff, DataType.OCTET_STRING, GXCommon\n .logicalNameToBytes(it.getKey().getLogicalName()));\n GXCommon.setData(buff, DataType.INT8,\n new Integer(it.getValue().getAttributeIndex()));\n GXCommon.setData(buff, DataType.UINT16,\n new Integer(it.getValue().getDataIndex()));\n }\n return buff.array();\n }\n if (e.getIndex() == 3) {\n buff.setUInt8(DataType.STRUCTURE.getValue());\n buff.setUInt8(3);\n GXCommon.setData(buff, DataType.UINT8, new Integer(\n sendDestinationAndMethod.getService().getValue()));\n if (sendDestinationAndMethod.getDestination() != null) {\n GXCommon.setData(buff, DataType.OCTET_STRING,\n sendDestinationAndMethod.getDestination().getBytes());\n } else {\n GXCommon.setData(buff, DataType.OCTET_STRING, null);\n }\n GXCommon.setData(buff, DataType.UINT8,\n sendDestinationAndMethod.getMessage().getValue());\n return buff.array();\n }\n if (e.getIndex() == 4) {\n buff.setUInt8(DataType.ARRAY.getValue());\n GXCommon.setObjectCount(communicationWindow.size(), buff);\n for (Entry<GXDateTime, GXDateTime> it : communicationWindow) {\n buff.setUInt8(DataType.STRUCTURE.getValue());\n buff.setUInt8(2);\n GXCommon.setData(buff, DataType.OCTET_STRING, it.getKey());\n GXCommon.setData(buff, DataType.OCTET_STRING, it.getValue());\n }\n return buff.array();\n }\n if (e.getIndex() == 5) {\n return new Integer(randomisationStartInterval);\n }\n if (e.getIndex() == 6) {\n return new Integer(numberOfRetries);\n }\n if (e.getIndex() == 7) {\n return new Integer(repetitionDelay);\n }\n e.setError(ErrorCode.READ_WRITE_DENIED);\n return null;\n }",
"private void limpiarCampos() {\n\t\tthis.campoClave.setText(\"\");\n\t\tthis.campoClaveNueva.setText(\"\");\n\t\tthis.campoClaveRepita.setText(\"\");\n\t}",
"public void setFields(entity.APDExposureField[] value);",
"public void enviarValoresCabecera(){\n }",
"public void setVadRecorder(){\n }"
]
| [
"0.5357072",
"0.51985896",
"0.500052",
"0.49860907",
"0.49250054",
"0.4907492",
"0.4906309",
"0.49024907",
"0.48277622",
"0.4816381",
"0.48029187",
"0.47826672",
"0.4744889",
"0.47411874",
"0.4696946",
"0.46955156",
"0.4684164",
"0.46733555",
"0.46722782",
"0.46691605",
"0.46659976",
"0.46581003",
"0.4648202",
"0.46283895",
"0.46057308",
"0.46054327",
"0.46053776",
"0.46028537",
"0.45851898",
"0.45797572",
"0.45779073",
"0.45777914",
"0.45686442",
"0.45611706",
"0.45604378",
"0.4557899",
"0.4536125",
"0.45201746",
"0.45194575",
"0.45124778",
"0.4510167",
"0.45043615",
"0.45042634",
"0.44930014",
"0.44894508",
"0.4485764",
"0.44836897",
"0.4482556",
"0.4479515",
"0.44779837",
"0.4477681",
"0.44729313",
"0.44721577",
"0.44714049",
"0.44690067",
"0.44670257",
"0.4466159",
"0.44657344",
"0.44652927",
"0.44579637",
"0.44532895",
"0.4447306",
"0.4446239",
"0.44437188",
"0.44415328",
"0.44365612",
"0.4436294",
"0.44360152",
"0.44346547",
"0.44273302",
"0.4423714",
"0.44225183",
"0.4419889",
"0.44161668",
"0.4411692",
"0.44070208",
"0.43999022",
"0.43914443",
"0.4388212",
"0.43861267",
"0.43836215",
"0.4380726",
"0.43806732",
"0.43782866",
"0.4376277",
"0.43750548",
"0.43750548",
"0.43729785",
"0.43727812",
"0.4370862",
"0.4369932",
"0.4369281",
"0.4368744",
"0.43661112",
"0.43661112",
"0.43646365",
"0.43631107",
"0.43589935",
"0.4358704",
"0.4350545",
"0.43455258"
]
| 0.0 | -1 |
build event data to packet message | public byte[] buildPacket() throws BeCommunicationEncodeException {
if (apMac == null) {
throw new BeCommunicationEncodeException("ApMac is a necessary field!");
}
try {
byte[] requestData = prepareRequestData();
/**
* AP identifier 's length = 6 + 1 + apSerialNum.length()<br>
* query's length = 6 + 12
*/
int apIdentifierLen = 7 + apMac.length();
int queryLen = 12 + requestData.length;
int bufLength = apIdentifierLen + queryLen;
ByteBuffer buf = ByteBuffer.allocate(bufLength);
// set value
buf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_APIDENTIFIER);
buf.putInt(apIdentifierLen - 6);
buf.put((byte) apMac.length());
buf.put(apMac.getBytes());
buf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_INFORMATIONQUERY);
buf.putInt(6 + requestData.length);
buf.putShort(queryType);
buf.putInt(requestData.length); // data length
buf.put(requestData);
setPacket(buf.array());
return buf.array();
} catch (Exception e) {
throw new BeCommunicationEncodeException(
"BeTeacherViewStudentInfoEvent.buildPacket() catch exception", e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static EventData constructMessage(long sequenceNumber) {\n final HashMap<Symbol, Object> properties = new HashMap<>();\n properties.put(getSymbol(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue()), sequenceNumber);\n properties.put(getSymbol(OFFSET_ANNOTATION_NAME.getValue()), String.valueOf(OFFSET));\n properties.put(getSymbol(PARTITION_KEY_ANNOTATION_NAME.getValue()), PARTITION_KEY);\n properties.put(getSymbol(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue()), Date.from(ENQUEUED_TIME));\n\n final byte[] contents = \"boo\".getBytes(UTF_8);\n final Message message = Proton.message();\n message.setMessageAnnotations(new MessageAnnotations(properties));\n message.setBody(new Data(new Binary(contents)));\n\n return MESSAGE_SERIALIZER.deserialize(message, EventData.class);\n }",
"public String buildMessage(Event event, Object[] params);",
"protected abstract void createPacketData();",
"public final void event(final JSONObject builddata) {\n logger.fine(\"Sending event\");\n\n // Gather data\n JSONObject payload = new JSONObject();\n String hostname = nullSafeGetString(builddata, \"hostname\");\n String number = nullSafeGetString(builddata, \"number\");\n String buildurl = nullSafeGetString(builddata, \"buildurl\");\n String job = nullSafeGetString(builddata, \"job\");\n long timestamp = builddata.getLong(\"timestamp\");\n String message = \"\";\n\n // Setting source_type_name here, to allow modification based on type of event\n payload.put(\"source_type_name\", \"jenkins\");\n\n // Build title\n StringBuilder title = new StringBuilder();\n title.append(job).append(\" build #\").append(number);\n if ( \"SUCCESS\".equals( builddata.get(\"result\") ) ) {\n title.append(\" succeeded\");\n payload.put(\"alert_type\", \"success\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else if ( builddata.get(\"result\") != null ) {\n title.append(\" failed\");\n payload.put(\"alert_type\", \"failure\");\n message = \"%%% \\n [See results for build #\" + number + \"](\" + buildurl + \") \";\n } else {\n title.append(\" started\");\n payload.put(\"alert_type\", \"info\");\n message = \"%%% \\n [Follow build #\" + number + \" progress](\" + buildurl + \") \";\n // Remove source_type_name to keep started events from being rolled up\n payload.remove(\"source_type_name\");\n }\n title.append(\" on \").append(hostname);\n\n // Add duration\n if ( builddata.get(\"duration\") != null ) {\n message = message + durationToString(builddata.getDouble(\"duration\"));\n }\n\n // Close markdown\n message = message + \" \\n %%%\";\n\n // Build payload\n payload.put(\"title\", title.toString());\n payload.put(\"text\", message);\n payload.put(\"date_happened\", timestamp);\n payload.put(\"event_type\", builddata.get(\"event_type\"));\n payload.put(\"host\", hostname);\n payload.put(\"result\", builddata.get(\"result\"));\n payload.put(\"tags\", assembleTags(builddata));\n payload.put(\"aggregation_key\", job); // Used for job name in event rollups\n\n post(payload, this.EVENT);\n }",
"private byte[] buildBytes() {\n byte[] message = new byte[4 + 2 + 2 + 1 + data.getLength()];\n System.arraycopy(id.getBytes(), 0, message, 0, 4);\n System.arraycopy(sq.getBytes(), 0, message, 4, 2);\n System.arraycopy(ack.getBytes(), 0, message, 6, 2);\n message[8] = flag.getBytes();\n System.arraycopy(data.getBytes(), 0, message, 9, data.getBytes().length);\n return message;\n }",
"private static void prepareAdvData() {\n ADV_DATA.add(createDateTimePacket());\n ADV_DATA.add(createDeviceIdPacket());\n ADV_DATA.add(createDeviceSettingPacket());\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutTimePacket(i));\n }\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutDatePacket(i));\n }\n }",
"private Message createMsg(long type,Object event){\r\n Message msg=new Message(0,type,0,\"\",new Object[]{event},\r\n System.currentTimeMillis(),0,0,null,0,0,0);\r\n return msg;\r\n }",
"@Override\n protected void initEventAndData() {\n }",
"private GossipEvent buildEvent(final BaseEvent selfParent, final BaseEvent otherParent) {\n\n final BaseEventHashedData hashedData = new BaseEventHashedData(\n softwareVersion,\n selfId,\n EventUtils.getEventGeneration(selfParent),\n EventUtils.getEventGeneration(otherParent),\n EventUtils.getEventHash(selfParent),\n EventUtils.getEventHash(otherParent),\n EventUtils.getChildTimeCreated(time.now(), selfParent),\n transactionSupplier.getTransactions());\n hasher.digestSync(hashedData);\n\n final BaseEventUnhashedData unhashedData = new BaseEventUnhashedData(\n EventUtils.getCreatorId(otherParent),\n signer.sign(hashedData.getHash().getValue()).getSignatureBytes());\n final GossipEvent gossipEvent = new GossipEvent(hashedData, unhashedData);\n gossipEvent.buildDescriptor();\n return gossipEvent;\n }",
"@Override\n public ByteBuffer buildRequestPacket() {\n\n ByteBuffer sendData = ByteBuffer.allocate(128);\n sendData.putLong(this.connectionId); // connection_id - can't change (64 bits)\n sendData.putInt(getActionNumber()); // action we want to perform - connecting with the server (32 bits)\n sendData.putInt(getTransactionId()); // transaction_id - random int we make (32 bits)\n\n return sendData;\n }",
"public void processPacket(Packet p)\n {\n PacketExtension pe = p.getExtension(\"event\", \"http://jabber.org/protocol/pubsub#event\");\n if(pe != null)\n {\n System.out.println(\"pe: \"+pe.toXML());\n }\n\n }",
"public EventMessage(Event event)\r\n {\r\n //super(\"EventMessage\");\r\n super(TYPE_IDENT, event);\r\n }",
"private FriendEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GroupEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public CommEventReceiver( byte data[] )\n {\n super( data[0] );\n\n int channels = data[1];\n if (channels > 0 && channels <= 4)\n {\n channelData = new ReceiverChannel[channels];\n for ( int i = 0; i < channels; i++ )\n {\n byte segment = data[2 + ( 2 * i )];\n byte value = data[3 + ( 2 * i )];\n\n if (segment < 0 || segment > 4)\n {\n channelData[i] = new ReceiverChannel( false, (byte) 0, (byte) 0 );\n }\n else\n {\n channelData[i] = new ReceiverChannel( true, value, segment );\n }\n }\n }\n }",
"public void dataSent(LLRPDataSentEvent event);",
"@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}",
"@Override\n public void publish(Event<? extends Enum, ?> event) {\n byte[] body = null;\n if (null == event) {\n log.error(\"Captured event is null...\");\n return;\n }\n if (event instanceof DeviceEvent) {\n body = bytesOf(MQUtil.json((DeviceEvent) event));\n } else if (event instanceof TopologyEvent) {\n body = bytesOf(MQUtil.json((TopologyEvent) event));\n } else if (event instanceof LinkEvent) {\n body = bytesOf(MQUtil.json((LinkEvent) event));\n } else {\n log.error(\"Invalid event: '{}'\", event);\n return;\n }\n processAndPublishMessage(body);\n }",
"private void formWriteBegin() {\n\t\tsendData = new byte[4];\n\t\tsendData[0] = 0;\n\t\tsendData[1] = 4;\n\t\tsendData[2] = 0;\n\t\tsendData[3] = 0;\n\t\t\n\t\t// Now that the data has been set up, let's form the packet.\n\t\tsendPacket = new DatagramPacket(sendData, 4, receivePacket.getAddress(),\n\t\t\t\treceivePacket.getPort());\t\n\t}",
"public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }",
"private TradeMsgEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private StringBuilder byteToStringBuilder(byte[] data) {\n\t\tStringBuilder sbLog = new StringBuilder();\n\t\tfor (byte b : data) {\n\t\t\tsbLog.append(String.format(\"%02x\", new Object[] { b }));\n\t\t}\n\t\t//System.out.println(\" data packet : \"+ sbLog);\n\t\treturn sbLog;\n\t}",
"public void pipeMsgEvent ( PipeMsgEvent event ){\r\n\t// Get the message object from the event object\r\n\tMessage msg=null;\r\n\ttry {\r\n\t msg = event.getMessage();\r\n\t if (msg == null)\r\n\t\treturn;\r\n\t} \r\n\tcatch (Exception e) {\r\n\t e.printStackTrace();\r\n\t return;\r\n\t}\r\n\t\r\n\t// Get the String message element by specifying the element tag\r\n\tMessageElement newMessage = msg.getMessageElement(TAG);\r\n\tif (newMessage == null)\t\t\t\r\n\t System.out.println(\"null msg received\");\r\n\telse\r\n\t System.out.println(\"Received message: \" + newMessage);\r\n }",
"protected void buildPacket() throws IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\n\t\t// write packet\n\t\tbaos.write(SPInstr.USER.getByte()); // username\n\t\tbaos.write(username.getBytes());\n\t\tbaos.write(SPInstr.EOM.getByte());\n\t\tbaos.write(SPInstr.PASS.getByte()); // password\n\t\tbaos.write(password.getBytes());\n\t\tbaos.write(SPInstr.EOM.getByte());\n\t\tbaos.write(SPInstr.EOP.getByte()); // no action required since it is sent from the client\n\t\t\n\t\t// save packet\n\t\tpacket = baos.toByteArray();\n\t}",
"private byte[] execHandlerWrite( Message msg ) {\n\t\tbyte[] bytes = (byte[]) msg.obj;\n \tString data = mByteUtility.bytesToHexString( bytes ); \n\t\tlog_d( \"EventWrite \" + data );\n\t\treturn bytes;\n\t}",
"private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }",
"@Override\r\n\tpublic void addEvent(NetworkEvent e) {\n\t\tif (e.getType() == NetworkEvent.SEND && buffer_sz > e.getPDU().size) {\r\n\t\t\tTCPBony kid = (TCPBony) e.getTarget();\r\n\t\t\tTCPMessage m = (TCPMessage) e.getPDU();\r\n\t\t\tFlowId fid = new FlowId(m.src, m.dest, m.getSport(), m.getDport());\r\n\t\t\tif (kid.isElephant()) {\r\n\t\t\t\tdard.addElephantFlow(fid);\r\n\t\t\t} else\r\n\t\t\t\tdard.addMiceFlow(fid);\r\n\t\t\t\r\n\t\t\tint i = connections.indexOf(kid);\r\n\t\t\te.setTarget(this);\r\n\t\t\tsend_buffer.get(i).add(e);\r\n\t\t\tbuffer_sz -= e.getPDU().size;\r\n\t\t} else if (e.getType() == NetworkEvent.RECEIVE) {\r\n\t\t\treceived_buffer.add(e);\r\n\t\t} else {\r\n\t\t\t// System.out.println(this.getName() + \" Drop packet due to buffer overflow: \" + buffer_sz + \r\n\t\t\t//\t\" from \" + ((TCPMessage) e.getPDU()).getSport() + \r\n\t\t\t//\t\" Seq: \" + ((TCPMessage) e.getPDU()).getSeq());\r\n\t\t}\r\n\t}",
"private InvalidEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private static SysexMessage buildDump(byte function, int channel, byte hdrData[], byte inputData[]) {\r\n SysexMessage msg = new SysexMessage();\r\n byte[] msgData = new byte[hdrData.length + inputData.length + 6]; // 5 for header, 1 for\r\n // last F7\r\n \r\n int i = 0;\r\n msgData[i++] = (byte) 0xF0;\r\n msgData[i++] = (byte) 0x42; // Korg ID\r\n msgData[i++] = (byte) (0x30 | channel); // 0x3n Format ID, n = channel\r\n // number\r\n msgData[i++] = (byte) 0x50; // Triton series ID\r\n msgData[i++] = (byte) function;\r\n // Function header\r\n if (hdrData != null) {\r\n for (int j = 0; j < hdrData.length; ++j) {\r\n msgData[i++] = hdrData[j];\r\n }\r\n }\r\n // Data\r\n if (inputData != null) {\r\n for (int j = 0; j < inputData.length; ++j) {\r\n msgData[i++] = inputData[j];\r\n }\r\n }\r\n msgData[i++] = (byte) 0xF7; // end of exclusive\r\n \r\n try {\r\n msg.setMessage(msgData, msgData.length);\r\n }\r\n catch (InvalidMidiDataException e) {\r\n e.printStackTrace();\r\n return null;\r\n }\r\n return msg;\r\n }",
"public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }",
"@Override\n protected void encode(ChannelHandlerContext ctx, FoscamTextByteBufDTO msg, List<Object> out) {\n final ByteBuf buf = FoscamTextByteBufDTOEncoder.allocateBuf(ctx, msg);\n new FoscamTextByteBufDTOEncoder().encode(ctx, msg, buf);\n final DatagramPacket datagramPacket = new DatagramPacket(buf, new InetSocketAddress(BROADCAST_ADDRESS, BROADCAST_PORT));\n out.add(datagramPacket);\n }",
"static int[] createMessage(int[] data){\r\n\t\tint[] message = new int[6 + data.length + 2];\r\n\t\tmessage[0] = 0xF0;\r\n\t\tmessage[1] = 0x41;\r\n\t\tmessage[2] = 0x7F;\r\n\t\tmessage[3] = 0x00;\r\n\t\tmessage[4] = 0x59;\r\n\t\tmessage[5] = 0x12;\r\n\t\tint total = 0;\r\n\t\tfor(int i = 0; i < data.length; i++){\r\n\t\t\ttotal += data[i];\r\n\t\t\tmessage[6 + i] = data[i];\r\n\t\t}\r\n\t\tmessage[message.length - 2] = 128 - (total % 128);\r\n\t\tmessage[message.length - 1] = 0xF7;\r\n\t\treturn message;\r\n\t}",
"private byte[][] buildDataPackets(int nextSeqNum, byte[] rawData) {\n int curSeqNum = nextSeqNum;\n int currentDataLoc = 0;\n byte[][] returnArray;\n int numRawPackets;\n int toCopy;\n\n // Figure out how many packets we'll need total\n numRawPackets = rawData.length / UDPTransportLayer.RAW_DATA_SIZE;\n if ((rawData.length % UDPTransportLayer.RAW_DATA_SIZE) > 0) \n numRawPackets++;\n\n // Build the return array\n returnArray = new byte[numRawPackets][UDPTransportLayer.PACKET_SIZE];\n\n // Now start building packets\n for(int i=0; i<numRawPackets; i++, currentDataLoc += UDPTransportLayer.RAW_DATA_SIZE) {\n\n // Write out message header\n writeByte (returnArray[i], 0, UDPTransportLayer.MESSAGE_TYPE_DATA);\n writeInt (returnArray[i], 1, curSeqNum);\n writeShort(returnArray[i], 5, i);\n writeShort(returnArray[i], 7, numRawPackets);\n writeShort(returnArray[i], 9, rawData.length);\n curSeqNum++;\n\n // Fill the rest of this packet with data\n toCopy = UDPTransportLayer.PACKET_SIZE - 11;\n if (toCopy > (rawData.length - currentDataLoc))\n\ttoCopy = rawData.length - currentDataLoc;\n System.arraycopy(rawData, currentDataLoc, returnArray[i], 11, toCopy);\n }\n\n // Finally, return the array of packets to the caller\n return returnArray;\n }",
"public String toString() {\r\n\treturn \"DataEvent: \"\r\n\t\t+\"source=\"+getSource()\r\n\t\t+\", jobID=\"\r\n\t\t+ vcDataJobID\r\n\t\t+ \", progress=\\\"\"\r\n\t\t+ getProgress();\r\n}",
"public void process(EventData event) throws Exception {\n\t\tevent.getDoc().put(\"dimm\", memory());\n\t\tevent.getDoc().put(\"battery\", batteries());\n\t\tevent.getDoc().put(\"chassis\", chassis());\n\t\tevent.getDoc().put(\"pwrsupplies\", pwrsupplies());\n\t\tevent.getDoc().put(\"storage\", storage());\n\t\tevent.getDoc().put(\"fans\", fans());\n\n\t}",
"protected Serializable eventToMessageObject(CayenneEvent event) throws Exception {\n return event;\n }",
"String evel_json_encode_event()\r\n\t {\r\n\t\tEVEL_ENTER();\r\n\t\t\r\n\t\tassert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t \r\n\t JsonObject obj = Json.createObjectBuilder()\r\n\t \t .add(\"event\", Json.createObjectBuilder()\r\n\t\t \t .add( \"commonEventHeader\",eventHeaderObject() )\r\n\t\t \t .add( \"thresholdCrossingAlert\",evelThresholdCrossingObject() )\r\n\t\t \t ).build();\r\n\r\n\t EVEL_EXIT();\r\n\t \r\n\t return obj.toString();\r\n\r\n\t }",
"private Event convertToEvent(String message) {\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONObject jsonObject;\n\t\ttry {\n\t\t\tjsonObject = (JSONObject) parser.parse(message);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new RuntimeException(\"ParseException caught trying to parse message text into JSON object\");\n\t\t}\n\t\tJSONArray events = (JSONArray) jsonObject.get(\"events\");\n\t\tList<EventAttribute> eventAttributes = new ArrayList<>();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tIterator<JSONObject> iterator = events.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tJSONObject jsonT = (JSONObject) iterator.next();\n\t\t\tJSONObject jsonEventAttribute = (JSONObject) jsonT.get(\"attributes\");\n\t\t\tString accountNum = (String) jsonEventAttribute.get(\"Account Number\");\n\t\t\tString txAmount = (String) jsonEventAttribute.get(\"Transaction Amount\");\n\t\t\tString cardMemberName = (String) jsonEventAttribute.get(\"Name\");\n\t\t\tString product = (String) jsonEventAttribute.get(\"Product\");\n\t\t\tEventAttribute eventAttribute = new EventAttribute(accountNum, txAmount, cardMemberName, product);\n\t\t\teventAttributes.add(eventAttribute);\n\t\t}\n\n\t\treturn new Event(eventAttributes);\n\t}",
"@Override\n\tpublic void onNotify(EventData data) {\n\t\tEchoResponseEventData echoData = (EchoResponseEventData) data;\n\t\tSocket connection = echoData.getPacket().getConnection();\n\n\t\ttry {\n\t\t\tDataOutputStream dos = new DataOutputStream(\n\t\t\t\t\tconnection.getOutputStream());\n\t\t\tdos.writeUTF(echoData.getPacket().getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private static byte[] createPacket(byte[] data, int destinationPort) {\n\n byte[] send = new byte[28];\n\n send[0] = (byte) ((4 << 4) + 5); // Version 4 and 5 words\n send[1] = 0; // TOS (Don't implement)\n send[2] = 0; // Total length\n send[3] = 22; // Total length\n send[4] = 0; // Identification (Don't implement)\n send[5] = 0; // Identification (Don't implement)\n send[6] = (byte) 0b01000000; // Flags and first part of Fragment offset\n send[7] = (byte) 0b00000000; // Fragment offset\n send[8] = 50; // TTL = 50\n send[9] = 0x11; // Protocol (UDP = 17)\n send[10] = 0; // CHECKSUM\n send[11] = 0; // CHECKSUM\n send[12] = (byte) 127; // 127.0.0.1 (source address)\n send[13] = (byte) 0; // 127.0.0.1 (source address)\n send[14] = (byte) 0; // 127.0.0.1 (source address)\n send[15] = (byte) 1; // 127.0.0.1 (source address)\n send[16] = (byte) 0x2d; // (destination address)\n send[17] = (byte) 0x32; // (destination address)\n send[18] = (byte) 0x5; // (destination address)\n send[19] = (byte) 0xee; // (destination address)\n\n short length = (short) (28 + data.length); // Quackulate the total length\n byte right = (byte) (length & 0xff);\n byte left = (byte) ((length >> 8) & 0xff);\n send[2] = left;\n send[3] = right;\n\n short checksum = calculateChecksum(send); // Quackulate the checksum\n\n byte second = (byte) (checksum & 0xff);\n byte first = (byte) ((checksum >> 8) & 0xff);\n send[10] = first;\n send[11] = second;\n\n /*\n * UDP Header\n * */\n short udpLen = (short) (8 + data.length);\n byte rightLen = (byte) (udpLen & 0xff);\n byte leftLen = (byte) ((udpLen >> 8) & 0xff);\n\n send[20] = (byte) 12; // Source Port\n send[21] = (byte) 34; // Source Port\n send[22] = (byte) ((destinationPort >> 8) & 0xff); // Destination Port\n send[23] = (byte) (destinationPort & 0xff); // Destination Port\n send[24] = leftLen; // Length\n send[25] = rightLen; // Length\n send[26] = 0; // Checksum\n send[27] = 0; // Checksum\n\n /*\n * pseudoheader + actual header + data to calculate checksum\n * */\n byte[] checksumArray = new byte[12 + 8]; // 12 = pseudoheader, 8 = UDP Header\n checksumArray[0] = send[12]; // Source ip address\n checksumArray[1] = send[13]; // Source ip address\n checksumArray[2] = send[14]; // Source ip address\n checksumArray[3] = send[15]; // Source ip address\n checksumArray[4] = send[16]; // Destination ip address\n checksumArray[5] = send[17]; // Destination ip address\n checksumArray[6] = send[18]; // Destination ip address\n checksumArray[7] = send[19]; // Destination ip address\n checksumArray[8] = 0; // Zeros for days\n checksumArray[9] = send[9]; // Protocol\n checksumArray[10] = send[24]; // Udp length\n checksumArray[11] = send[25]; // Udp length\n // end pseudoheader\n checksumArray[12] = send[20]; // Source Port\n checksumArray[13] = send[21]; // Source Port\n checksumArray[14] = send[22]; // Destination Port\n checksumArray[15] = send[23]; // Destination Port\n checksumArray[16] = send[24]; // Length\n checksumArray[17] = send[25]; // Length\n checksumArray[18] = send[26]; // Checksum\n checksumArray[19] = send[27]; // Checksum\n // end actual header\n checksumArray = concatenateByteArrays(checksumArray, data); // Append data\n\n short udpChecksum = calculateChecksum(checksumArray);\n byte rightCheck = (byte) (udpChecksum & 0xff);\n byte leftCheck = (byte) ((udpChecksum >> 8) & 0xff);\n\n send[26] = leftCheck; // Save checksum\n send[27] = rightCheck; // Save checksum\n\n send = concatenateByteArrays(send, data);\n\n return send;\n }",
"@Override\r\n public void onNewDatagram(SimpleAsciiProtocol.Datagram datagram) {\n }",
"public byte[] getNetworkPacket() {\n /*\n The packet layout will be:\n byte(datatype)|int(length of name)|byte[](name)|int(length of value)|byte[](value)|...\n */\n byte[] data = new byte[2];\n int currentPosition = 0;\n \n if(STRINGS.size() > 0) {\n Enumeration enumer = STRINGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x73;\n currentPosition++;\n\n SimpleMessageObjectStringItem item = (SimpleMessageObjectStringItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue().getBytes();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(INTS.size() > 0) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x69;\n currentPosition++;\n\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(LONGS.size() > 0) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x6C;\n currentPosition++;\n\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(DOUBLES.size() > 0) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x64;\n currentPosition++;\n\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(FLOATS.size() > 0) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x66;\n currentPosition++;\n\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(CHARS.size() > 0) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x63;\n currentPosition++;\n\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(BYTES.size() > 0) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x62;\n currentPosition++;\n\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n\n return data;\n }",
"@Override\n\tprotected void encode(ChannelHandlerContext ctx, Envelope env, ByteBuf out) throws Exception {\n\t\t// (1) header (48 bytes)\n\t\t// --------------------------------------------------------------------\n\t\tout.writeInt(MAGIC_NUMBER); // 4 bytes\n\n\t\tif (out.getInt(out.writerIndex()-4) != MAGIC_NUMBER) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\n\t\tout.writeInt(env.getSequenceNumber()); // 4 bytes\n\t\tenv.getJobID().writeTo(out); // 16 bytes\n\t\tenv.getSource().writeTo(out); // 16 bytes\n\t\tout.writeInt(env.getEventsSerialized() != null ? env.getEventsSerialized().remaining() : 0); // 4 bytes\n\t\tout.writeInt(env.getBuffer() != null ? env.getBuffer().size() : 0); // 4 bytes\n\t\t// --------------------------------------------------------------------\n\t\t// (2) events (var length)\n\t\t// --------------------------------------------------------------------\n\t\tif (env.getEventsSerialized() != null) {\n\t\t\tout.writeBytes(env.getEventsSerialized());\n\t\t}\n\n\t\t// --------------------------------------------------------------------\n\t\t// (3) buffer (var length)\n\t\t// --------------------------------------------------------------------\n\t\tif (env.getBuffer() != null) {\n\t\t\tBuffer buffer = env.getBuffer();\n\t\t\tout.writeBytes(buffer.getMemorySegment().wrap(0, buffer.size()));\n\n\t\t\t// Recycle the buffer from OUR buffer pool after everything has been\n\t\t\t// copied to Nettys buffer space.\n\t\t\tbuffer.recycleBuffer();\n\t\t}\n\t}",
"private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public byte[] GetPayload_Generic(int cmd, String [] data){\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n if (data.length == 0) {\n payload.add((byte)0);\n } else {\n int cc = 0;\n for(int i =0; i != data.length; i++){\n String item = data[i];\n for(int j=0; j!= item.length(); j++){\n char c = item.charAt(j);\n byte b = (byte)c;\n payload.add(b);\n }\n if (cc < data.length - 1) {\n payload.add((byte)DELIMITER);\n }\n cc = cc+ 1;\n }\n payload.add((byte)0);\n }\n\n return makeTransportPacket_Generic(payload);\n }",
"@Override\n public void payload(byte[] data) {\n \tmLastMessage.append(new String(data));\n Log.d(TAG, \"Payload received: \" + data);\n }",
"private String getPacketData(){\n\t\tString str = \"\";\n\t\tfor(int i=0;i<lenth_get/5;i++){\n\t\t\tstr = str + originalUPLMN[i];\n\t\t}\n\t\tif(DBUG){\n\t\t\tif(DEBUG) Log.d(LOG_TAG, \"getPacketData---str=\"+str);\n\t\t}\n\t\treturn str;\n\t}",
"public byte [] GetPayload_Generic(byte cmd, byte [] data) {\n // Construct payload as series of delimited stringsƒsƒs\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n for (int i =0; i != data.length; i++)\n payload.add(data[i]);\n return makeTransportPacket_Generic(payload);\n }",
"private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}",
"protected void createLogEvent(String data) {\n\t\t// if we have no listeners, do nothing...\n\t\tif (listeners != null && !listeners.isEmpty()) {\n\t\t\t// create the event object to send\n\t\t\tLogEvent event = \n\t\t\t\tnew LogEvent( this, data );\n\n\t\t\t// make a copy of the listener list in case\n\t\t\t// anyone adds/removes listeners\n\t\t\tVector targets;\n\t\t\tsynchronized (this) {\n\t\t\t\ttargets = (Vector) listeners.clone();\n\t\t\t}\n\n\t\t\t// walk through the listener list and\n\t\t\t// call the sunMoved method in each\n\t\t\tEnumeration e = targets.elements();\n\t\t\twhile (e.hasMoreElements()) {\n\t\t\t\tLogListener l = (LogListener) e.nextElement();\n\t\t\t\tl.onLogEvent(event);\n\t\t\t}\n\t\t}\n\t}",
"public static byte[] serialize(Packet data) throws InvalidParameterException, UnsupportedEncodingException {\n byte[] emitter = data.getEmitter().getBytes(ENCODING);\n byte[] text = data.getText().getBytes(ENCODING);\n\n if (emitter.length > Byte.MAX_VALUE) {\n throw new InvalidParameterException(\"Emitter length exceeded\");\n }\n if (text.length > Short.MAX_VALUE) {\n throw new InvalidParameterException(\"Text length exceeded\");\n }\n\n int size = MIN_SIZE + emitter.length + text.length;\n\n ByteBuffer buffer = ByteBuffer.allocate(size)\n .putInt(size)\n .put(data.getType().code())\n .putShort(data.getId())\n .putLong(data.getTimestamp())\n .put((byte) emitter.length)\n .put(emitter)\n .putShort((short) text.length)\n .put(text);\n\n return buffer.array();\n }",
"private void sendEventToServer() throws UnknownHostException, IOException {\n \t\t\n \t\tSocket socket = null; \n \t\t\n \t\tsocket = new Socket(Constants.ServerIp, Constants.Port);\n \t\t\n \t\tObjectOutputStream serializer = null;\n \t\t\n \t\tserializer = new ObjectOutputStream(socket.getOutputStream());\n \t\t//TODO: Send a message to server for new Event\n \t\t\n \t\tMessageType t = MessageType.newPubEventMessage;\n \t\tserializer.writeObject(t);\n \t\tserializer.writeObject(event);\n \t\tserializer.flush();\n \t\t//TODO: Send the event\n \t\t//TODO: Send to Pending Screen\n \t}",
"public OctopusCollectedMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }",
"EventChannel create();",
"public MAVLinkPacket pack(){\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION;\n \n packet.payload.putUnsignedInt(time_boot_ms);\n \n packet.payload.putUnsignedInt(firmware_version);\n \n packet.payload.putFloat(tilt_max);\n \n packet.payload.putFloat(tilt_min);\n \n packet.payload.putFloat(tilt_rate_max);\n \n packet.payload.putFloat(pan_max);\n \n packet.payload.putFloat(pan_min);\n \n packet.payload.putFloat(pan_rate_max);\n \n packet.payload.putUnsignedShort(cap_flags);\n \n \n for (int i = 0; i < vendor_name.length; i++) {\n packet.payload.putUnsignedByte(vendor_name[i]);\n }\n \n \n \n for (int i = 0; i < model_name.length; i++) {\n packet.payload.putUnsignedByte(model_name[i]);\n }\n \n \n return packet;\n }",
"public void writePacketData(PacketBuffer buf) throws IOException {\n buf.writeVarInt(this.entityId);\n buf.writeByte(this.effectId);\n buf.writeByte(this.amplifier);\n buf.writeVarInt(this.duration);\n buf.writeByte(this.flags);\n }",
"private DatagramPacket injectSourceAndDestinationData(DatagramPacket packet)\n\t{\n\t\t\n\t\tbyte[] ipxBuffer = Arrays.copyOf(packet.getData(), packet.getLength());\n\t\tint bufferLength = ipxBuffer.length + 9;\n\t\t\n\t\tbyte[] wrappedBuffer = Arrays.copyOf(ipxBuffer, bufferLength);\n\t\twrappedBuffer[bufferLength - 9] = 0x01;\n\t\twrappedBuffer[bufferLength - 8] = (byte) (packet.getAddress().getAddress()[0]);\n\t\twrappedBuffer[bufferLength - 7] = (byte) (packet.getAddress().getAddress()[1]);\n\t\twrappedBuffer[bufferLength - 6] = (byte) (packet.getAddress().getAddress()[2]);\n\t\twrappedBuffer[bufferLength - 5] = (byte) (packet.getAddress().getAddress()[3]);\n\t\twrappedBuffer[bufferLength - 4] = (byte) (packet.getPort() >> 8);\n\t\twrappedBuffer[bufferLength - 3] = (byte) packet.getPort();\n\t\twrappedBuffer[bufferLength - 2] = (byte) (ipxSocket.getLocalPort() >> 8);\n\t\twrappedBuffer[bufferLength - 1] = (byte) ipxSocket.getLocalPort();\n\t\t\n\t\treturn new DatagramPacket(wrappedBuffer, bufferLength);\n\t}",
"public void emit(String event, JsonObject jsonObject) {\n//\t\tif (ev == 'newListener') {\n//\t\t\treturn this.$emit.apply(this, arguments);\n//\t\t}\n\n\t\tJsonObject packet = new JsonObject();\n\t\tpacket.putString(\"type\", \"event\");\n\t\tpacket.putString(\"name\", event);\n\n//\t\tif ('function' == typeof lastArg) {\n//\t\t\tpacket.id = ++this.ackPackets;\n//\t\t\tpacket.ack = lastArg.length ? 'data' : true;\n//\t\t\tthis.acks[packet.id] = lastArg;\n//\t\t\targs = args.slice(0, args.length - 1);\n//\t\t}\n\t\tif(jsonObject != null) {\n\t\t\tJsonArray args = new JsonArray();\n\t\t\targs.addObject(jsonObject);\n\t\t\tpacket.putArray(\"args\", args);\n\t\t}\n\t\tthis.packet(packet);\n\t}",
"byte[] writeEvent(ProcessInstance processInstance, Object value) throws IOException;",
"public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }",
"public OctopusCollectedMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }",
"public interface FlowEventDumpData {\n String getTaskId();\n\n void setTaskId(String taskId);\n\n String getFlowId();\n\n void setFlowId(String flowId);\n\n String getType();\n\n void setType(String type);\n\n long getBandwidth();\n\n void setBandwidth(long bandwidth);\n\n boolean isIgnoreBandwidth();\n\n void setIgnoreBandwidth(boolean ignoreBandwidth);\n\n FlowSegmentCookie getForwardCookie();\n\n void setForwardCookie(FlowSegmentCookie forwardCookie);\n\n FlowSegmentCookie getReverseCookie();\n\n void setReverseCookie(FlowSegmentCookie reverseCookie);\n\n SwitchId getSourceSwitch();\n\n void setSourceSwitch(SwitchId sourceSwitch);\n\n SwitchId getDestinationSwitch();\n\n void setDestinationSwitch(SwitchId destinationSwitch);\n\n int getSourcePort();\n\n void setSourcePort(int sourcePort);\n\n int getDestinationPort();\n\n void setDestinationPort(int destinationPort);\n\n int getSourceVlan();\n\n void setSourceVlan(int sourceVlan);\n\n int getDestinationVlan();\n\n void setDestinationVlan(int destinationVlan);\n\n Integer getSourceInnerVlan();\n\n void setSourceInnerVlan(Integer sourceInnerVlan);\n\n Integer getDestinationInnerVlan();\n\n void setDestinationInnerVlan(Integer destinationInnerVlan);\n\n MeterId getForwardMeterId();\n\n void setForwardMeterId(MeterId forwardMeterId);\n\n MeterId getReverseMeterId();\n\n void setReverseMeterId(MeterId reverseMeterId);\n\n String getDiverseGroupId();\n\n void setDiverseGroupId(String diverseGroupId);\n\n String getAffinityGroupId();\n\n void setAffinityGroupId(String affinityGroupId);\n\n String getForwardPath();\n\n void setForwardPath(String forwardPath);\n\n String getReversePath();\n\n void setReversePath(String reversePath);\n\n FlowPathStatus getForwardStatus();\n\n void setForwardStatus(FlowPathStatus forwardStatus);\n\n FlowPathStatus getReverseStatus();\n\n void setReverseStatus(FlowPathStatus reverseStatus);\n\n Boolean isAllocateProtectedPath();\n\n void setAllocateProtectedPath(Boolean allocateProtectedPath);\n\n Boolean isPinned();\n\n void setPinned(Boolean pinned);\n\n Boolean isPeriodicPings();\n\n void setPeriodicPings(Boolean periodicPings);\n\n FlowEncapsulationType getEncapsulationType();\n\n void setEncapsulationType(FlowEncapsulationType encapsulationType);\n\n PathComputationStrategy getPathComputationStrategy();\n\n void setPathComputationStrategy(PathComputationStrategy pathComputationStrategy);\n\n Long getMaxLatency();\n\n void setMaxLatency(Long maxLatency);\n\n Long getMaxLatencyTier2();\n\n void setMaxLatencyTier2(Long maxLatencyTier2);\n\n Integer getPriority();\n\n void setPriority(Integer priority);\n\n List<MirrorPointStatus> getMirrorPointStatuses();\n\n void setMirrorPointStatuses(List<MirrorPointStatus> mirrorPointStatuses);\n\n boolean isStrictBandwidth();\n\n void setStrictBandwidth(boolean ignoreBandwidth);\n\n SwitchId getLoopSwitchId();\n\n void setLoopSwitchId(SwitchId switchId);\n\n }",
"@Override\n\t\tpublic void fromBytes(ByteBuf buf)\n\t\t{\n\t\t\tthis.eventID = buf.readInt();\n\t\t}",
"public void handlePublishedSoxEvent(SoxEvent e) {\n\t\ttry{\n\n\t\toutBuffer.write(\":::::Received Data:::::\" + \"\\n\");\n\t\toutBuffer.write(\"Message from: \"+e.getOriginServer());\n\t\tList<TransducerValue> values = e.getTransducerValues();\n\t\tString to_python_arg = \"\";\n\t\tPattern pat;\n\t\tMatcher mat;\n\t\tString id_arg, value_arg, timing_arg;\n\t\tid_arg=\"\";\n\t\tvalue_arg=\"\";\n\t\toutBuffer.write(\"\\n\" +\":::::Node ID:::::\" + e.getNodeID() + \"\\n\");\n\t\tString group_id = e.getNodeID();\n\t\tfor (TransducerValue value : values) {\n\t\t\toutBuffer.write(\"TransducerValue[id:\" + value.getId()\n\t\t\t\t\t+ \", rawValue:\" + value.getRawValue() + \", typedValue:\"\n\t\t\t\t\t+ value.getTypedValue() + \", timestamp:\"\n\t\t\t\t\t+ value.getTimestamp() + \"]\" + \"\\n\");\n\t\t\t\n\t\t\tif (value.getId().length() > 255 ){ id_arg = value.getId().substring(0,255); } else { id_arg = value.getId(); }\n\t\t\tif (value.getRawValue().length() > 255 ){ value_arg = value.getRawValue().substring(0,255); } else { value_arg = value.getRawValue(); }\n\n\t\t\tid_arg = dummy_escape(id_arg);\n\t\t\tvalue_arg = dummy_escape(value_arg);\n\t\t\ttiming_arg = value.getTimestamp();\n\t\t\tto_python_arg = \"'group_id\" + group_id + \" item_id=\" + id_arg + \" raw_value=\" + value_arg + \" timing=\" + timing_arg + \"'\";\n\n\t\t\tp = new ProcessBuilder(\"/var/local/jikkyolizer/bin/python3\", \"/home/jikkyolizer_input/jikkyolizer_input2.py\", to_python_arg, \"1>>/home/jikkyolizer_input/log/processing_input.log\").start();\n\t\t\tret = p.waitFor();\n\n\n\n\t\toutBuffer.write(\"/var/local/jikkyolizer/bin/python3 /home/jikkyolizer_input/jikkyolizer_input.py \" + to_python_arg + \" 1>>/home/jikkyolizer_input/log/processing_input.log\");\n\t\t}\n\t\toutBuffer.flush();\n\t\t} catch(IOException e2){\n\t\t\te2.printStackTrace();\n\t\t} catch(InterruptedException ie){\n\t\t}\n\t}",
"public String toString() {\n String s = \"Message <RxTxMonitoringMsg> \\n\";\n try {\n s += \" [infos.type=0x\"+Long.toHexString(get_infos_type())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.log_src=0x\"+Long.toHexString(get_infos_log_src())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.timestamp=0x\"+Long.toHexString(get_infos_timestamp())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.seq_num=0x\"+Long.toHexString(get_infos_seq_num())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.size_data=0x\"+Long.toHexString(get_infos_size_data())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.valid_noise_samples=0x\"+Long.toHexString(get_infos_valid_noise_samples())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.noise=\";\n for (int i = 0; i < 3; i++) {\n s += \"0x\"+Long.toHexString(getElement_infos_noise(i) & 0xffff)+\" \";\n }\n s += \"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [infos.metadata=\";\n for (int i = 0; i < 2; i++) {\n s += \"0x\"+Long.toHexString(getElement_infos_metadata(i) & 0xff)+\" \";\n }\n s += \"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n try {\n s += \" [data=\";\n for (int i = 0; i < 60; i++) {\n s += \"0x\"+Long.toHexString(getElement_data(i) & 0xff)+\" \";\n }\n s += \"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n return s;\n }",
"private void createEvents() {\n\t}",
"private void insertEventRecord(Device device, \n long fixtime, int statusCode, Geozone geozone,\n GeoPoint geoPoint, \n long gpioInput,\n double speedKPH, double heading, \n double altitude,\n double odomKM)\n {\n\n /* create event */\n EventData evdb = createEventRecord(device, fixtime, statusCode, geoPoint, gpioInput, speedKPH, heading, altitude, odomKM);\n\n /* insert event */\n // this will display an error if it was unable to store the event\n Print.logInfo(\"Event : [0x\" + StringTools.toHexString(statusCode,16) + \"] \" + StatusCodes.GetDescription(statusCode,null));\n if (device != null) {\n device.insertEventData(evdb); \n }\n this.eventTotalCount++;\n\n }",
"private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}",
"SyslogEvent build() {\n\n miruLogEvent = parse(rawMessage, address.toString());\n return this;\n }",
"private static String formatSimple(ChannelHandlerContext ctx, String eventName, Object msg) {\n String chStr = getChStr(ctx);\n String msgStr = String.valueOf(msg);\n StringBuilder buf = new StringBuilder(chStr.length() + 1 + eventName.length() + 2 + msgStr.length());\n return buf.append(chStr).append(' ').append(eventName).append(\": \").append(msgStr).toString();\n }",
"@Override\n\tpublic void handleEvent(EnOceanMessage data) {\n\t}",
"@Override\n\t\t\t\tpublic void processPacket(Packet packet) {\n\t\t\t\t\t\n\t\t\t\t\tMessage message = (Message) packet;\n\t\t\t\t\tSystem.out.println(message.getFrom()+\"---\"+message.getBody());\n\t\t\t\t\tChatMsgEntity entity = new ChatMsgEntity();\n\t\t\t\t\tentity.setDate(getDate());\n\t\t\t\t\tString[] names = message.getFrom().split(\"/\");\n\t\t\t\t\tif (!names[1].equals(av.getUserData().phone)) {\n\t\t\t\t\t\tentity.setName(names[1]);\n\t\t\t\t\t\tentity.setMsgType(true);\n\t\t\t\t\t\tentity.setText(message.getBody());\n\t\t\t\t\t\tmDataArrays.add(entity);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tmListView.setSelection(mListView.getBottom());\n\t\t\t\t\t\tif(!names[1].equals(\"admin\")){\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}",
"public void run() {\n\t\tPacket p = new Packet(SOURCE_ID, DESTINATION_ID, -1);\r\n\t\tp.type = PacketType.DATA;\r\n\t\tp.nextId = SOURCE_ID;\r\n\t\tp.setRoutingName(this.getClass().getSimpleName());\r\n\t\t\r\n\t\tinit();\r\n\t\t// First event: source node receive pkt from upper layer\r\n\t\tEvent first_e = new Event(EventType.PACKETRECEIVE, SOURCE_ID, p, currentTime, -1);\r\n\t\taddEvent(first_e);\r\n\t\t\r\n\t\twhile(state == State.NOTFINISHED)\r\n\t\t{\t\r\n\t\t\tif(eventList.size() > MAX_EVENT_SIZE)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"!!! ERROR: Scheduler too long !!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif(eventId >= eventList.size())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"!!! EventListener Empty !!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tSystem.out.println(\"*****Lista eventi da eseguire *****\");\r\n\t\t\tfor(int i = eventId; i < eventList.size(); i++)\r\n\t\t\t\tSystem.out.println(\"Evento \"+i+\" - \"+eventList.get(i));\r\n\t\t\tSystem.out.println(\"***********\");\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t//System.out.println(\"event list size = \" + eventList.size());\r\n\t\t\te = eventList.get(eventId);\r\n\t\t\teventId++;\r\n\t\t\t\r\n\t\t\t// Node and time in which event happens\r\n\t\t\tcurrentNode = topo.get(e.nodeId);\r\n\t\t\tcurrentTime = e.time;\r\n\t\t\t\r\n\t\t\t// -------- PACKET IS BEING RECEIVED --------------------------------------------\r\n\t\t\tif(e.type == EventType.PACKETRECEIVE)\r\n\t\t\t{\t\t\t\r\n\t\t\t\tp = e.pkt;\r\n\t\t\t\tint nextId = p.nextId;\r\n\t\t\t\tif(!p.broad && currentNode.id != nextId) {\r\n\t\t\t\t\tSystem.out.println(\"SCHEDULER ERROR: current node is different than the node that received the packet.\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check nodes connectivity\r\n\t\t\t\tif(p.getFromId() > -1 && topo.get(p.getFromId()).distance(topo.get(nextId)) > topo.getRange())\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Connection bewteen nodes does not exists.\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treceive(p, topo.get(p.nextId));\r\n\t\t\t\t\r\n\t\t\t\t// DESTINATION REACHED - STOP\r\n\t\t\t\tif(p.type == PacketType.DATA && nextId == DESTINATION_ID) {\r\n\t\t\t\t\tstate = State.SUCCESS;\r\n\t\t\t\t\t//System.out.println(\"=== Packet delivered. Simulation STOP ===\");\r\n\t\t\t\t\thops = p.getHops();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t//packetSizes.add(calculatePacketSize());\r\n\t\t\t\t//trace.forward(topo.get(c_id), topo.get(nextNodeId), hops, calculatePacketSize(), state);\r\n\t\t\t\t\t\r\n\t\t\t\t// EXTRACT PACKET FROM EVENT\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t\t// -------- OTHER EVENT TYPES ----------------------------------------\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//TODO\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public OctopusCollectedMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }",
"void buildNewRcvdMsg(UDPAddress sender, UDPDataPacket[] newStream) {\n byte[] rawData = new byte[newStream[0].totBytes];\n\n // First copy all the raw data into a byte stream\n for(int i=0, j=0, k=newStream[0].totBytes; \n\ti < newStream.length;\n\ti++, j += UDPTransportLayer.RAW_DATA_SIZE, k -= UDPTransportLayer.RAW_DATA_SIZE)\n System.arraycopy(newStream[i].rawData, 0, rawData, j, Math.min(k, UDPTransportLayer.RAW_DATA_SIZE));\n\n // Now build a new message and deliver it to the client for this\n // connection.\n // PRAGMA [SEND_RCV_DEBUG] {\n // PRAGMA [SEND_RCV_DEBUG] String range=\"[ \";\n // PRAGMA [SEND_RCV_DEBUG] for(int foo=0; foo<newStream.length; foo++)\n // PRAGMA [SEND_RCV_DEBUG] range=range + newStream[foo].seqNum + \" \";\n // PRAGMA [SEND_RCV_DEBUG] range=range+\"]\";\n // PRAGMA [SEND_RCV_DEBUG] Log.println(FoundryStart.sysLog, \"<UDPInstance.buildNewRcvdMsg> Delivering message with sender: \" + sender + \" receiver: \" + connectionAddr+ \" and packet range: \"+range);\n // PRAGMA [SEND_RCV_DEBUG] }\n\n //scheduler.scheduleThread(new Thread(new UDPDeliverThread(this, recipient, new TransportMessage(sender, connectionAddr, rawData))));\n\n // PRAGMA [SEND_RCV_DEBUG] Log.println(FoundryStart.sysLog, \"<UDPInstance.buildNewRcvdMsg> Delivery thread started, returning\");\n\n }",
"@Test\n public void canCreateWithPayload() {\n // Act\n final EventData eventData = new EventData(PAYLOAD_BYTES);\n\n // Assert\n Assertions.assertNotNull(eventData.getBody());\n Assertions.assertEquals(PAYLOAD, new String(eventData.getBody(), UTF_8));\n }",
"private void pushMessageSendingEvent(MessagePacket mesgPacket, Agent ag) \n throws InterruptedException {\n\n\tLong key = new Long(numGen.alloc());\n\tLong keyDep = new Long(numGen.alloc());\n\tLong keyArr = new Long(numGen.alloc());\n MessageSendingEvent mse;\n\tAgentMovedEvent dep, arr;\n\tVertex vertexTo, vertexFrom;\n\n\tvertexFrom = graph.vertex(mesgPacket.sender());\n\tvertexTo = graph.vertex(mesgPacket.receiver());\n\n mse = new MessageSendingEvent(key,\n mesgPacket.message(),\n mesgPacket.sender(), \n mesgPacket.receiver());\n\n\n\tint nbr = removeAgentFromVertex(vertexFrom, ag);\n\t\n\tdep = new AgentMovedEvent(keyDep,\n\t\t\t\t mesgPacket.sender(),\n\t\t\t\t new Integer(nbr));\n\n\n\tevtQ.put(dep);\n\tmovingMonitor.waitForAnswer(keyDep);\n\n\tevtQ.put(mse);\n\tmovingMonitor.waitForAnswer(key);\n\n\n\tnbr = addAgentToVertex(vertexTo, ag);\n\n\tarr = new AgentMovedEvent(keyArr,\n\t\t\t\t mesgPacket.receiver(),\n\t\t\t\t new Integer(nbr));\n\t\n\tevtQ.put(arr);\n\tmovingMonitor.waitForAnswer(keyArr);\n }",
"public byte [] GetPayload(byte cmd, byte [] data) {\n // Construct payload as series of delimited stringsƒsƒs\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n for (int i =0; i != data.length; i++)\n payload.add(data[i]);\n return makeTransportPacket(payload);\n }",
"FJPacket( AutoBuffer ab, int ctrl ) { _ab = ab; _ctrl = ctrl; }",
"public interface BAPushDataEventHandler {\n\tpublic void publishedData(BAEvent event);\n}",
"@Override\n public void onData(SocketIOClient client, Message data, AckRequest ackRequest) {\n data = new Message(\"hello i'm server\");\n //yuyuenamespace.getBroadcastOperations().sendEvent(\"message\", data);\n }",
"public static SimpleMessageObject createMessageObject(byte[] data) {\n SimpleMessageObject retVal = new SimpleMessageObject();\n \n // data is of the form:\n // byte(data type)|int(length of name)|name|int(length of value)|value\n boolean keepGoing = true;\n int currentPointer = 0;\n while(keepGoing) {\n int type = data[currentPointer];\n int bytesToRead = 0;\n String name;\n currentPointer++;\n switch(type) {\n //String\n case 0x73:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n String stringValue = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addString(name, stringValue);\n break;\n \n //int\n case 0x69:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n int intValue = DataConversions.getInt(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addInt(name, intValue); \n break;\n \n //long\n case 0x6c:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n long longValue = DataConversions.getLong(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addLong(name, longValue);\n break;\n \n //double\n case 0x64:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n double doubleValue = DataConversions.getDouble(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addDouble(name, doubleValue); \n break;\n \n //float\n case 0x66:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n float floatValue = DataConversions.getFloat(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addFloat(name, floatValue); \n break;\n \n //char\n case 0x63:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n char charValue = DataConversions.getChar(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addChar(name, charValue);\n break;\n \n //byte array\n case 0x62:\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n name = DataConversions.getString(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n bytesToRead = DataConversions.getInt(data, currentPointer, 4);\n currentPointer += 4;\n byte[] byteValue = DataConversions.getByteArray(data, currentPointer, bytesToRead);\n currentPointer += bytesToRead;\n retVal.addByteArray(name, byteValue);\n break;\n }\n \n if(currentPointer == data.length) {\n keepGoing = false;\n }\n }\n \n return retVal;\n }",
"@Nullable\n private Packet buildPacketForGet(@NonNull Event event) {\n if (event.getEncodedQuery().isEmpty()) return null;\n return new Packet(mApiUrl + event);\n }",
"private Mono<MatchEventInfo> buildMatchEventInfo(final MatchEvent event) {\n if (event.getPlayerId() == null) {\n // This is a START_MATCH event\n return Mono.just(new MatchEventInfo(event.getType(), null, event.getTimestamp()));\n }\n return this.playerInfoRepository.getPlayerInfo(event.getPlayerId())\n .map(playerInfo -> new MatchEventInfo(event.getType(), playerInfo, event.getTimestamp()));\n }",
"private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}",
"public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);",
"private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n\n\n }",
"public DatagramFlowRecord(byte[] data, int offset) {\r\n\t\t\r\n\t\tsetSrcAddress(data,offset);\r\n\t\tsetDestAddress(data,offset+4);\r\n\t\tsetNumPackets(data,offset+16);\r\n\t\tsetNumOctets(data,offset+20);\r\n\t\tsetfirstTime(data,offset+24);\r\n\t\tsetLastTime(data,offset+28);\r\n\t\tsetProtocol(data,offset+38);\r\n\t}",
"@Override\n\tpublic void onEvent(String name, String params, byte[] data, int offset,\n\t\t\tint length) {\n\t\tString result = \"name:\" + name;\n\t\t//if(params != null && !params.isEmpty()){\n\t\t//\tresult+=\";params:\"+params;\n\t\t//}\n\t\tif(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_PARTIAL)){\n\t\t\tif(params.contains(\"\\\"final_result\\\"\")){\n\t\t\t\tresult += \"\\n\"+\"语义解析结果:\" + params.substring(45, 47);\n\t\t\t\tif(result.contains(\"前进\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了前进!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_FORWARD);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"后退\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了后退!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_BACKWARD);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"左转\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了左转!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_LEFT);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"右转\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了右转!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_RIGHT);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"停\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了停止!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_STOP);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"避障\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了避障!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_AVOID);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"跟踪\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了跟踪!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_FOLLOW);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"抓取\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了抓取!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(MainActivity.this, GraspActivity.class);\n\t\t\t\t\tMainActivity.this.startActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(data != null){\n\t\t\tresult += \";data length=\" + data.length;\n\t\t}\n\t\t\n\t\t\n\t\t/*if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_READY)){\n\t\t\tresult +=\"引擎准备就绪,可以开始说话\";\n\t\t}else if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_BEGIN)){\n\t\t\tresult += \"检测到用户已经开始说话\";\n\t\t}else if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_END)){\n\t\t\tresult += \"检测到用户已经停止说话\";\n\t\t\t\n\t\t}else if (data != null) {\n\t\t\tresult += \" ;data length=\" + data.length;\n }*/\n\t\n\t\t//show the result\n\t\tprintresult(result);\n\t\t\n\t}",
"private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}",
"public TaskEventData(TaskEventData source) {\n if (source.Code != null) {\n this.Code = new Long(source.Code);\n }\n if (source.Message != null) {\n this.Message = new String(source.Message);\n }\n if (source.TaskId != null) {\n this.TaskId = new Long(source.TaskId);\n }\n if (source.TaskOrderId != null) {\n this.TaskOrderId = new String(source.TaskOrderId);\n }\n if (source.TaskCode != null) {\n this.TaskCode = new Long(source.TaskCode);\n }\n if (source.TaskCoinNumber != null) {\n this.TaskCoinNumber = new Long(source.TaskCoinNumber);\n }\n if (source.TaskType != null) {\n this.TaskType = new Long(source.TaskType);\n }\n if (source.TotalCoin != null) {\n this.TotalCoin = new Long(source.TotalCoin);\n }\n if (source.Attach != null) {\n this.Attach = new String(source.Attach);\n }\n if (source.DoneTimes != null) {\n this.DoneTimes = new Long(source.DoneTimes);\n }\n if (source.TotalTimes != null) {\n this.TotalTimes = new Long(source.TotalTimes);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.GrowScore != null) {\n this.GrowScore = new Long(source.GrowScore);\n }\n }",
"RS3PacketBuilder buildPacket(T node);",
"protected void encode() {\n\t\tsuper.rawPkt = new byte[12 + this.PID.length*4];\n\t\t\n\t\tbyte[] someBytes = StaticProcs.uIntLongToByteWord(super.ssrc);\n\t\tSystem.arraycopy(someBytes, 0, super.rawPkt, 4, 4);\n\t\tsomeBytes = StaticProcs.uIntLongToByteWord(this.ssrcMediaSource);\n\t\tSystem.arraycopy(someBytes, 0, super.rawPkt, 8, 4);\n\t\t\n\t\t// Loop over Feedback Control Information (FCI) fields\n\t\tint curStart = 12;\n\t\tfor(int i=0; i < this.PID.length; i++ ) {\n\t\t\tsomeBytes = StaticProcs.uIntIntToByteWord(PID[i]);\n\t\t\tsuper.rawPkt[curStart++] = someBytes[0];\n\t\t\tsuper.rawPkt[curStart++] = someBytes[1];\n\t\t\tsomeBytes = StaticProcs.uIntIntToByteWord(BLP[i]);\n\t\t\tsuper.rawPkt[curStart++] = someBytes[0];\n\t\t\tsuper.rawPkt[curStart++] = someBytes[1];\n\t\t}\n\t\twriteHeaders();\n\t}",
"public Event (Display display, ResponseInputStream in) {\n this.display = display;\n code = in.read_int8 ();\n detail = in.read_int8 ();\n sequence_number = in.read_int16();\n }",
"public byte[] GetPayload(int cmd, String [] data){\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n if (data.length == 0) {\n payload.add((byte)0);\n } else {\n int cc = 0;\n for(int i =0; i != data.length; i++){\n String item = data[i];\n for(int j=0; j!= item.length(); j++){\n char c = item.charAt(j);\n byte b = (byte)c;\n payload.add(b);\n }\n if (cc < data.length - 1) {\n payload.add((byte)DELIMITER);\n }\n cc = cc+ 1;\n }\n payload.add((byte)0);\n }\n\n return makeTransportPacket(payload);\n }",
"byte[] getStructuredData(String messageData);",
"public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }",
"public byte [] GetPayload_Generic(int cmd ) {\n // Construct payload as series of delimited strings\n List<Byte> payload = new ArrayList<Byte>();\n payload.add((byte)cmd);\n payload.add((byte)0);\n return makeTransportPacket_Generic(payload);\n }",
"private void populateSpecialEvent() {\n try {\n vecSpecialEventKeys = new Vector();\n vecSpecialEventLabels = new Vector();\n StringTokenizer stk = null;\n //MSB -09/01/05 -- Changed configuration file and Keys\n // config = new ConfigMgr(\"customer.cfg\");\n // String strSubTypes = config.getString(\"SPECIAL_EVENT_TYPES\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"SPECIAL_EVT_TYPE\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecSpecialEventKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecSpecialEventLabels.add(value);\n }\n cbxSpcEvt.setModel(new DefaultComboBoxModel(vecSpecialEventLabels));\n } catch (Exception e) {}\n }"
]
| [
"0.6665407",
"0.64209163",
"0.60101724",
"0.5808206",
"0.5801052",
"0.5675349",
"0.56681156",
"0.56405747",
"0.5634862",
"0.5618322",
"0.5598885",
"0.55898887",
"0.55787045",
"0.5566222",
"0.55305266",
"0.55242467",
"0.55236",
"0.550017",
"0.5489554",
"0.5421467",
"0.5416724",
"0.53981483",
"0.53976125",
"0.53971314",
"0.53839564",
"0.5345968",
"0.53339136",
"0.5306218",
"0.5300192",
"0.5297528",
"0.5282906",
"0.52714777",
"0.5268919",
"0.5263595",
"0.52426296",
"0.5239477",
"0.5239236",
"0.52237016",
"0.5215687",
"0.52125293",
"0.52110964",
"0.52095246",
"0.5208297",
"0.52038187",
"0.52038187",
"0.51976824",
"0.5196327",
"0.5193874",
"0.5183922",
"0.51757383",
"0.5174347",
"0.51677585",
"0.51574826",
"0.51567066",
"0.51528573",
"0.5150593",
"0.5139974",
"0.512417",
"0.5117286",
"0.51164633",
"0.51149184",
"0.51139224",
"0.5090655",
"0.5085591",
"0.5084619",
"0.5082307",
"0.5080608",
"0.5066934",
"0.5065339",
"0.50641274",
"0.5063465",
"0.50577444",
"0.5057617",
"0.5056004",
"0.5054802",
"0.5049861",
"0.50483334",
"0.5044226",
"0.50394964",
"0.50356305",
"0.50352836",
"0.5030108",
"0.5024152",
"0.5022116",
"0.5020405",
"0.50191826",
"0.50055796",
"0.5003694",
"0.5002582",
"0.49995914",
"0.499249",
"0.49837828",
"0.4983572",
"0.49832034",
"0.49723536",
"0.49708784",
"0.49698913",
"0.49641824",
"0.49605936",
"0.49513155"
]
| 0.5570305 | 13 |
parse packet message to event data | protected void parsePacket(byte[] data)
throws BeCommunicationDecodeException {
super.parsePacket(data);
// it's infoData is empty
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}",
"private DatagramPacket parsePacket(DatagramPacket packet) {\n byte[] dataPacket = packet.getData();\n /**\n * Code ported to use the new parseData(byte[]) function\n */\n byte[][] information = helper.parseData(dataPacket);\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \n \"sequence_number=\" + new String(information[1]));\n sequenceNo = Integer.parseInt(new String(information[1]));\n byte[] payload = information[2];\n if(new String(information[3]).trim().equalsIgnoreCase(\"END\"))\n lastPacket = true;\n if (!receivedPacketList.containsKey(sequenceNo)) {\n receivedPacketList.put(sequenceNo, payload);\n expectedList.remove(Integer.valueOf(sequenceNo));\n }\n else\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Packet repeat\");\n sequenceNo = (sequenceNo + 1) % Constants.WINDOW_SIZE;\n String ackString = \"ACK \" + sequenceNo + \" \\n\\r\";\n byte[] ackPacket = ackString.getBytes();\n DatagramPacket acknowledge = new DatagramPacket(ackPacket,\n ackPacket.length,\n ip,\n port\n );\n return acknowledge;\n }",
"@Override\n\tpublic void parse(Packet packet) {\n\t}",
"private void parsePacket() {\n\n // Request a new data buffer if no data is currently available.\n if (receiveBuffer == null) {\n socketHandle.read(DEFAULT_REQUEST_SIZE).addDeferrable(this, true);\n return;\n }\n\n // Attempt to parse the next packet. This can result in malformed message\n // exceptions which are passed back to the caller or buffer underflow exceptions\n // which result in a request for more data.\n final int startPosition = receiveBuffer.position();\n try {\n\n // Extract the main header byte and message length. If this fails the connection\n // is unrecoverable and must be closed.\n final int headerByte = 0xFF & receiveBuffer.get();\n final ControlPacketType controlPacketType = ControlPacketType.getControlPacketType(headerByte);\n if (controlPacketType == null) {\n throw new MalformedPacketException(\"Invalid control packet type\");\n }\n final int messageLength = VarLenQuantity.create(receiveBuffer).getValue();\n\n // Determine whether there is sufficient data in the buffer to parse the full\n // message. If not, request further data in an expanded buffer.\n if (messageLength > receiveBuffer.remaining()) {\n receiveBuffer.position(startPosition);\n fillReceiveBuffer(5 + messageLength);\n return;\n }\n\n // Parse the packet body, based on the known control packet type.\n ControlPacket parsedPacket;\n switch (controlPacketType) {\n case CONNECT:\n parsedPacket = ConnectPacket.parsePacket(messageLength, receiveBuffer);\n break;\n case CONNACK:\n parsedPacket = ConnackPacket.parsePacket(messageLength, receiveBuffer);\n break;\n case PUBLISH:\n parsedPacket = PublishPacket.parsePacket(headerByte, messageLength, receiveBuffer);\n break;\n case SUBSCRIBE:\n case UNSUBSCRIBE:\n parsedPacket = SubscribePacket.parsePacket(controlPacketType, messageLength, receiveBuffer);\n break;\n case SUBACK:\n parsedPacket = SubackPacket.parsePacket(messageLength, receiveBuffer);\n break;\n default:\n parsedPacket = ControlPacket.parsePacket(controlPacketType, messageLength, receiveBuffer);\n break;\n }\n\n // Include packet tracing if required.\n if (logger.getLogLevel() == Level.FINER) {\n logger.log(Level.FINER, \"RX \" + parsedPacket.tracePacket(false, false));\n } else if (logger.getLogLevel() == Level.FINEST) {\n logger.log(Level.FINEST, \"RX \" + parsedPacket.tracePacket(false, true));\n }\n\n // Hand off the received packet.\n deferredReceive.callback(parsedPacket);\n deferredReceive = null;\n\n // After parsing the packet, release any fully consumed buffers.\n if (!receiveBuffer.hasRemaining()) {\n socketService.releaseByteBuffer(receiveBuffer);\n receiveBuffer = null;\n }\n }\n\n // Request more data on a buffer underflow. This doubles the size of the request\n // buffer and then attempts to fill it.\n catch (final BufferUnderflowException error) {\n receiveBuffer.position(startPosition);\n fillReceiveBuffer(2 * receiveBuffer.remaining());\n }\n\n // Handle fatal errors.\n catch (final Exception error) {\n deferredReceive.errback(error);\n deferredReceive = null;\n }\n }",
"public void processPacket(Packet p)\n {\n PacketExtension pe = p.getExtension(\"event\", \"http://jabber.org/protocol/pubsub#event\");\n if(pe != null)\n {\n System.out.println(\"pe: \"+pe.toXML());\n }\n\n }",
"public void parse(byte[] buffer) {\n if (buffer == null) {\n MMLog.log(TAG, \"parse failed buffer = \" + null);\n return;\n }\n\n if (buffer.length >= 9) {\n this.msgHead = getIntVale(0, 2, buffer);\n if(this.msgHead != DEFAULT_HEAD) return;\n\n this.msgEnd = getIntVale(buffer.length - 1, 1, buffer);\n if(this.msgEnd != DEFAULT_END) return;\n\n this.msgID = getIntVale(2, 2, buffer);\n this.msgIndex = getIntVale(4, 1, buffer);\n this.msgLength = getIntVale(5, 2, buffer);\n this.msgCRC = getIntVale(buffer.length - 2, 1, buffer);\n\n } else {\n MMLog.log(TAG, \"parse failed length = \" + buffer.length);\n }\n if (msgLength <= 0) return;\n datas = new byte[msgLength];\n System.arraycopy(buffer, 7, datas, 0, this.msgLength);\n }",
"public void processEvent(Packet packet) {\r\n\t\tint eventCode = packet.eventCode;\r\n\t\t\r\n\t\tswitch(eventCode) {\r\n\t\t\tcase 0: registerPeer(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 2: insertFile(packet);\r\n\t\t\t //forwardPacket(packet);\r\n\t\t\t break;\r\n\t\t\tcase 3: findFile(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 4: processFileLocation(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 5: fileTransferReq(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 6: recFile(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 7: passingDHT(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 8: peerQuitting(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase 9: updateDHTPeerQuit(packet);\r\n\t\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public FeedEvent processMessage(byte[] message) {\n\t\tif ((message == null) || (message.length < 2))\n\t\t\treturn null;\n\n\t\tDdfMarketBase msg = Codec.parseMessage(message);\n\n\t\tif (msg == null) {\n\t\t\tlog.error(\"DataMaster.processMessage(\" + new String(message) + \") failed.\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn processMessage(msg);\n\t}",
"@Override\r\n\tprotected void parsePacket(byte[] data)\r\n\t\t\tthrows BeCommunicationDecodeException {\r\n\t\ttry {\r\n\t\t\tsuper.parsePacket(data);\r\n\r\n\t\t\tsimpleHiveAp = CacheMgmt.getInstance().getSimpleHiveAp(apMac);\r\n\t\t\tif (simpleHiveAp == null) {\r\n\t\t\t\tthrow new BeCommunicationDecodeException(\"Invalid apMac: (\" + apMac\r\n\t\t\t\t\t\t+ \"), Can't find corresponding data in cache.\");\r\n\t\t\t}\r\n\t\t\tHmDomain owner = CacheMgmt.getInstance().getCacheDomainById(\r\n\t\t\t\t\tsimpleHiveAp.getDomainId());\r\n\t\t\tString apName = simpleHiveAp.getHostname();\r\n\t\t\t\r\n\t\t\tByteBuffer buf = ByteBuffer.wrap(resultData);\r\n\t\t\t\r\n\t\t\tbuf.getShort(); //tlv number\r\n\t\t\tHmTimeStamp timeStamp = new HmTimeStamp(getMessageTimeStamp(), getMessageTimeZone());\r\n\t\t\tint ifIndex = 0;\r\n\t\t\tString ifName = \"\";\r\n\r\n\t\t\twhile (buf.hasRemaining()) {\r\n\r\n\t\t\t\tshort tlvType = buf.getShort();\r\n\t\t\t\tbuf.getShort(); //tlv length\r\n\t\t\t\tbuf.getShort(); //tlv version\r\n\t\t\t\tif (tlvType == TLVTYPE_RADIOINFO) {\r\n\t\t\t\t\tifIndex = buf.getInt();\r\n\t\t\t\t\tbyte len = buf.get();\r\n\t\t\t\t\tifName = AhDecoder.bytes2String(buf, len);\r\n\t\t\t\t} else if (tlvType == TLVTYPE_INTERFERENCESTATS) {\r\n\t\t\t\t\tAhInterferenceStats interferenceStats = new AhInterferenceStats();\r\n\t\t\t\t\tinterferenceStats.setApMac(apMac);\r\n\t\t\t\t\tinterferenceStats.setTimeStamp(timeStamp);\r\n\t\t\t\t\tinterferenceStats.setIfIndex(ifIndex);\r\n\t\t\t\t\tinterferenceStats.setIfName(ifName);\r\n\t\t\t\t\tinterferenceStats.setOwner(owner);\r\n\t\t\t\t\tinterferenceStats.setApName(apName);\r\n\r\n\t\t\t\t\tinterferenceStats.setChannelNumber((short)AhDecoder.byte2int(buf.get()));\r\n\t\t\t\t\tinterferenceStats.setAverageTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setAverageNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setShortTermNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotTXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotRXCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotInterferenceCU(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSnapShotNoiseFloor(buf.get());\r\n\t\t\t\t\tinterferenceStats.setCrcError(buf.get());\r\n\t\t\t\t\tinterferenceStats.setInterferenceCUThreshold(buf.get());\r\n\t\t\t\t\tinterferenceStats.setCrcErrorRateThreshold(buf.get());\r\n\t\t\t\t\tinterferenceStats.setSeverity(buf.get());\r\n\t\t\t\t\t\r\n\t\t\t\t\tinterferenceStatsList.add(interferenceStats);\r\n\t\t\t\t} else if (tlvType == TLVTYPE_ACSPNEIGHBOR) {\r\n\t\t\t\t\tAhACSPNeighbor neighbor = new AhACSPNeighbor();\r\n\t\t\t\t\tneighbor.setApMac(apMac);\r\n\t\t\t\t\tneighbor.setTimeStamp(timeStamp);\r\n\t\t\t\t\tneighbor.setIfIndex(ifIndex);\r\n\t\t\t\t\tneighbor.setOwner(owner);\r\n\r\n\t\t\t\t\tneighbor.setBssid(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setNeighborMac(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setNeighborRadioMac(AhDecoder.bytes2hex(buf, 6).toUpperCase());\r\n\t\t\t\t\tneighbor.setLastSeen(AhDecoder.int2long(buf.getInt()) * 1000);\r\n\t\t\t\t\tneighbor.setChannelNumber(AhDecoder.byte2int(buf.get()));\r\n\t\t\t\t\tneighbor.setTxPower(buf.get());\r\n\t\t\t\t\tneighbor.setRssi(buf.get());\r\n\t\t\t\t\tbyte len = buf.get();\r\n\t\t\t\t\tneighbor.setSsid(AhDecoder.bytes2String(buf, AhDecoder.byte2int(len)));\r\n\r\n\t\t\t\t\tneighborList.add(neighbor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new BeCommunicationDecodeException(\r\n\t\t\t\t\t\"BeInterferenceMapResultEvent.parsePacket() catch exception\", e);\r\n\t\t}\r\n\t}",
"public void pipeMsgEvent ( PipeMsgEvent event ){\r\n\t// Get the message object from the event object\r\n\tMessage msg=null;\r\n\ttry {\r\n\t msg = event.getMessage();\r\n\t if (msg == null)\r\n\t\treturn;\r\n\t} \r\n\tcatch (Exception e) {\r\n\t e.printStackTrace();\r\n\t return;\r\n\t}\r\n\t\r\n\t// Get the String message element by specifying the element tag\r\n\tMessageElement newMessage = msg.getMessageElement(TAG);\r\n\tif (newMessage == null)\t\t\t\r\n\t System.out.println(\"null msg received\");\r\n\telse\r\n\t System.out.println(\"Received message: \" + newMessage);\r\n }",
"@Override\n\t\t\t\tpublic void processPacket(Packet packet) {\n\t\t\t\t\t\n\t\t\t\t\tMessage message = (Message) packet;\n\t\t\t\t\tSystem.out.println(message.getFrom()+\"---\"+message.getBody());\n\t\t\t\t\tChatMsgEntity entity = new ChatMsgEntity();\n\t\t\t\t\tentity.setDate(getDate());\n\t\t\t\t\tString[] names = message.getFrom().split(\"/\");\n\t\t\t\t\tif (!names[1].equals(av.getUserData().phone)) {\n\t\t\t\t\t\tentity.setName(names[1]);\n\t\t\t\t\t\tentity.setMsgType(true);\n\t\t\t\t\t\tentity.setText(message.getBody());\n\t\t\t\t\t\tmDataArrays.add(entity);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tmListView.setSelection(mListView.getBottom());\n\t\t\t\t\t\tif(!names[1].equals(\"admin\")){\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}",
"public static Movie parseEvent(byte[] movie) {\n JsonReader jsonReader = new JsonReader(new InputStreamReader(new ByteArrayInputStream(movie)));\n JsonElement jsonElement = Streams.parse(jsonReader);\n JsonElement labelJsonElement = jsonElement.getAsJsonObject();\n\n if (labelJsonElement == null) {\n throw new IllegalArgumentException(\"Event does not define a type field: \" + new String(movie));\n }\n\n //LOG.info(\"parse event {}\", jsonElement.getAsJsonObject().toString());\n\n return gson.fromJson(jsonElement, MovieData.class);\n\n }",
"private void ParsePacket(byte[] packet) {\n byte status = packet[9];\n byte b2 = packet[10];\n byte b1 = packet[11];\n byte b0 = packet[12];\n\n for (int i = 0; i < cmdTableList.size(); i++) {\n if (cmdTableList.get(i).cmd[7] == b2 && cmdTableList.get(i).cmd[8] == b1 && cmdTableList.get(i).cmd[9] == b0) {\n mResponseIdx = i;\n break;\n }\n }\n\n byte[] cmd = cmdTableList.get(mResponseIdx).cmd;\n\n Log.d(TAG, \" status:\" + status);\n Log.d(TAG, \" addr:\" + \"\" + b2 + \" \" + b1 + \" \" + b0);\n\n if (status == (byte) 0x00 &&\n b2 == cmd[7] &&\n b1 == cmd[8] &&\n b0 == cmd[9]) {\n isCmdPass = true;\n cmdTableList.get(mResponseIdx).isPass = true;\n } else isCmdPass = false;\n\n Log.d(\"cmd pass: \", \"\" + isCmdPass);\n AirohaOtaLog.LogToFile(\"PROGRAM RESULT: \" + isCmdPass + \"\\n\");\n }",
"public void analyzeUDPCommand(byte[] buffer, DatagramPacket packet)\n\t{\n\t\tString recieved = new String(packet.getData(), 0, packet.getLength());\n\n\t\tif(recieved.equals(\"end\"))\n\t\t{\n\t\t\tcloseUDPServer();\n\t\t} else\n\t\t{\n\t\t\tprocessPacket(packet);\n\t\t}\n\t}",
"public void parseEventString(String s) {\n String[] lines = s.split(Game.EVENT_END);\n for (String line : lines) {\n if (!line.isEmpty()) {\n StringTokenizer st = new StringTokenizer(line);\n char firstChar = line.charAt(0);\n if (firstChar == EventGroup.PUSH_TOKEN) {\n this.pushEventGroup(EventGroup.fromString(this, st));\n } else if (firstChar == EventGroup.POP_TOKEN) {\n this.popEventGroup();\n } else {\n Event e = EventFactory.fromString(this, st);\n this.processEvent(e);\n }\n }\n }\n }",
"public void readPacketData(PacketBuffer buf) throws IOException {\n this.entityId = buf.readVarInt();\n this.effectId = buf.readByte();\n this.amplifier = buf.readByte();\n this.duration = buf.readVarInt();\n this.flags = buf.readByte();\n }",
"public void processIncomingDataPacket(DatagramPacket packet)\n throws Exception {\n\n this.peerAddress = packet.sender().getAddress();\n this.peerPort = packet.sender().getPort();\n int packetLength = packet.data().length();\n\n // Read bytes and put it in a eueue.\n byte[] bytes = packet.data().getBytes();\n \n String test = new String(bytes);\n System.out.println(\"Get Message :\" + test);\n \n byte[] msgBytes = new byte[packetLength];\n System.arraycopy(bytes, 0, msgBytes, 0, packetLength);\n\n logger.log(LogWriter.TRACE_DEBUG, \"UDPMessageChannel: processIncomingDataPacket : peerAddress = \"\n + peerAddress.getHostAddress() + \"/\"\n + packet.sender().getPort() + \" Length = \" + packetLength);\n\n SIPMessage sipMessage;\n try {\n this.receptionTime = System.currentTimeMillis();\n sipMessage = myParser.parseSIPMessage(msgBytes, true, false, this); \n /*@see Issue 292 */\n if (sipMessage instanceof SIPRequest) {\n String sipVersion = ((SIPRequest)sipMessage).getRequestLine().getSipVersion();\n if (! sipVersion.equals(\"SIP/2.0\")) {\n Response versionNotSupported = ((SIPRequest) sipMessage).createResponse(Response.VERSION_NOT_SUPPORTED, \"Bad version \" + sipVersion);\n this.sendMessage(versionNotSupported.toString().getBytes(),peerAddress,packet.sender().getPort(),\"UDP\",false);\n return;\n }\n String method = ((SIPRequest) sipMessage).getMethod();\n String cseqMethod = sipMessage.getCSeqHeader().getMethod();\n\n if (!method.equalsIgnoreCase(cseqMethod)) {\n SIPResponse sipResponse = ((SIPRequest) sipMessage)\n .createResponse(SIPResponse.BAD_REQUEST);\n byte[] resp = sipResponse\n .encodeAsBytes(this.getTransport());\n this.sendMessage(resp,peerAddress,packet.sender().getPort(),\"UDP\",false);\n return;\n\n }\n }\n\n } catch (ParseException ex) {\n // myParser = null; // let go of the parser reference.\n logger.log(LogWriter.TRACE_DEBUG,\"Rejecting message ! \" + new String(msgBytes));\n logger.log(LogWriter.TRACE_DEBUG, \"error message \" + ex.getMessage());\n logger.logException(ex);\n\n // JvB: send a 400 response for requests (except ACK)\n // Currently only UDP,\n String msgString = new String(msgBytes, 0, packetLength);\n if (!msgString.startsWith(\"SIP/\") && !msgString.startsWith(\"ACK \")) {\n\n String badReqRes = createBadReqRes(msgString, ex);\n if (badReqRes != null) {\n logger.log(LogWriter.TRACE_DEBUG, \"Sending automatic 400 Bad Request:\" + badReqRes);\n try {\n this.sendMessage(badReqRes.getBytes(), peerAddress,\n packet.sender().getPort(), \"UDP\", false);\n } catch (IOException e) {\n logger.logException(e);\n }\n } else {\n logger.log(LogWriter.TRACE_DEBUG, \"Could not formulate automatic 400 Bad Request\");\n }\n }\n\n return;\n }\n // No parse exception but null message - reject it and\n // march on (or return).\n // exit this message processor if the message did not parse.\n\n if (sipMessage == null) {\n logger.log(LogWriter.TRACE_DEBUG, \"Rejecting message ! + Null message parsed.\");\n\n String key = packet.sender().getAddress().getHostAddress() + \":\"\n + packet.sender().getPort();\n if (pingBackRecord.get(key) == null\n && sipStack.getMinKeepAliveInterval() > 0) {\n byte[] keepAlive = \"\\r\\n\\r\\n\".getBytes();\n\n PingBackTimerTask task = new PingBackTimerTask(this.peerAddress.getHostAddress(),\n this.getPort());\n\n pingBackRecord.put(key, task);\n\n this.sipStack.getTimer().schedule(task,\n sipStack.getMinKeepAliveInterval() * 1000);\n\n sipStack.ioHandler.sendBytes(this.messageProcessor.getIpAddress(),\n this.peerAddress, this.peerPort, Transport.UDP,\n keepAlive,false);\n } else {\n logger.logDebug(\"Not sending ping back\");\n }\n return;\n }\n Via topMostVia = sipMessage.getTopmostVia();\n // Check for the required headers.\n if (sipMessage.getFrom() == null || sipMessage.getTo() == null\n || sipMessage.getCallId() == null\n || sipMessage.getCSeq() == null || topMostVia == null) {\n\n String badmsg = new String(msgBytes);\n logger.log(LogWriter.TRACE_ERROR, \"bad message \" + badmsg);\n logger.log(LogWriter.TRACE_ERROR, \">>> Dropped Bad Msg \" + \"From = \"\n + sipMessage.getFrom() + \"To = \"\n + sipMessage.getTo() + \"CallId = \"\n + sipMessage.getCallId() + \"CSeq = \"\n + sipMessage.getCSeq() + \"Via = \"\n + sipMessage.getViaHeaders());\n return;\n }\n\n if(sipStack.sipEventInterceptor != null) {\n sipStack.sipEventInterceptor.beforeMessage(sipMessage);\n }\n // For a request first via header tells where the message\n // is coming from.\n // For response, just get the port from the packet.\n if (sipMessage instanceof SIPRequest) {\n Hop hop = sipStack.addressResolver.resolveAddress(topMostVia\n .getHop());\n this.peerPort = hop.getPort();\n this.peerProtocol = topMostVia.getTransport();\n\n this.peerPacketSourceAddress = packet.sender().getAddress();\n this.peerPacketSourcePort = packet.sender().getPort();\n try {\n this.peerAddress = packet.sender().getAddress();\n // Check to see if the received parameter matches\n // the peer address and tag it appropriately.\n\n boolean hasRPort = topMostVia.hasParameter(Via.RPORT);\n if (hasRPort\n || !hop.getHost().equals(\n this.peerAddress.getHostAddress())) {\n topMostVia.setParameter(Via.RECEIVED, this.peerAddress\n .getHostAddress());\n }\n\n if (hasRPort) {\n topMostVia.setParameter(Via.RPORT, Integer\n .toString(this.peerPacketSourcePort));\n }\n } catch (java.text.ParseException ex1) {\n InternalErrorHandler.handleException(ex1);\n }\n\n } else {\n\n this.peerPacketSourceAddress = packet.sender().getAddress();\n this.peerPacketSourcePort = packet.sender().getPort();\n this.peerAddress = packet.sender().getAddress();\n this.peerPort = packet.sender().getPort();\n this.peerProtocol = topMostVia.getTransport();\n }\n\n this.processMessage(sipMessage);\n if(sipStack.sipEventInterceptor != null) {\n sipStack.sipEventInterceptor.afterMessage(sipMessage);\n }\n }",
"private void parseMessages() {\n\n // Find the first delimiter in the buffer\n int inx = rx_buffer.indexOf(DELIMITER);\n\n // If there is none, exit\n if (inx == -1)\n return;\n\n // Get the complete message\n String s = rx_buffer.substring(0, inx);\n\n // Remove the message from the buffer\n rx_buffer = rx_buffer.substring(inx + 1);\n\n // Send to read handler\n sendToReadHandler(s);\n\n // Look for more complete messages\n parseMessages();\n }",
"protected abstract void handlePacket(DatagramPacket packet);",
"@Override\n\t\tpublic void fromBytes(ByteBuf buf)\n\t\t{\n\t\t\tthis.eventID = buf.readInt();\n\t\t}",
"private byte[] Parse(byte[] arr)\r\n\t{\r\n\t\tbyte[] invalid = {0};\r\n\t\tif(arr[1] == 1) {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Packet is a Read Request' \\n\");\r\n\t\t\tbyte[] read = {0, 3, 0, 1};\r\n\t\t\treturn read;\r\n\t\t}\r\n\t\telse if(arr[1] == 2) {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Packet is a Write Request' \\n\");\r\n\t\t\tbyte[] write = {0, 4, 0, 0};\r\n\t\t\treturn write;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"***Packet Parsing***\");\r\n\t\t System.out.println(\"'Invalid Request'\");\r\n\t\t currentStatus = false;\r\n\t\t\treturn invalid;\r\n\t\t}\r\n\t}",
"private void packetHandler(int[] packet)\n {\n boolean startMemoryRead= true;\n if(packet[0]==Constants.STARTCHAR && packet[3]==Constants.ENDCHAR)\n {\n\n switch (packet[1]) {\n case Constants.LIGHTSENSVAL:\n messageView.append(\"Ljussensorvärde är\"+ packet[2] + \"\\n\");\n lightSensorValueView.setText(Integer.toString(packet[2]));\n break;\n case Constants.POTVAL:\n messageView.append(\"Potentiometervärde är\"+ packet[2] + \"\\n\");\n potSensorValueView.setText(Integer.toString(packet[2]));\n break;\n case Constants.MEMVAL:\n dataStream.add(packet[2]);\n break;\n case Constants.READMEMORY:\n switch (packet[2])\n {\n case Constants.BEGIN:\n startMemoryRead = true;\n messageView.append(\"Börjar läsa data\");\n break;\n case Constants.DONE:\n startMemoryRead = false;\n messageView.append(\"läst klart data\");\n GraphActivity.updateData(dataStream);\n break;\n\n }\n\n }\n }\n }",
"private Event convertToEvent(String message) {\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONObject jsonObject;\n\t\ttry {\n\t\t\tjsonObject = (JSONObject) parser.parse(message);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new RuntimeException(\"ParseException caught trying to parse message text into JSON object\");\n\t\t}\n\t\tJSONArray events = (JSONArray) jsonObject.get(\"events\");\n\t\tList<EventAttribute> eventAttributes = new ArrayList<>();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tIterator<JSONObject> iterator = events.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tJSONObject jsonT = (JSONObject) iterator.next();\n\t\t\tJSONObject jsonEventAttribute = (JSONObject) jsonT.get(\"attributes\");\n\t\t\tString accountNum = (String) jsonEventAttribute.get(\"Account Number\");\n\t\t\tString txAmount = (String) jsonEventAttribute.get(\"Transaction Amount\");\n\t\t\tString cardMemberName = (String) jsonEventAttribute.get(\"Name\");\n\t\t\tString product = (String) jsonEventAttribute.get(\"Product\");\n\t\t\tEventAttribute eventAttribute = new EventAttribute(accountNum, txAmount, cardMemberName, product);\n\t\t\teventAttributes.add(eventAttribute);\n\t\t}\n\n\t\treturn new Event(eventAttributes);\n\t}",
"@Override\n\tpublic void processPacketDecodeError() {\n\t\t\n\t}",
"public void processPacket(NetHandler nethandler) {\r\n //ChatEvent chatevent = new ChatEvent(controller, a, ChatEvent.Direction.INCOMING);\r\n //controller.getEventManager().callEvent(chatevent);\r\n //if (!chatevent.isCancelled()) {\r\n \tif(!controller.processIncomingMessage(this.message)) {\r\n nethandler.handleChat(this);\r\n \t}\r\n //}\r\n }",
"private List<GPSData> decodeMessageFrame(ChannelBuffer buff, Channel channel, int fSize, int wSize) {\n\t\tbuff.skipBytes(INITIAL_ZERO_BYTES + FRAME_BYTES_SIZE);\n\t\t\n\t\t// codecId byte is ignored\n\t\tbuff.skipBytes(CODEC_BYTE);\n\t\t\n\t\tshort numberOfData = buff.readUnsignedByte();\n\t\t// response to modem about data reception\n\t\tacknowledgeTeltonikaModem(channel, numberOfData);\n\t\tList<GPSData> list = new ArrayList<GPSData>();\n\t\tString imeiLast7digits = imeiMap.get(channel.getId());\n\t\tLOGGER.info(\"Received package decode start: \" + System.currentTimeMillis() + \"ms from device: \" + imeiLast7digits);\n\t\tfor (int i = 0; i < numberOfData; i++) {\n\n\t\t\tGPSData data = new GPSData();\n\n\t\t\tDate timestamp = new Date(buff.getLong(buff.readerIndex()));\n\t\t\tbuff.readerIndex(buff.readerIndex() + 8);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\t\tdata.setTimestamp(format.format(timestamp));\n\n\t\t\tdata.setUnitId(imeiMap.get(channel.getId()));\n\n\t\t\t// priority byte is ignored\n\t\t\tbuff.skipBytes(1);\n\n\t\t\t// X\n\t\t\tStringBuilder longitude = new StringBuilder(String.valueOf(buff\n\t\t\t\t\t.readUnsignedInt()));\n\t\t\tlongitude.insert(2, '.');\n\t\t\tdata.setLongitude(Double.parseDouble(longitude.toString()));\n\n\t\t\t// Y\n\t\t\tStringBuilder latitude = new StringBuilder(String.valueOf(buff\n\t\t\t\t\t.readUnsignedInt()));\n\t\t\tlatitude.insert(2, '.');\n\t\t\tdata.setLatitude(Double.parseDouble(latitude.toString()));\n\n\t\t\t// H\n\t\t\tint altitude = buff.readUnsignedShort();\n\t\t\tdata.setAltitude((double) altitude);\n\n\t\t\tint angle = buff.readUnsignedShort();\n\t\t\tdata.setAngle(angle);\n\n\t\t\tshort satelite = buff.readUnsignedByte();\n\t\t\tdata.setSatelite(satelite);\n\n\t\t\tint speed = buff.readUnsignedShort();\n\t\t\tdata.setSpeed((double) speed);\n\n\t\t\t// IO INFORMATION START\n\n\t\t\t// IO ENETS\n\t\t\t//\n\t\t\t// IO element ID of Event generated (in case when 00 data\n\t\t\t// generated not on event)\n\t\t\t// we skip this byte\n\t\t\t\n\t\t\tbuff.skipBytes(1);\n\t\t\t\n\t\t\t// could read elements number but not necessary\n\t\t\t// instead we can skip it\n\t\t\t// short elementsNumber = buff.readUnsignedByte();\n\n\t\t\tbuff.skipBytes(1);\n\n\t\t\t// number of records with value 1 byte length\n\t\t\tshort oneByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < oneByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t}\n\n\t\t\t// number of records with value 2 byte length\n\t\t\tshort twoByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < twoByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(2);\n\t\t\t}\n\n\t\t\t// number of records with value 4 byte length\n\t\t\tshort fourByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < fourByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(4);\n\t\t\t}\n\n\t\t\t// number of records with value 8 byte length\n\t\t\tshort eightByteElementNum = buff.readUnsignedByte();\n\n\t\t\tfor (int j = 0; j < eightByteElementNum; j++) {\n\t\t\t\tbuff.skipBytes(1);\n\t\t\t\tbuff.skipBytes(8);\n\t\t\t}\n\t\t\t// IO INFORMATION END\n\t\t\tlist.add(data);\n\t\t}\n\t\tLOGGER.info(\"Received package decode end: \" + System.currentTimeMillis() + \"ms from device: \" + imeiLast7digits);\n\t\t// records number(1 byte) and CRC(4 bytes) left in the buffer unread\n\t\tLOGGER.info(\"Number of packages decoded: \" + numberOfData);\n\t\tnumberOfData = buff.readByte();\n\t\t// skip CRC bytes\n\t\tlong CRC = buff.readUnsignedInt();\n\t\tLOGGER.info(\"Data CRC: \" + CRC);\n\t\t\n\t\treturn list;\n\t}",
"public List<Message> parse(String message) {\n msg = new JSONObject(message);\n data = msg.getJSONArray(\"data\");\n List<Message> msgArray = new ArrayList<Message>();\n for (int i=0; i<data.length(); i++){\n Message tmpmsg = new Message();\n JSONObject tmpObj = data.getJSONObject(i);\n tmpmsg.setKey(tmpObj.getString(\"deviceId\"));\n tmpmsg.setEventTimestamp(Instant.parse(tmpObj.getString(\"time\")));\n tmpmsg.setResponseBody(tmpObj.toString());\n msgArray.add(tmpmsg);\n }\n return msgArray;\n }",
"@Override synchronized public EventPacket extractPacket(AEPacketRaw in) {\r\n out=super.extractPacket(in);\r\n \r\n int n=in.getNumEvents();\r\n if(n==0) return out;\r\n for(Object obj:out){\r\n PolarityEvent e=(PolarityEvent)obj;\r\n e.polarity=e.type==0? PolarityEvent.Polarity.Off:PolarityEvent.Polarity.On;\r\n }\r\n return out;\r\n }",
"public void parsePerformanceMeasurements(RawMessage msg)\n\t\tthrows HeaderParseException\n\t{\n\t\tbeginTimeHasTz = false;\n\t\tbyte data[] = msg.getData();\n\t\tint len = data.length;\n\n\t\tboolean inNotes = false;\n\t\tString beginDate = null;\n\t\tString beginTime = null;\n\t\tString endTime = null;\n\t\tString station = null;\n\t\tString device = null;\n\t\tStringBuffer notes = new StringBuffer();\n\t\tint e=0;\n\t\tfor(int p=0; p<len-3; p = e)\n\t\t{\n\t\t\t// Find the beginning of the next line.\n\t\t\tfor(e = p; e < len && data[e] != (byte)'\\n'; e++);\n\t\t\te++;\n\n\t\t\t// Check for start of new tag.\n\t\t\tif (data[p] == (byte)'/' && data[p+1] == (byte)'/')\n\t\t\t{\n\t\t\t\tp += 2;\n\t\t\t\tString s = new String(data, p, e-p);\n\t\t\t\ts = s.toUpperCase().trim();\n\t\t\t\tif (s.length() == 0)\n\t\t\t\t\tcontinue;\t// Skip comment line with just '//'\n\t\t\t\tif (s.startsWith(\"STATION\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(7).trim();\n\t\t\t\t\tmsg.setPM(STATION, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DEVICE END TIME\")) // do before DEVICE !!\n\t\t\t\t{\n\t\t\t\t\tif (endTime == null)\n\t\t\t\t\t\tendTime = s.substring(15).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DEVICE\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(6).trim();\n\t\t\t\t\tint hyphen = val.indexOf('-');\n\t\t\t\t\tint space = val.indexOf(' ');\n\t\t\t\t\tif (hyphen >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (space > 0 && hyphen < space)\n\t\t\t\t\t\t\tval = val.substring(0, space);\n\t\t\t\t\t\telse if (space > 0 && space < hyphen)\n\t\t\t\t\t\t\tval = val.substring(0, space) + \"-\"\n\t\t\t\t\t\t\t\t+ val.substring(space+1);\n\t\t\t\t\t}\n\t\t\t\t\telse // no hyphen\n\t\t\t\t\t{\n\t\t\t\t\t\tif (space >= 0)\n\t\t\t\t\t\t\tval = val.substring(0,space) + \"-\"\n\t\t\t\t\t\t\t\t+ val.substring(space+1);\n\t\t\t\t\t}\n\t\t\t\t\tspace = val.indexOf(' ');\n\t\t\t\t\tif (space > 0)\n\t\t\t\t\t\tval = val.substring(0,space);\n\t\t\t\t\tmsg.setPM(DEVICE, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"SOURCE\"))\n\t\t\t\t{\n\t\t\t\t\tString val = s.substring(6).trim();\n\t\t\t\t\tmsg.setPM(SOURCE, new Variable(val));\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"BEGIN DATE\"))\n\t\t\t\t{\n\t\t\t\t\tbeginDate = s.substring(10).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"BEGIN TIME\"))\n\t\t\t\t{\n\t\t\t\t\tbeginTime = s.substring(10).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"ACTUAL END TIME\"))\n\t\t\t\t{\n\t\t\t\t\tendTime = s.substring(15).trim();\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"EDL NOTES\")\n\t\t\t\t || s.startsWith(\"PFC NOTES\")\n\t\t\t\t || s.startsWith(\"DEVICE NOTES\"))\n\t\t\t\t{\n\t\t\t\t\tinNotes = true;\n\t\t\t\t}\n\t\t\t\telse if (s.startsWith(\"DATA\"))\n\t\t\t\t{\n\t\t\t\t\tinNotes = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (inNotes)\n\t\t\t\tnotes.append(new String(data, p, e-p));\n\t\t\telse // this is the end of the header!\n\t\t\t{\n\t\t\t\tmsg.setHeaderLength(p);\n\t\t\t\tmsg.setPM(MESSAGE_LENGTH, new Variable((long)(len - p)));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (beginDate != null)\n\t\t{\n\t\t\tif (beginTime != null)\n\t\t\t{\n\t\t\t\t// begin time can optionally contain time zone.\n\t\t\t\tint idx = beginTime.lastIndexOf('S');\n\t\t\t\tif (idx != -1)\n\t\t\t\t{\n\t\t\t\t\tbeginTimeHasTz = true;\n\t\t\t\t\tbeginTime = beginTime.substring(0, idx) + \"00\";\n\t\t\t\t}\n\t\t\t\telse // Add dummy offset to UTC\n\t\t\t\t{\n\t\t\t\t\tbeginTimeHasTz = false;\n\t\t\t\t\tbeginTime += \" +0000\";\n\t\t\t\t}\n\t\t\t\tbeginDate += beginTime;\n\t\t\t}\n\t\t\telse\n\t\t\t\tbeginDate += \"0000 +0000\"; // HHMM & TZ\n\t\t\ttry\n\t\t\t{\n\t\t\t\tLogger.instance().debug1(\"Parsing begin date/time '\"\n\t\t\t\t\t+ beginDate + \"'\");\n\t\t\t\tDate d = beginDateTimeSdf.parse(beginDate);\n\t\t\t\tmsg.setPM(BEGIN_TIME_STAMP, new Variable(d));\n\t\t\t}\n\t\t\tcatch(ParseException ex)\n\t\t\t{\n\t\t\t\tLogger.instance().log(Logger.E_FAILURE, \n\t\t\t\t\t\"Unparsable begin time '\" + beginTime + \"': Ignored.\");\n\t\t\t}\n\t\t}\n\n\t\tif (endTime != null)\n\t\t{\n\t\t\t// Check for start of timezone.\n\t\t\tint idx = endTime.indexOf('-');\n\t\t\tif (idx == -1)\n\t\t\t\tidx = endTime.indexOf('+');\n\n\t\t\tif (idx == -1) // No time zone at all, add one.\n\t\t\t\tendTime += \" +0000\";\n\t\t\telse\n\t\t\t{\n\t\t\t\tint i = ++idx; // idx points to first digit after sign.\n\n\t\t\t\tfor(; i < endTime.length() \n\t\t\t\t\t&& i-idx <= 4\n\t\t\t\t\t&& Character.isDigit(endTime.charAt(i)); i++);\n\t\t\t\t// i now points to first non-digit after TZ\n\n\t\t\t\tswitch(i-idx) // i-idx is # of digits after sign.\n\t\t\t\t{\n\t\t\t\tcase 0: \n\t\t\t\t\tendTime = endTime.substring(0,idx) + \"0000\"; \n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: // 1 digit hour? move to position 2 in HHMM:\n\t\t\t\t\tendTime = endTime.substring(0,idx) + \"0\" \n\t\t\t\t\t\t+ endTime.charAt(idx) + \"00\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // HH only, add MM\n\t\t\t\t\tendTime = endTime.substring(0,i) + \"00\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // HHM, ad lcd\n\t\t\t\t\tendTime = endTime.substring(0,i) + \"0\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // complete. Just truncate at 4 digits.\n\t\t\t\t\tendTime = endTime.substring(0, idx+4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmsg.setPM(END_TIME_STAMP, new Variable(\n\t\t\t\t\tendTimeSdf.parse(endTime)));\n\t\t\t}\n\t\t\tcatch(ParseException ex)\n\t\t\t{\n\t\t\t\tLogger.instance().log(Logger.E_FAILURE, \"Unparsable end time '\"\n\t\t\t\t\t+ endTime + \"': Ignored.\");\n\t\t\t}\n\t\t}\n\n\t\tif (notes.length() > 0)\n\t\t{\n\t\t\tmsg.setPM(EDL_NOTES, new Variable(notes.toString()));\n\t\t}\n\n\t\t// Construct medium ID by concatenating station to device.\n\t\tif (msg.getMediumId() == null)\n\t\t{\n\t\t\tString mid = System.getProperty(\"MEDIUMID\");\n\t\t\tif (mid == null)\n\t\t\t{\n\t\t\t\tVariable v = msg.getPM(STATION);\n\t\t\t\tif (v == null)\n\t\t\t\t\tthrow new HeaderParseException(\"No STATION in EDL file.\");\n\t\t\t\tmid = v.getStringValue();\n\t\t\t\tv = msg.getPM(DEVICE);\n\t\t\t\tif (v != null)\n\t\t\t\t\tmid = mid + \"-\" + v.getStringValue();\n\t\t\t}\n\t\t\tLogger.instance().log(Logger.E_DEBUG3,\n\t\t\t\t\"Setting EDL File Medium ID to '\" + mid + \"'\");\n\t\t\tmsg.setMediumId(mid);\n\t\t}\n\t}",
"@Override\r\n\tpublic void processEvent() {\n\t\tint VolumeButtonEvent = (Integer) pdu.getRawPayload()[0];\r\n\t\t//System.out.println(\"number of objects \" + numObjects);\r\n\t}",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"protected Object decode(\n ChannelHandlerContext ctx, Channel channel, Object msg)\n throws Exception {\n\n String sentence = (String) msg;\n\n // Send response #1\n if (sentence.contains(\"##\")) {\n if (channel != null) {\n channel.write(\"LOAD\");\n }\n return null;\n }\n\n // Send response #2\n if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) {\n if (channel != null) {\n channel.write(\"ON\");\n }\n return null;\n }\n\n // Parse message\n Matcher parser = pattern.matcher(sentence);\n if (!parser.matches()) {\n if(log.isInfoEnabled())\n log.info(\"Parse failed, message: \" + sentence);\n return null;\n }\n\n // Create new position\n PositionData position = new PositionData();\n \n Integer index = 1;\n\n // Get device by IMEI\n String imei = parser.group(index++);\n position.setUdid(imei);\n\n String alarm = parser.group(index++);\n \n // Date\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n time.clear();\n time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);\n time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));\n \n int localHours = Integer.valueOf(parser.group(index++));\n int localMinutes = Integer.valueOf(parser.group(index++));\n \n int utcHours = Integer.valueOf(parser.group(index++));\n int utcMinutes = Integer.valueOf(parser.group(index++));\n\n // Time\n time.set(Calendar.HOUR, localHours);\n time.set(Calendar.MINUTE, localMinutes);\n time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MILLISECOND, Integer.valueOf(parser.group(index++)));\n \n // Timezone calculation\n int deltaMinutes = (localHours - utcHours) * 60 + localMinutes - utcMinutes;\n if (deltaMinutes <= -12 * 60) {\n deltaMinutes += 24 * 60;\n } else if (deltaMinutes > 12 * 60) {\n deltaMinutes -= 24 * 60;\n }\n time.add(Calendar.MINUTE, -deltaMinutes);\n position.setTime(time.getTime());\n\n // Validity\n position.setValid(parser.group(index++).compareTo(\"A\") == 0 ? true : false);\n\n // Latitude\n Double latitude = Double.valueOf(parser.group(index++));\n latitude += Double.valueOf(parser.group(index++)) / 60;\n if (parser.group(index++).compareTo(\"S\") == 0) latitude = -latitude;\n position.setLatitude(latitude);\n\n // Longitude\n Double lonlitude = Double.valueOf(parser.group(index++));\n lonlitude += Double.valueOf(parser.group(index++)) / 60;\n String hemisphere = parser.group(index++);\n if (hemisphere != null) {\n if (hemisphere.compareTo(\"W\") == 0) lonlitude = -lonlitude;\n }\n position.setLongitude(lonlitude);\n\n // Altitude\n position.setAltitude(-1d);\n // Speed from knot to km\n position.setSpeed(1.852 * Double.valueOf(parser.group(index++)));\n\n // Course\n String course = parser.group(index++);\n if (course != null) {\n position.setCourse(Double.valueOf(course));\n } else {\n position.setCourse(-1d);\n }\n\n // Extended info from GPS103 protocol\n Map<String,Object> extendedInfo = position.getExtendedInfo();\n extendedInfo.put(\"protocol\", \"gps103\");\n // Alarm message\n if(alarm != null){\n \tif(alarm.indexOf(\"help me\") != -1){\n \t\t// it's emergency\n \t\tposition.setMessageType(2/*MESSAGE_TYPE_EMERGENCY*/);\n \t\tposition.setMessage(alarm);\n \t}else if(alarm.equalsIgnoreCase(\"tracker\")){\n \t\t// do nothing\n \t}else if(alarm.equalsIgnoreCase(\"speed\")){\n \t\tposition.setMessageType(1/*MESSAGE_TYPE_ALERT*/);\n \t\tposition.setMessage(\"Over Speed!\");\n \t}else if(alarm.equalsIgnoreCase(\"low battery\")){\n \t\tposition.setMessageType(1/*MESSAGE_TYPE_ALERT*/);\n \t\tposition.setMessage(\"Low Battery!\");\n \t}else{\n \t\tposition.setMessage(alarm);\n \t}\n }\n \n return position;\n }",
"public static void parseResponse(byte[] response) {\n int qr = ((response[2] & 0b10000000) >> 7);\n int opcode = ((response[2] & 0b01111000) >> 3);\n int aa = ((response[2] & 0b00000100) >> 2);\n int tc = ((response[2] & 0b00000010) >> 1);\n int rd = (response[2] & 0b00000001);\n int ra = ((response[3] & 0b10000000) >> 7);\n int res1 = ((response[3] & 0b01000000) >> 6);\n int res2 = ((response[3] & 0b00100000) >> 5);\n int res3 = ((response[3] & 0b00010000) >> 4);\n int rcode = (response[3] & 0b00001111);\n int qdcount = (response[4] << 8 | response[5]);\n int ancount = (response[6] << 8 | response[7]);\n int nscount = (response[8] << 8 | response[9]);\n int arcount = (response[10] << 8 | response[11]);\n/*\n System.out.println(\"QR: \" + qr);\n System.out.println(\"OPCODE: \"+ opcode);\n System.out.println(\"AA: \" + aa);\n System.out.println(\"TC: \" + tc);\n System.out.println(\"RD: \" + rd);\n System.out.println(\"RA: \" + ra);\n System.out.println(\"RES1: \" + res1);\n System.out.println(\"RES2: \" + res2);\n System.out.println(\"RES3: \" + res3);\n System.out.println(\"RCODE: \" + rcode);\n System.out.println(\"QDCOUNT: \" + qdcount);\n System.out.println(\"ANCOUNT: \" + ancount);\n System.out.println(\"NSCOUNT: \" + nscount);\n System.out.println(\"ARCOUNT: \" + arcount);\n*/\n // WHO DESIGNED THE DNS PACKET FORMAT AND WHY DID THEY ADD POINTERS?!?\n HashMap<Integer, String> foundLabels = new HashMap<>();\n\n int curByte = 12;\n for(int i = 0; i < qdcount; i++) {\n ArrayList<Integer> currentLabels = new ArrayList<>();\n while(true) {\n if((response[curByte] & 0b11000000) != 0) {\n // Labels have a length value, the first two bits have to be 0.\n System.out.println(\"ERROR\\tInvalid label length in response.\");\n System.exit(1);\n }\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n currentLabels.add(pntr);\n for(Integer n : currentLabels) {\n if(foundLabels.containsKey(n)) {\n foundLabels.put(n, foundLabels.get(n) + \".\" + working.toString());\n } else {\n foundLabels.put(n, working.toString());\n }\n }\n }\n\n // Increment curByte every time we use it, meaning it always points to the byte we haven't used.\n short qtype = (short) ((response[curByte++] << 8) | response[curByte++]);\n short qclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n }\n\n // This for loop handles all the Answer section parts.\n for(int i = 0; i < ancount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n // If it is an A record\n if(type == 1) {\n\n // If it is an invalid length\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n\n // Output the IP record\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tnonauth\");\n }\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte++] & 0xFF;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte] & 0xff;\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tnonauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tnonauth\");\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tnonauth\");\n }\n }\n\n for(int i = 0; i < nscount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n if(type == 1) {\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tauth\");\n }\n // If CNAME\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tauth\");\n\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tauth\");\n }\n }\n }",
"void onMessageRead(byte[] data);",
"public void processMessage( String from, Object[] data )\n {\n\t\tif( data.length > 0 )\n\t\t{\n\t\t\tif( data[0].equals( \"PA\" ) )\n\t\t\t{\n\t\t\t\tdouble x = ((Number)data[2]).doubleValue();\n\t\t\t\tdouble y = ((Number)data[3]).doubleValue();\n\t\t\t\tdouble z = ((Number)data[4]).doubleValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleAdded( data[1], x, y, z );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PAC\" ) )\n\t\t\t{\n\t\t\t\tString attribute = (String) data[2];\n\t\t\t\tboolean removed = (Boolean) data[4];\n\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleAttributeChanged( data[1], attribute, data[3], removed );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PM\" ) )\n\t\t\t{\n\t\t\t\tdouble x = ((Number)data[2]).doubleValue();\n\t\t\t\tdouble y = ((Number)data[3]).doubleValue();\n\t\t\t\tdouble z = ((Number)data[4]).doubleValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleMoved( data[1], x, y, z );\n\t\t\t}\n\t\t\telse if( data[0].equals( \"PR\" ) )\n\t\t\t{\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.particleRemoved( data[1] );\t\t\t\t\n\t\t\t}\n\t\t\telse if( data[0].equals( \"SF\" ) )\n\t\t\t{\n\t\t\t\tint time = ((Number)data[1]).intValue();\n\t\t\t\t\n\t\t\t\tfor( ParticleBoxListener listener: listeners )\n\t\t\t\t\tlistener.stepFinished( time );\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// What to do ?\n\n\t\t\t\tif( data.length > 0 && data[0] instanceof String )\n\t\t\t\t\tthrow new RuntimeException( \"ParticleBoxListenerProxy: uncaught message from \"+\n\t\t\t\t\t from+\" : \"+data[0]+\"[\"+ data.length+\"]\" );\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException( \"ParticleBoxListenerProxy: uncaught message from \"+\n\t\t\t\t\t from+\" : [\"+data.length+\"]\" );\n\t\t\t}\n\t\t}\t \n }",
"public void processMessage(byte[] message) {\n try {\n Object receivedMessage = Serializer.deserialize(message);\n processMessage(receivedMessage);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public void handlePacket(byte[] data, InetAddress address, int port){\n\t\tString message = new String(data);\n\t\tPacketType type = lookupPacketType(message);\n\t\tString [] strData = message.substring(2).split(\",\");\n\t\t\n\t\t//server.display(\"Decompiled data: \" + type + \" \"+ Arrays.toString(strData));\n\n\t\tswitch(type){\n\t\t\tdefault:\n\t\t\tcase INVALID:\n\t\t\t\tbreak;\n\t\t\tcase LOGIN: \n\t\t\t\tlogin(strData[0],address,port);\n\t\t\t\tserver.sendDataAll(writePacket(PacketType.LOGIN, strData[0], \"\"), strData[0]);\n\t\t\t\tbreak;\n\t\t\tcase DISCONNECT: \n\t\t\t\tdisconnect(strData[0]);\n\t\t\t\tserver.sendDataAll(writePacket(PacketType.DISCONNECT, strData[0], \"\"), strData[0]);\n\t\t\t\tbreak;\n\t\t\tcase RESTART: restart(strData[0],strData[1]);\n\t\t\t\t\t\t //server.display(\"received restart from \" + strData[0] + \": \" + strData[1]);\n\t\t\t\tbreak;\n\t\t\tcase MOVE: \n\t\t\t\tmove(strData[0], strData[1], strData[2]);\n\t\t\t\tserver.sendDataAll(writePacket(PacketType.MOVE, strData[0], strData[1] + \",\" + strData[2]),strData[0]);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"private void parseData() {\n\t\t\r\n\t}",
"public Packet parse(final int[] data) {\n int protocol = (data[0] << 8) | data[1];\n int[] payload = Arrays.copyOfRange(data, 2, data.length);\n PacketFactory factory = this.packetFactories.get(protocol);\n return factory.create(payload);\n }",
"@Test\n public void TestConnectionEventFromBytes() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n ConnectionEvent deserializedEvent = new ConnectionEvent(connectionEvent.Bytes()); // Deserialize\n\n ConnectionEvent testDeserializedEvent = new ConnectionEvent(new byte[0]); // Deserialize\n\n assertTrue(\"invalid deserialized connection event must be null\", testDeserializedEvent.Type == null); // Ensure null\n\n assertTrue(\"deserialized connection event must be equivalent to raw connection event\", Arrays.equals(connectionEvent.Bytes(), deserializedEvent.Bytes())); // Ensure equivalent\n }",
"public void parse(){\r\n\t\t//StringTokenizer st = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tst = new StringTokenizer(nmeaSentence,\",\");\r\n\t\tString sv = \"\";\r\n\r\n\t\ttry{\r\n\t\t\tnmeaHeader = st.nextToken();//Global Positioning System Fix Data\r\n\t\t\tmode = st.nextToken();\r\n\t\t\tmodeValue = Integer.parseInt(st.nextToken());\r\n\r\n\t\t\tfor(int i=0;i<=11;i++){\r\n\t\t\t\tsv = st.nextToken();\r\n\t\t\t\tif(sv.length() > 0){\r\n\t\t\t\t\tSV[i] = Integer.parseInt(sv);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSV[i] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tPDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tHDOP = Float.parseFloat(st.nextToken());\r\n\t\t\tVDOP = Float.parseFloat(st.nextToken());\r\n\r\n\t\t}catch(NoSuchElementException e){\r\n\t\t\t//Empty\r\n\t\t}catch(NumberFormatException e2){\r\n\t\t\t//Empty\r\n\t\t}\r\n\r\n\t}",
"@Override\n protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {\n\n while (in.readableBytes() > 4) {\n \n int msg_len = in.readInt();\n TbaRpcByteBuffer msg = new TbaRpcByteBuffer(msg_len);\n msg.writeI32(msg_len);\n\n for (int i = 0; i < msg_len - 4; i++) {\n msg.writeByte(in.readByte());\n }\n\n TbaRpcEventParser parser = new TbaRpcEventParser(msg);\n TbaRpcHead header = parser.Head();\n\n log.info(\"Msg Type: {}\", header.getType());\n\n try {\n switch (header.getType()) {\n\n case RpcEventType.MT_CLIENT_PASSWORD_LOGIN_REQ: {\n TbaRpcProtocolFactory<ClientPasswordLoginReq> protocol = new TbaRpcProtocolFactory<ClientPasswordLoginReq>(msg);\n out.add(protocol.Decode(ClientPasswordLoginReq.class));\n }\n break;\n\n case RpcEventType.MT_SERVICE_REGISTER_REQ: {\n TbaRpcProtocolFactory<ServiceRegisterReq> protocol = new TbaRpcProtocolFactory<ServiceRegisterReq>(msg);\n out.add(protocol.Decode(ServiceRegisterReq.class));\n }\n break;\n\n case RpcEventType.MT_SERVICE_LIST_REQ: {\n TbaRpcProtocolFactory<ServiceListReq> protocol = new TbaRpcProtocolFactory<ServiceListReq>(msg);\n out.add(protocol.Decode(ServiceListReq.class));\n }\n break;\n\n case RpcEventType.MT_SERVICE_LIST_CHANGE_RES: {\n TbaRpcProtocolFactory<ServiceListSyncRes> protocol = new TbaRpcProtocolFactory<ServiceListSyncRes>(msg);\n out.add(protocol.Decode(ServiceListSyncRes.class));\n }\n break;\n\n case RpcEventType.MT_SERVICE_QUALITY_SYNC_REQ: {\n TbaRpcProtocolFactory<ServiceInfo> protocol = new TbaRpcProtocolFactory<ServiceInfo>(msg);\n out.add(protocol.Decode(ServiceInfo.class));\n }\n break;\n\n\n default:\n break;\n }\n }\n catch(TbaException e){\n log.error(e.getLocalizedMessage(), e);\n }\n catch(InstantiationException e){\n log.error(e.getLocalizedMessage(), e);\n }\n catch(IllegalAccessException e){\n log.error(e.getLocalizedMessage(), e);\n }\n }\n }",
"public LockssReceivedDatagram(DatagramPacket packet) {\n this.packet = packet;\n }",
"byte[] getStructuredData(String messageData);",
"@Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }",
"public void packetReceived(Pdu packet);",
"void handlePacket(String devReplyStr);",
"public void handlePacket(byte[] bytes) {\n\t\tPacket packet = new Packet(bytes);\n\t\tpacket.parse();\n\t\t\n\t\tSystem.out.print(DATE_FORMAT.format(new Date()));\n\t\tSystem.out.print('\\t');\n\t\tSystem.out.print(packet.source);\n\t\tSystem.out.print('\\t');\n\t\tSystem.out.print(packet.destination);\n\t\tSystem.out.print('\\t');\n\t\tString[] path = packet.path;\n\t\t\n\t\tif (path != null) {\n\t\t\tboolean first = true;\n\t\t\tfor (String repeater : path) {\n\t\t\t\tif (!first) {\n\t\t\t\t\tSystem.out.print(',');\n\t\t\t\t}\n\n\t\t\t\tfirst = false;\n\t\t\t\tSystem.out.print(repeater);\n\t\t\t}\n\t\t}\n\n\t\tif (packet.payload != null) {\n\t\t\tSystem.out.print('\\t');\n\t\t\tSystem.out.println(new String(packet.payload));\n\t\t}\n\t}",
"public void parseCommand(byte command) throws Exception {\r\n\r\n\t switch(command){\r\n\t case Constants.ROTATE_LEFT:\r\n\t rotateLeft();\r\n\t break;\r\n\t case Constants.ROTATE_RIGHT:\r\n\t rotateRight();\r\n\t break;\r\n\t case Constants.MOVE:\r\n\t move();\r\n\t break;\r\n\t default:\r\n\t throw new Exception(\"Invalid signal\");\r\n\t }\r\n\t }",
"@Override\r\n public void onNewDatagram(SimpleAsciiProtocol.Datagram datagram) {\n }",
"public abstract void onPingReceived(byte[] data);",
"public static void handleMessage(CommerceProtos.Message m, Handler handler) throws InvalidProtocolBufferException {\n CommerceProtos.Event e = m.getData();\n\n switch (e.getType()) {\n case UNKNOWN:\n break;\n case CUSTOMER_CREATED:\n handler.handleCustomerCreated(m, e.getCustomerCreated());\n break;\n case SITE_CREATED:\n handler.handleSiteCreated(m, e.getSiteCreated());\n break;\n case CART_CREATED:\n handler.handleCartCreated(m, e.getCartCreated());\n break;\n case PRODUCT_CREATED:\n handler.handleProductCreated(m, e.getProductCreated());\n break;\n case PRODUCT_ADD_TO_CART:\n handler.handleProductAddToCart(m, e.getProductAddToCart());\n break;\n case CART_SUCCESSFUL_CHECKOUT:\n handler.handleCartSuccessfulCheckout(m, e.getCartSuccessfulCheckout());\n break;\n default:\n throw new RuntimeException(String.format(\"Unknown event: %s\", printer.print(e)));\n }\n }",
"private void decode_message(String receivedMessage) {\n String[] messageComponents = receivedMessage.split(\"##\");\n String actionName = messageComponents[0];\n int actionType = caseMaps.get(actionName);\n\n switch (actionType) {\n case 1:\n String nodeToConnect = messageComponents[1];\n break;\n case 2:\n String receivedPrevNode = messageComponents[1].split(\"&&\")[0];\n String receivedNextNode = messageComponents[1].split(\"&&\")[1];\n break;\n case 3:\n String key = messageComponents[1].split(\"&&\")[0];\n String value = messageComponents[1].split(\"&&\")[1];\n insertIntoDB(key,value);\n break;\n case 4:\n String portRequested = messageComponents[1].split(\"&&\")[0];\n String AllMessages = messageComponents[1].split(\"&&\")[1];\n break;\n case 5:\n String portRequestedSelect = messageComponents[1].split(\"&&\")[0];\n String selection = messageComponents[1].split(\"&&\")[1];\n break;\n case 6:\n String selectionDelete = messageComponents[1];\n DeleteKeys(selectionDelete);\n break;\n default:\n }\n\n }",
"@Override\n\tpublic void decodeMsg(byte[] message) {\n\t\t\n\t\tIoBuffer buf = IoBuffer.allocate(message.length).setAutoExpand(true);\n\t\tbuf.put(message);\n\t\tbuf.flip();\n\t\t\n\t\tslaveId = buf.get();\n\t\tcode = buf.get();\n\t\toffset = buf.getShort();\n\t\tdata = buf.getShort();\n\n\t\tif(buf.remaining() >= 2)\n\t\t\tcrc16 = buf.getShort();\n\t}",
"public void handleGamePacket(GameTransportPacket packet) {\n ProtocolObject gamePacket;\r\n gamePacket = styxDecoder.unpack(ByteBuffer.wrap(packet.gamedata));\r\n gamePacket.accept(this);\r\n }",
"public void handleMessage(Message message, DatagramSocket socket, DatagramPacket packet) throws HandlingException, IOException, ClassNotFoundException;",
"public void worldDataPacketReceived(int packetType, int serialPrefix, int serialNumber, int[] data, long timeMilli);",
"public static Packet deserialize(String data) {\n\t\t\tString hex = data.substring(0, 4);\n\t\t\tString dat = data.substring(4);\n\t\t\treturn new Packet(dat, hex);\n\t\t}",
"public void parseGPSData(){\n List<String> coordData = new ArrayList<String>();\n for (int i = 6; i < currentMessage.size(); i++){\n // Convert to int to rid ourselves of preceding zeros. Yes, this is bad.\n coordData.add(\n String.valueOf(\n Integer.parseInt(\n bcdToStr(currentMessage.get(i))\n )\n )\n );\n }\n\n String latitudeNorthSouth = (\n bcdToIntString(coordData.get(3)).charAt(1) == '0'\n ) ? \"N\" : \"S\";\n \n String longitudeEastWest = (\n bcdToIntString(coordData.get(8)).charAt(1) == '0'\n ) ? \"E\" : \"W\";\n \n triggerCallback(\"onUpdateGPSCoordinates\",\n String.format(\n \"%.4f%s%s %.4f%s%s\", \n //Latitude\n decimalMinsToDecimalDeg(\n coordData.get(0), coordData.get(1), coordData.get(2)\n ),\n (char) 0x00B0,\n latitudeNorthSouth,\n //Longitude\n decimalMinsToDecimalDeg(\n coordData.get(4) + coordData.get(5),\n coordData.get(6),\n coordData.get(7)\n ),\n (char) 0x00B0,\n longitudeEastWest\n )\n );\n \n // Parse out altitude data which is in meters and is stored as a byte coded decimal\n int altitude = Integer.parseInt(\n bcdToStr(currentMessage.get(15)) + bcdToStr(currentMessage.get(16))\n );\n\n triggerCallback(\"onUpdateGPSAltitude\", altitude);\n \n // Parse out time data which is in UTC\n String gpsUTCTime = String.format(\n \"%s:%s\",\n bcdToIntString(bcdToStr(currentMessage.get(18))),\n bcdToIntString(bcdToStr(currentMessage.get(19)))\n );\n \n triggerCallback(\"onUpdateGPSTime\", gpsUTCTime);\n }",
"public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }",
"public void received(Message message){\n super.received(message);\n switch(message.getOpcode()){\n case 13:\n messageList.addElevatorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 14:\n messageList.addFloorButtonTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 15:\n messageList.addArrivalTime(((TelemetryMessage) message).getNanoSecondTime());\n break;\n case 17:\n \tTelemetryFloorButtonMessage telemetryFloorButtonMessage = (TelemetryFloorButtonMessage)message;\n \ttelemetryArrivalMap.addFloorBtnPressTime(telemetryFloorButtonMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryFloorButtonMessage.getNanoSecondTime());\n \tbreak;\n case 18:\n \tTelemetryFloorArrivalMessage telemetryFloorArrivalMessage = (TelemetryFloorArrivalMessage)message;\n \ttelemetryArrivalMap.addFloorArrivalTime(telemetryFloorArrivalMessage.getDirection(), \n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getFloor(),\n \t\t\t\t\t\t\t\t\t\t\ttelemetryFloorArrivalMessage.getNanoSecondTime());\n \tbreak;\n case 19:\n \tTelemetryElevatorButtonMessage telemetryElevBtnMsg = (TelemetryElevatorButtonMessage)message;\n \tSystem.out.println(\"Recieved temetry elevator button message\");\n \ttelemetryArrivalMap.addElevatorButnPressTime(telemetryElevBtnMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t\t telemetryElevBtnMsg.getNanoSecondTime());\n \tbreak;\n case 20:\n \tTelemetryElevatorArrivalMessage telemetryElevArvMsg = (TelemetryElevatorArrivalMessage)message;\n \ttelemetryArrivalMap.addElevatorArrivalTime(telemetryElevArvMsg.getElevatorId(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getFloor(), \n \t\t\t\t\t\t\t\t\t\t\t telemetryElevArvMsg.getNanoSecondTime());\n \tbreak;\n }\n }",
"void interpretMessage(final Message message);",
"@Test\n public void firstReceivedPacket() throws Exception {\n int[] receivedPacket = Utils.stringToHexArr(\"600000000018fd3e2001067c2564a170\"\n + \"020423fffede4b2c2001067c2564a125a190bba8525caa5f\"\n + \"1e1e244cf8b92650000000016012384059210000020405a0\");\n packet = new Packet(receivedPacket);\n String expectedData = \"020405a0\";\n long expectedSeqNumber = 4172883536L;\n\n assertEquals(expectedData,packet.getData());\n assertEquals(60 + expectedData.length()/2,packet.getSize());\n assertEquals(Flag.SYN.value + Flag.ACK.value, packet.getFlags());\n assertEquals(expectedSeqNumber,packet.getSeqNumber());\n assertEquals(expectedSeqNumber + 1, packet.getNextSeqNumber());\n assertEquals(1,packet.getAckNumber());\n\n assertArrayEquals(receivedPacket,packet.getPkt());\n }",
"@Override\n public PacketCustomPayload decode(PacketBuffer buffer) throws IOException {\n PacketCustomPayload packet = new PacketCustomPayload();\n return packet;\n }",
"public PacketExtension parseExtension(XmlPullParser parser)\r\n\tthrows Exception {\r\n\t\t//String receiver = parser.getAttributeValue(null, \"to\");\r\n\t\tString action = parser.getAttributeValue(null, \"action\");\r\n\t\tString session = parser.getAttributeValue(null, \"session\");\r\n\t\tString spackage = parser.getAttributeValue(null, \"package\");\r\n\t\tString sclass = parser.getAttributeValue(null, \"class\");\r\n\t\t//proceed to the next start tag (the data) or end tag ('application' tag closes without data).\r\n\t\tparser.next();\r\n\t\tint event = parser.getEventType();\r\n\t\twhile((event != XmlPullParser.START_TAG) && (event != XmlPullParser.END_TAG)){\r\n\t\t\t//proceed to the next tag\r\n\t\t\tevent = parser.next();\r\n\t\t}\r\n\t\t\r\n\t\tParameter data = (Parameter) ParameterManager.getInstance().parseXml(parser);\r\n\t\tEpicPacketExtension messageEvent = null;\r\n\t\tif( (data==null) || (data.getType()==null) || (!data.getType().equalsIgnoreCase(Parameter.TYPENAME_MAP)) ){\r\n\t\t\t//don't attach the data\r\n\t\t\tmessageEvent = new EpicPacketExtension(action, session, spackage, sclass, null);\r\n\t\t} else {\r\n\t\t\t//attach the data\r\n\t\t\tmessageEvent = new EpicPacketExtension(action, session, spackage, sclass, (ParameterMap)data);\r\n\t\t}\r\n\t\treturn messageEvent;\r\n\t}",
"public void packetReceived(NIOSocket socket, byte[] packet)\n {\n String message = new String(packet).trim();\n\n // Ignore empty lines\n if (message.length() == 0) return;\n\n // Reset inactivity timer.\n scheduleInactivityEvent();\n\n // In this protocol, the first line entered is the name.\n if (m_name == null)\n {\n // User joined the chat.\n m_name = message;\n System.out.println(this + \" logged in.\");\n m_server.broadcast(this, m_name + \" has joined the chat.\");\n m_socket.write((\"Welcome \" + m_name + \". There are \" + m_server.m_users.size() + \" user(s) currently logged in.\").getBytes());\n return;\n }\n m_server.broadcast(this, m_name + \": \" + message);\n }",
"public FeedEvent processMessage(DdfMarketBase msg) {\n\t\tif (msg == null) {\n\t\t\t// sanity check\n\t\t\treturn null;\n\t\t}\n\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"processMessage: \" + msg);\n\t\t}\n\n\t\t/*\n\t\t * Can contain Quotes, Book, and a series of Market Events. Always\n\t\t * return the DDF message even if we can't process it by this class. The\n\t\t * TCP and UDP Listen modes (which pushes data from the replay server)\n\t\t * just use the raw DDF Message.\n\t\t */\n\t\tFeedEvent fe = new FeedEvent();\n\t\t// Save RAW DDF Message\n\t\tfe.setDdfMessage(msg);\n\n\t\tif (_type == MasterType.EndOfDay) {\n\t\t\t// Do not process live messages if EOD cache.\n\t\t\treturn fe;\n\t\t}\n\n\t\t/*\n\t\t * Mark as an unknown symbol until we receive the refresh quote.\n\t\t */\n\t\tif (msg.getSymbol() != null && msg.getSymbol().length() > 0) {\n\t\t\tString s = msg.getSymbol();\n\t\t\tQuote quote = getQuote(s);\n\t\t\tif (quote == null) {\n\t\t\t\tunrecoginzedSymbols.put(s, System.currentTimeMillis());\n\t\t\t} else if (unrecoginzedSymbols.containsKey(s)) {\n\t\t\t\t// We have the quote, pull from the unrecognized list\n\t\t\t\tunrecoginzedSymbols.remove(s);\n\t\t\t}\n\t\t}\n\n\t\t// //////////////////////////////////////////////////////////\n\t\t// //////////////////////////////////////////////////////////\n\t\t// Process based on Record Type (Message Type)\n\t\t// ///////////////////////////////////////////////////////////\n\t\t// ///////////////////////////////////////////////////////////\n\t\tif (msg.getRecord() == DdfRecord.Timestamp.value()) {\n\t\t\t// /////////////////////////////\n\t\t\t// TimeStamp Beacon\n\t\t\t// TIME!ZONE\n\t\t\t// ///////////////////////////\n\t\t\tmillisCST = ((DdfTimestamp) msg).getMillisCST();\n\t\t\tDate d = new Date(millisCST);\n\t\t\tfe.setDate(d);\n\n\t\t} else if (msg.getRecord() == DdfRecord.RefreshOld.value()) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = % - Older Refresh Message, not Used\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t} else if (msg.getRecord() == DdfRecord.RefreshXml.value()) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = X - Market Data Refresh Messages from Jerq, in XML\n\t\t\t// format\n\t\t\t// ///////////////////////////////////////////////////////////\n\t\t\trecordX_marketRefresh(msg, fe);\n\n\t\t} else if ((msg.getRecord() == '2') || (msg.getRecord() == 'C')) {\n\t\t\t// /////////////////////////////////////////////////////////\n\t\t\t// record = 2 live prices\n\t\t\t// ///////////////////////////////////////////////////////////\n\t\t\t/*\n\t\t\t * If the message is a Trade, set here in order for the\n\t\t\t * ExchangeTradeHandler to be called, regardless if there is a quote\n\t\t\t * available or not.\n\t\t\t */\n\n\t\t\tif (msg instanceof DdfMarketTrade) {\n\t\t\t\tfe.setTrade((DdfMarketTrade) msg);\n\t\t\t}\n\n\t\t\tfinal Quote quote = getQuote(msg.getSymbol());\n\t\t\tif (quote == null) {\n\t\t\t\t/*\n\t\t\t\t * Initial Quote refresh not received yet, get snapshot refresh\n\t\t\t\t * from the web service. Until we receive the snapshot we will\n\t\t\t\t * not call the QuoteHandler.\n\t\t\t\t */\n\t\t\t\tif (feedService != null) {\n\t\t\t\t\t// Schedule the refresh\n\t\t\t\t\tfeedService.scheduleQuoteRefresh(msg.getSymbol());\n\t\t\t\t}\n\t\t\t\treturn fe;\n\t\t\t}\n\t\t\t/*\n\t\t\t * Process record 2, since the symbol is in the system and we have\n\t\t\t * the refresh quote. The Quote object will be updated.\n\t\t\t */\n\t\t\trecord2_liveprices(msg, quote, fe);\n\t\t\tfe.setQuote(quote);\n\t\t\treturn fe;\n\n\t\t} else if (msg.getRecord() == DdfRecord.DepthEndOfDay.value()) {\n\t\t\t// ////////////////////////////////////////////\n\t\t\t// record 3 Market Depth, End of Day\n\t\t\t// ///////////////////////////////////////////\n\t\t\tBookQuote b = record3_book_eod(msg);\n\t\t\tfe.setBook(b);\n\t\t} else {\n\t\t\tlog.warn(\"Unrecognized DDF Message: \" + msg);\n\t\t}\n\n\t\treturn fe;\n\t}",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.processRequest(e);\n }",
"void onDataReceived(int source, byte[] data);",
"private interface PacketHandler{\n\t\tpublic void onPacket(ByteBuffer data) throws Exception;\n\t}",
"public void onDataReceived(byte[] data, String message) {\n }",
"private DAPMessage constructFrom(DatabaseTableRecord record) {\n return DAPMessage.fromXML(record.getStringValue(CommunicationNetworkServiceDatabaseConstants.DAP_MESSAGE_DATA_COLUMN_NAME));\n }",
"@Override\n public void readFields(DataInput in) throws IOException {\n eventType = EventType.values()[in.readShort()];\n // the timestamp\n stamp = in.readLong();\n // the encoded name of the region being transitioned\n regionName = Bytes.readByteArray(in);\n // remaining fields are optional so prefixed with boolean\n // the name of the regionserver sending the data\n if (in.readBoolean()) {\n byte [] versionedBytes = Bytes.readByteArray(in);\n this.origin = ServerName.parseVersionedServerName(versionedBytes);\n }\n if (in.readBoolean()) {\n this.payload = Bytes.readByteArray(in);\n }\n }",
"public interface EventListener\n{\n\n /**\n * This method is called when data is received from the DMM.\n *\n * <p>\n * More specifically, the received packet must be valid, then decoded, then the Data Object is updated, *then* this method is called.\n */\n public void dataUpdateEvent();\n\n}",
"public EventCommand eventParse(String desc) throws DukeException {\n if (desc.equals(\"\")) {\n throw new DukeException(MISSING_TASK_DESCRIPTION_MESSAGE);\n }\n try {\n String[] descSplit = desc.split(\"(\\\\s+)/at(\\\\s+)\");\n String dateAndTime = descSplit[1];\n String[] dateAndTimeSplit = dateAndTime.split(\"\\\\s+\");\n String date = dateAndTimeSplit[0];\n String time = dateAndTimeSplit[1];\n return new EventCommand(descSplit[0], date, time);\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new DukeException(INVALID_EVENT_FORMAT);\n }\n\n }",
"private void parserReciverMsg(String msg){\n String deviceMsg=null;\n\n if (!msg.startsWith(\"{\"))\n return;\n try {\n deviceMsg=new JSONObject(msg).getString(\"MSG\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n return;\n }\n if (deviceMsg==null)\n return;\n if (deviceMsg.equals(\"logout\"))\n return;\n if (deviceMsg.startsWith(\"upgrade\"))\n return;\n if (!deviceMsg.startsWith(\"SWITCH\"))\n return;\n\n String[] deviceInfoT = deviceMsg.split(\",\");\n Map<String,String> deviceInfo=new HashMap<>();\n String key=\"\";\n String value=\"\";\n for(int i=0;i<deviceInfoT.length;i++){\n key=deviceInfoT[i].substring(0,deviceInfoT[i].lastIndexOf(\":\"));\n value=deviceInfoT[i].substring(deviceInfoT[i].lastIndexOf(\":\") + 1);\n deviceInfo.put(key,value);\n }\n\n devSWITCH=deviceInfo.get(\"SWITCH\").equals(\"1\");\n if (devSWITCH!=mSeekCircle.isStart()){\n refreshDeviceImg(devSWITCH);\n }\n setTextMsg(deviceInfo.get(\"CURRENTTEMP\")+\"℃\\n当前温度\",txtCurT);\n setTextMsg(deviceInfo.get(\"SETTEMP\")+\"℃\\n设置温度\",txtSettingT);\n mSeekCircle.setProgress(Integer.parseInt(deviceInfo.get(\"CURRENTTEMP\")));\n\n String[] timeStart_1=deviceInfo.get(\"TIMER1OPEN\").split(\"\\\\.\");\n txtTimerStart[0].setText(timeStart_1[1]+\":\"+timeStart_1[2]);\n timerStartMap.put(\"0hh\",Integer.parseInt(timeStart_1[1]));\n timerStartMap.put(\"0mm\",Integer.parseInt(timeStart_1[2]));\n\n if (timeStart_1[0].equals(\"1\")){\n if (!tbTimeOpen[0].isToggleOn())\n tbTimeOpen[0].setToggleOn();\n }else {\n if (tbTimeOpen[0].isToggleOn())\n tbTimeOpen[0].setToggleOff();\n }\n\n String[] timeStart_2=deviceInfo.get(\"TIMER2OPEN\").split(\"\\\\.\");\n txtTimerStart[1].setText(timeStart_2[1]+\":\"+timeStart_2[2]);\n timerStartMap.put(\"1hh\",Integer.parseInt(timeStart_2[1]));\n timerStartMap.put(\"1mm\",Integer.parseInt(timeStart_2[2]));\n if (timeStart_2[0].equals(\"1\")){\n if (!tbTimeOpen[1].isToggleOn())\n tbTimeOpen[1].setToggleOn();\n }else {\n if (tbTimeOpen[1].isToggleOn())\n tbTimeOpen[1].setToggleOff();\n }\n\n String[] timeEnd_1=deviceInfo.get(\"TIMER1CLOSE\").split(\"\\\\.\");\n txtTimerEnd[0].setText(timeEnd_1[1]+\":\"+timeEnd_1[2]);\n timerEndMap.put(\"0hh\",Integer.parseInt(timeEnd_1[1]));\n timerEndMap.put(\"0mm\",Integer.parseInt(timeEnd_1[2]));\n if (timeEnd_1[0].equals(\"1\")){\n if (!tbTimeStop[0].isToggleOn())\n tbTimeStop[0].setToggleOn();\n }else {\n if (tbTimeStop[0].isToggleOn())\n tbTimeStop[0].setToggleOff();\n }\n\n String[] timeEnd_2=deviceInfo.get(\"TIMER2CLOSE\").split(\"\\\\.\");\n txtTimerEnd[1].setText(timeEnd_2[1]+\":\"+timeEnd_2[2]);\n timerEndMap.put(\"1hh\",Integer.parseInt(timeEnd_2[1]));\n timerEndMap.put(\"1mm\",Integer.parseInt(timeEnd_2[2]));\n if (timeEnd_2[0].equals(\"1\")){\n if (!tbTimeStop[1].isToggleOn())\n tbTimeStop[1].setToggleOn();\n }else {\n if (tbTimeStop[1].isToggleOn())\n tbTimeStop[1].setToggleOff();\n }\n faultmsg= deviceInfo.get(\"FAULTMSG\");\n if (faultmsg.equals(\"E00\")||faultmsg.equals(\"E00|E00\")){//正常\n layoutErr.setVisibility(View.INVISIBLE);\n }else {\n if (faultmsg.contains(\"|\")){\n String[] faults = faultmsg.split(\"\\\\|\");\n// L.MyLog(TAG,\"设备故障:faults:\"+faults[0]+\"-----\"+faults[1]);\n if (faults[0].equals(\"E00\")){\n faultmsg=faults[1];\n }\n if (faults[1].equals(\"E00\")){\n faultmsg=faults[0];\n }\n }\n\n M_Dev_Err dererr = dbDeviceErrManager.getErr(devHexId, faultmsg);\n long t=0;\n if (dererr!=null)\n t=(System.currentTimeMillis()-dererr.getErrDoneTime())/1000;\n L.MyLog(TAG,\"设备故障:\"+t+\"----\"+faultmsg);\n if (dererr==null){\n dererr = new M_Dev_Err();\n dererr.setErrCode(faultmsg);\n dererr.setErrTime(System.currentTimeMillis());\n dererr.setErrDoneTime(0);\n dererr.setErrDevIdHex(devHexId);\n dbDeviceErrManager.addErr(dererr);\n layoutErr.setVisibility(View.VISIBLE);\n }else if (t>30*30){\n layoutErr.setVisibility(View.VISIBLE);\n }else {\n layoutErr.setVisibility(View.INVISIBLE);\n }\n\n }\n\n }",
"String processDataFromSocket(String data, long fromId);",
"protected void parse(byte[] data) {\n version = data[0];\n flags = new byte[3];\n flags[0] = data[1];\n flags[1] = data[2];\n flags[2] = data[3];\n\n url = new String(data, 4, data.length - 4);\n }",
"@Override\n\tpublic MapDataMessage decode(ChannelBuffer buffer) {\n\t\tint constant = buffer.readShort();\n\t\tint id = buffer.readShort();\n\t\tint length = buffer.readUnsignedByte();\n\t\tbyte[] data = new byte[length];\n\t\tbuffer.readBytes(data);\n\t\treturn new MapDataMessage(id, data);\n\t}",
"protected void ProcessOutboundEvent(XMSEvent evt){\n switch(evt.getEventType()){\n case CALL_CONNECTED:\n System.out.println(\"***** Outbound call connected *****\");\n SetOutboundCallState(OutboundCallStates.CALLCONNECTED);\n ConnectCalls();\n break;\n case CALL_RECORD_END:\n \n break; \n case CALL_SENDDTMF_END:\n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break; \n case CALL_DTMF:\n \n System.out.println(\"***** outbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(\"DTMF_\" + evt.getData());\n \n break; \n case CALL_INFO:\n \n System.out.println(\"***** Outbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myInboundCall.SendInfo(evt.getData());\n\n break;\n case CALL_PLAY_END:\n //May need to do something here\n break;\n case CALL_DISCONNECTED: // The far end hung up will simply wait for the media\n System.out.println(\"***** outbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }",
"abstract void onMessage(byte[] message);",
"private void dispatch(byte[] packet)\n\t{\n\t\ttry\n\t\t{\n\t\t\tSPELLmessage smsg = SPELLmessageFactory.createMessage(packet);\n\t\t\tif (smsg != null)\n\t\t\t{\n\t\t\t\tString msgId = smsg.getSender() + \"-\" + smsg.getReceiver();\n\t\t\t\tif (smsg instanceof SPELLmessageResponse || smsg instanceof SPELLmessageError)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingResponse(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotify || smsg instanceof SPELLmessagePrompt)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageRequest)\n\t\t\t\t{\n\t\t\t\t\tmsgId += \":\" + smsg.getSequence();\n\t\t\t\t\tm_interface.incomingRequest(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageNotifyAsync || smsg instanceof SPELLmessageDisplay || smsg instanceof SPELLmessageOneway)\n\t\t\t\t{\n\t\t\t\t\tm_interface.incomingMessage(msgId, smsg);\n\t\t\t\t}\n\t\t\t\telse if (smsg instanceof SPELLmessageEOC)\n\t\t\t\t{\n\t\t\t\t\tLogger.warning(\"Received EOC from server\", Level.COMM, this);\n\t\t\t\t\tsetWorking(false);\n\t\t\t\t\tm_interface.commFailure(\"Connection lost\", \"Server sent EOC\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tString msg = \"CANNOT PROCESS MSG TYPE: \" + packet;\n\t\t\t\t\tSystem.err.println(msg);\n\t\t\t\t\tLogger.error(msg, Level.COMM, this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.err.println(packet);\n\t\t\tex.printStackTrace();\n\t\t\tLogger.error(ex.getLocalizedMessage(), Level.COMM, this);\n\t\t}\n\t}",
"public void handleFramePacket(byte[] ba)\r\n/* 212: */ throws IOException\r\n/* 213: */ {\r\n/* 214:172 */ Packet211TileDesc pkt = new Packet211TileDesc(ba);\r\n/* 215:173 */ pkt.subId = pkt.getByte();\r\n/* 216:174 */ readFromPacket(pkt);\r\n/* 217: */ }",
"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 }",
"private static EventData constructMessage(long sequenceNumber) {\n final HashMap<Symbol, Object> properties = new HashMap<>();\n properties.put(getSymbol(SEQUENCE_NUMBER_ANNOTATION_NAME.getValue()), sequenceNumber);\n properties.put(getSymbol(OFFSET_ANNOTATION_NAME.getValue()), String.valueOf(OFFSET));\n properties.put(getSymbol(PARTITION_KEY_ANNOTATION_NAME.getValue()), PARTITION_KEY);\n properties.put(getSymbol(ENQUEUED_TIME_UTC_ANNOTATION_NAME.getValue()), Date.from(ENQUEUED_TIME));\n\n final byte[] contents = \"boo\".getBytes(UTF_8);\n final Message message = Proton.message();\n message.setMessageAnnotations(new MessageAnnotations(properties));\n message.setBody(new Data(new Binary(contents)));\n\n return MESSAGE_SERIALIZER.deserialize(message, EventData.class);\n }",
"static SubackPacket parsePacket(final int messageLength, final ByteBuffer messageBuffer)\n throws MalformedPacketException {\n final int startPosition = messageBuffer.position();\n\n // Check the minimum packet length. There must be a packet identifier and at\n // least one return code.\n if (messageLength <= 2) {\n messageBuffer.position(startPosition + messageLength);\n throw new MalformedPacketException(\"Invalid minimum packet length\");\n }\n\n // Extract the packet ID field.\n final short packetIdField = messageBuffer.getShort();\n\n // Extract the return codes in the remaining message bytes.\n final LinkedList<QosPolicyType> returnCodes = new LinkedList<QosPolicyType>();\n while (messageBuffer.position() - startPosition != messageLength) {\n final QosPolicyType returnCode = QosPolicyType.getQosPolicyType(0xFF & messageBuffer.get());\n if (returnCode == null) {\n messageBuffer.position(startPosition + messageLength);\n throw new MalformedPacketException(\"Unsupported subscribe return code\");\n }\n returnCodes.add(returnCode);\n }\n return new SubackPacket(packetIdField, returnCodes);\n }",
"private String[] setPacket() throws IllegalAccessException\n\t{\n\n\t\tSystem.out.println(\"Please specify receiver address, port and message. Separate the input with | \" +\n\t\t\t\t\"\\n Eg: 192.0.0.1|8080|message1|message2 \" +\n\t\t\t\t\"\\n Waiting for user input:\");\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tif (scanner.hasNext())\n\t\t{\n\t\t\tString input = scanner.nextLine();\n\t\t\tString[] packetData = input.split(\"\\\\|\");\n\n\t\t\tif (isUserInputValid(packetData))\n\t\t\t{\n\t\t\t\tfor (int i = 2; i < packetData.length; i++)\n\t\t\t\t{\n\t\t\t\t\tString tempMessage = packetData[i];\n\t\t\t\t\tString messageWithHashCode = new String(tempMessage + \"$\" + tempMessage.hashCode()+\"$\");\n\t\t\t\t\tpacketData[i] = messageWithHashCode;\n\t\t\t\t}\n\t\t\t\treturn packetData;\n\t\t\t}\n\t\t\telse throw new IllegalArgumentException(\"Entered port or address is invalid.\");\n\t\t}\n\t\telse return null;\n\t}",
"public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState:\n String readMessage = (String) msg.obj; // msg.arg1 = bytes from connect thread\n ReceivedData.setData(readMessage);\n break;\n\n case handlerState1:\n tempSound = Boolean.parseBoolean((String) msg.obj);\n ReceivedData.setSound(tempSound);\n break;\n\n case handlerState5:\n if(\"ACK\".equals ((String) msg.obj ))\n ReceivedData.clearPPGwaveBuffer();\n break;\n\n }\n ReceivedData.Process();\n }",
"@Override\n\tpublic boolean onDeserialize(ByteBuffer buf) {\n\t\t\n\t\tframeNum = buf.getInt();\t// 4\n\t\tfX = buf.getShort();\t\t// 2\n\t\tfY = buf.getShort();\t\t// 2\n\t\tfZ = buf.getShort();\t\t// 2\n\t\tkeyPress = buf.get();\t\t// 1\n\t\t\n\t\treturn true;\n\t}",
"@Override\n\tpublic void processMessage(byte[] message) {\n\t}",
"@Override\n public void onMessage(String channel, String message) {\n if (redisHandler.isAuth()) redisHandler.getJedisPool().getResource().auth(redisHandler.getPassword());\n if (!channel.equalsIgnoreCase(redisHandler.getChannel())) return;\n\n executor.execute(() -> {\n String[] strings = message.split(\"///\");\n\n System.out.println(strings[1]);\n System.out.println(strings[0]);\n\n Object jsonObject = null;\n try {\n jsonObject = redisHandler.getGson().fromJson(strings[0], Class.forName(strings[1]));\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n RedisPacket redisPacket = (RedisPacket) jsonObject;\n\n if (redisPacket == null) {\n System.out.println(\"The redis packet received seems to be null!\");\n return;\n }\n\n redisPacket.onReceived();\n });\n }",
"private MessageType processMessage(MessageType message) {\n\t\tJSONObject messageJSON = (JSONObject) message;\n\t\tJSONObject timestamp = messageJSON.getJSONObject(\"timestamp\");\n\t\t\n\t\t//complete timestamp\n\t\tint globalState = messagequeue.size();\n\t\tDate nowDate = new Date();\n\t\tString globalClock = String.valueOf(nowDate.getTime());\n\t\ttimestamp.element(\"srn\", globalState);\n\t\ttimestamp.element(\"globalClock\", globalClock);\n\t\t\n\t\tmessageJSON.element(\"timestamp\", timestamp);\n\t\treturn (MessageType) messageJSON;\n\t}",
"public void deserialize(byte[] buf){\n int size = buf.length;\n ByteBuffer buffer = ByteBuffer.wrap(buf);\n msgType = buffer.getShort(0);\n byte[] srcIP_temp = new byte[15];\n System.arraycopy(buf, 2, srcIP_temp, 0, 15);\n String srcIP_str = new String(srcIP_temp);\n srcIP = srcIP_str.trim();\n srcPort = buffer.getInt(17);\n desCost = buffer.getFloat(21);\n byte[] desIP_temp = new byte[15];\n System.arraycopy(buf, 25, desIP_temp, 0, 15);\n String desIP_str = new String(desIP_temp);\n desIP = desIP_str.trim();\n desPort = buffer.getInt(40);\n int pos = 44;\n\n while(pos+45 < size) {\n byte[] des = new byte[21];\n byte[] hop = new byte[21];\n\n System.arraycopy(buf, pos, des, 0, 21);\n String nei = new String(des);\n nei = nei.trim();\n if(!nei.matches(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\\\.[0-9]+:[0-9]+\")){\n return;\n }\n\n float cost = buffer.getFloat(pos+21);\n\n System.arraycopy(buf, pos+25, hop, 0, 21);\n String firstHop = new String(hop);\n firstHop = firstHop.trim();\n if(!firstHop.matches(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\\\.[0-9]+:[0-9]+\")){\n return;\n }\n pos += 46;\n\n DistanceInfo item = new DistanceInfo(cost, firstHop);\n distanceVectors.put(nei, item);\n }\n }",
"@Override\n\tpublic void onPacketData(NetworkManager network, Packet250CustomPayload packet, Player player)\n\t{\n\n\t}",
"public void actionPerformed(ActionEvent e) {\n rcvdp = new DatagramPacket(buf, buf.length);\n \n try {\n // receive the DP from the socket:\n RTPsocket.receive(rcvdp);\n \n // create an RTPpacket object from the DP\n RTPpacket rtp_packet = new RTPpacket(rcvdp.getData(), rcvdp.getLength());\n // System.out.println(rtp_packet.PayloadType);\n \n if (rtp_packet.getpayloadtype() == 26) { // rtp\n \n // update statistics\n receive++;\n lost += rtp_packet.getsequencenumber() - lastSequencenumber - 1;\n lastSequencenumber = rtp_packet.getsequencenumber();\n \n \n // add receveid package to ArrayList\n fec_packet.rcvdata(rtp_packet);\n \n } else if (rtp_packet.getpayloadtype() == 127 && fecEnabled) { // fec\n \n fec_packet.rcvfec(rtp_packet);\n }\n \n if (rtp_packet.gettimestamp() > timecounter) {\n printstatistik(rtp_packet.gettimestamp());\n lasttimestamp = rtp_packet.gettimestamp();\n timecounter +=1000;\n }\n \n \n } catch (InterruptedIOException iioe) {\n } catch (IOException ioe) {\n System.out.println(\"Exception caught: \" + ioe);\n }\n \n if(timecounter==20999){\n timer1.stop();\n }\n }",
"public void run() {\n\t\tPacket p = new Packet(SOURCE_ID, DESTINATION_ID, -1);\r\n\t\tp.type = PacketType.DATA;\r\n\t\tp.nextId = SOURCE_ID;\r\n\t\tp.setRoutingName(this.getClass().getSimpleName());\r\n\t\t\r\n\t\tinit();\r\n\t\t// First event: source node receive pkt from upper layer\r\n\t\tEvent first_e = new Event(EventType.PACKETRECEIVE, SOURCE_ID, p, currentTime, -1);\r\n\t\taddEvent(first_e);\r\n\t\t\r\n\t\twhile(state == State.NOTFINISHED)\r\n\t\t{\t\r\n\t\t\tif(eventList.size() > MAX_EVENT_SIZE)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"!!! ERROR: Scheduler too long !!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif(eventId >= eventList.size())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"!!! EventListener Empty !!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tSystem.out.println(\"*****Lista eventi da eseguire *****\");\r\n\t\t\tfor(int i = eventId; i < eventList.size(); i++)\r\n\t\t\t\tSystem.out.println(\"Evento \"+i+\" - \"+eventList.get(i));\r\n\t\t\tSystem.out.println(\"***********\");\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t//System.out.println(\"event list size = \" + eventList.size());\r\n\t\t\te = eventList.get(eventId);\r\n\t\t\teventId++;\r\n\t\t\t\r\n\t\t\t// Node and time in which event happens\r\n\t\t\tcurrentNode = topo.get(e.nodeId);\r\n\t\t\tcurrentTime = e.time;\r\n\t\t\t\r\n\t\t\t// -------- PACKET IS BEING RECEIVED --------------------------------------------\r\n\t\t\tif(e.type == EventType.PACKETRECEIVE)\r\n\t\t\t{\t\t\t\r\n\t\t\t\tp = e.pkt;\r\n\t\t\t\tint nextId = p.nextId;\r\n\t\t\t\tif(!p.broad && currentNode.id != nextId) {\r\n\t\t\t\t\tSystem.out.println(\"SCHEDULER ERROR: current node is different than the node that received the packet.\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check nodes connectivity\r\n\t\t\t\tif(p.getFromId() > -1 && topo.get(p.getFromId()).distance(topo.get(nextId)) > topo.getRange())\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Connection bewteen nodes does not exists.\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treceive(p, topo.get(p.nextId));\r\n\t\t\t\t\r\n\t\t\t\t// DESTINATION REACHED - STOP\r\n\t\t\t\tif(p.type == PacketType.DATA && nextId == DESTINATION_ID) {\r\n\t\t\t\t\tstate = State.SUCCESS;\r\n\t\t\t\t\t//System.out.println(\"=== Packet delivered. Simulation STOP ===\");\r\n\t\t\t\t\thops = p.getHops();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t//packetSizes.add(calculatePacketSize());\r\n\t\t\t\t//trace.forward(topo.get(c_id), topo.get(nextNodeId), hops, calculatePacketSize(), state);\r\n\t\t\t\t\t\r\n\t\t\t\t// EXTRACT PACKET FROM EVENT\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t\t// -------- OTHER EVENT TYPES ----------------------------------------\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//TODO\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"@Override\n public void handle(AuthDataEvent event, Channel channel)\n {\n PacketReader reader = new PacketReader(event.getBuffer());\n ChannelBuffer buffer =ChannelBuffers.buffer(ByteOrder.LITTLE_ENDIAN, 1024);\n buffer.writeBytes(event.getBuffer());\n \n int ptype = buffer.readUnsignedShort();\n \n //Skip over the length field since it's checked in decoder\n reader.setOffset(2);\n\n int packetType = reader.readUnSignedShort();\n\n switch (packetType)\n {\n /*\n * Auth Request\n * 0\t ushort 52\n * 2\t ushort 1051\n * 4\t string[16]\t Account_Name\n * 20\t string[16]\t Account_Password\n * 36\t string[16]\t GameServer_Name\n */\n case PacketTypes.AUTH_REQUEST:\n String username = reader.readString(16).trim();\n String password = reader.readString(16).trim();\n String server = reader.readString(16).trim();\n\n //If valid forward to game server else boot them\n if (db.isUserValid(username, \"root\"))\n {\n byte []packet = AuthResponse.build(db.getAcctId(username), \"127.0.0.1\", 8080);\n \n event.getClient().getClientCryptographer().Encrypt(packet);\n \n ChannelBuffer buf = ChannelBuffers.buffer(packet.length);\n \n buf.writeBytes(packet);\n \n ChannelFuture complete = channel.write(buf);\n \n //Close the channel once packet is sent\n complete.addListener(new ChannelFutureListener() {\n\n @Override\n public void operationComplete(ChannelFuture arg0) throws Exception {\n arg0.getChannel().close();\n }\n });\n \n } else\n channel.close();\n \n \n MyLogger.appendLog(Level.INFO, \"Login attempt from \" + username + \" => \" + password + \" Server => \" + server);\n break;\n \n default:\n MyLogger.appendLog(Level.INFO, \"Unkown packet: ID = \" + packetType + new String(event.getBuffer())); \n break;\n }\n }",
"protected void handleRTPPacket(byte[] data, int offset, int length) {\r\n try {\r\n globalReceptionStats.addPacketRecd();\r\n globalReceptionStats.addBytesRecd(length);\r\n RTPHeader header = new RTPHeader(data, offset, length);\r\n long ssrc = header.getSsrc();\r\n Integer packetType = (Integer) ignoredStreams.get(new Long(ssrc));\r\n if (packetType != null) {\r\n if (packetType.intValue() != header.getPacketType()) {\r\n ignoredStreams.remove(new Long(ssrc));\r\n packetType = null;\r\n }\r\n }\r\n if (packetType == null) {\r\n RTPReceiveStream stream = \r\n (RTPReceiveStream) receiveStreams.get(new Long(ssrc));\r\n if (stream == null) {\r\n int type = header.getPacketType();\r\n Format format = (Format) formatMap.get(new Integer(type));\r\n if (format == null) {\r\n globalReceptionStats.addUnknownType();\r\n System.err.println(\"Unknown format identifier: \" \r\n + type);\r\n ignoredStreams.put(new Long(ssrc), new Integer(type));\r\n } else {\r\n RTPDataSource dataSource = \r\n new RTPDataSource(ssrc, format);\r\n stream = new RTPReceiveStream(dataSource, ssrc);\r\n receiveStreams.put(new Long(ssrc), stream);\r\n ReceiveStreamEvent event = new NewReceiveStreamEvent(\r\n this, stream);\r\n new ReceiveStreamNotifier(receiveStreamListeners, \r\n event);\r\n }\r\n }\r\n if (stream != null) {\r\n RTPDataSource dataSource = \r\n (RTPDataSource) stream.getDataSource();\r\n dataSource.handleRTPPacket(header, \r\n data, offset + header.getSize(), \r\n length - header.getSize());\r\n }\r\n }\r\n } catch (IOException e) {\r\n globalReceptionStats.addBadRTPkt();\r\n }\r\n }",
"void handleParsedRecord(SampleRecord record);",
"public ByteBuffer postParse(ByteBuffer byteBuffer);"
]
| [
"0.6778854",
"0.6678521",
"0.6598472",
"0.6436354",
"0.6335237",
"0.62761927",
"0.6182273",
"0.6136023",
"0.61008567",
"0.6073773",
"0.59732825",
"0.59210664",
"0.59060365",
"0.58740646",
"0.58169395",
"0.57959354",
"0.5769547",
"0.5718688",
"0.5696078",
"0.5694796",
"0.5673609",
"0.5657278",
"0.5613437",
"0.5605487",
"0.5600645",
"0.55989593",
"0.5597053",
"0.5593765",
"0.55926067",
"0.5589855",
"0.55842966",
"0.5580041",
"0.5561136",
"0.55506194",
"0.5528582",
"0.5528502",
"0.55271053",
"0.55189884",
"0.55107373",
"0.5508627",
"0.5508004",
"0.5500904",
"0.5475992",
"0.5456147",
"0.5454679",
"0.5451942",
"0.5440327",
"0.54359347",
"0.5405313",
"0.54031277",
"0.5390787",
"0.5378541",
"0.53769726",
"0.53648704",
"0.53622925",
"0.5355905",
"0.53549486",
"0.53518945",
"0.53476727",
"0.534526",
"0.5335121",
"0.5334967",
"0.53266245",
"0.53192145",
"0.5293223",
"0.5286962",
"0.5268829",
"0.52519697",
"0.52505827",
"0.52366346",
"0.52313113",
"0.52278996",
"0.5224529",
"0.52209175",
"0.52204",
"0.52200073",
"0.5216971",
"0.52129936",
"0.5212278",
"0.52104545",
"0.52066416",
"0.52016574",
"0.5193389",
"0.51906925",
"0.5186065",
"0.51818204",
"0.51811075",
"0.5177765",
"0.5176894",
"0.5173452",
"0.51670706",
"0.51645637",
"0.5163546",
"0.51552767",
"0.5146928",
"0.5141026",
"0.5139164",
"0.51322913",
"0.513161",
"0.51300734"
]
| 0.6313616 | 5 |
create a new account (w=insert a new row into table STU) insert fields are SNAME and SPASSWD | public static boolean creatAccount(String username, String passwd) {
if (dao.insertStu(username, passwd))
return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }",
"public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}",
"void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }",
"public static void createStudent(String username, String password) {\n\t\t\n\t\t//creating mariaDB connection and a Connection object to run queries on\n\t\tMariaDBConnection connect = new MariaDBConnection();\n\t\tConnection conn = null;\n\t\t\n\t\t//create insert query format\n\t\tString insertQuery = \"INSERT INTO loginquery (User, Password) VALUES (?, ?)\";\n\t\t\n\t\ttry {\n\t\t\t//creating a local instance of the connection object and a statement object\n\t\t\tconn = connect.getConnection();\n\t\t\t//creating an instance of prepareStatement, calling \n\t\t\t//prepareStatement method of connection object, with query as parameter\n\t\t\tPreparedStatement stmt = conn.prepareStatement(insertQuery);\n\t\t\t\n\t\t\t//setting the column values of the insert query\n\t\t\tstmt.setString(1, username);\n\t\t\tstmt.setString(2, password);\n\t\t\t\n\t\t\t//executing insert query\n\t\t\tstmt.executeUpdate();\t\t\t\n\t\t\t//close connection\n\t\t\tconn.close();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Insert failed\");\n\t\t}\n\t\t\t\t\n\t}",
"private void insertUser(String name, String password, int balance) throws SQLException {\n\t\tinsertUserStatement.clearParameters();\n\t\tinsertUserStatement.setString(1, name);\n\t\tinsertUserStatement.setString(2, password);\n\t\tinsertUserStatement.setInt(3, balance);\n\t\tinsertUserStatement.executeUpdate();\n\t}",
"void insertUser(String pseudo, String password, String email) throws SQLException;",
"public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}",
"public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"int insert(SsSocialSecurityAccount record);",
"public static String addUser(String name, String pass, String email, String fname, String lname, String account){\n String sql = \"insert into users(u_name,u_pass,u_email,u_fname,u_lname,u_accountnum) values ('\" + name + \"'\" + \",'\" + pass + \"'\" + \",'\"\n + email + \"'\" + \",'\" + fname + \"'\" + \",'\" + lname + \"'\" + \",'\" + account + \"')\";\n return sql;\n }",
"int insert(PasswdDo record);",
"public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }",
"public void addStaff(String name, String dob, String email, String number, String address, String password) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.STAFF \" + \"VALUES ('\" \n + name + \"', '\" + dob + \"', '\" \n + email + \"', '\" + number+ \"', '\" \n + address + \"', '\" + password + \"')\");\n\n }",
"public void createUserAccount(UserAccount account);",
"Account create();",
"AionAddress createAccount(String password);",
"int insert(UserPasswordDO record);",
"public void creatUser(String name, String phone, String email, String password);",
"public void addAccount(String user, String password);",
"int insert(SysUser record);",
"int insert(SysUser record);",
"@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}",
"public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"int insert(TmpUserPayAccount record);",
"private int createStudent(String firstname, String lastname, Role role, String username,\r\n\t\t\tString password, Level level, String period, boolean enabled) throws Exception\r\n\t{\r\n\t\tString query = \"INSERT INTO user \" +\r\n\t\t\t\t\"(firstname,lastname,role,username,password,level,period,enabled) VALUES \" +\r\n\t\t\t\t\"(?,?,?,?,?,?,?,?)\";\r\n\t\tConnection link = Database.getSingleton().getLink();\r\n\t\t\r\n\t\tif (link == null)\r\n\t\t\tthrow new Exception(\"Connection Failed!\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//create the prep stmt\r\n\t\t\tPreparedStatement stmt = link.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\t\r\n\t\t\t//bind variables\r\n\t\t\tstmt.setString(1, firstname);\r\n\t\t\tstmt.setString(2, lastname);\r\n\t\t\tstmt.setString(3, role.toString());\r\n\t\t\tstmt.setString(4, username);\r\n\t\t\tstmt.setString(5, password);\r\n\t\t\tstmt.setString(6, level.toString());\r\n\t\t\tstmt.setString(7, period);\r\n\t\t\tstmt.setBoolean(8, enabled);\r\n\t\t\t\r\n\t\t\t//execute update\r\n\t\t\tstmt.executeUpdate();\r\n\t\t\t\r\n\t\t\tResultSet resultKey = stmt.getGeneratedKeys();\r\n\t\t\tif (!resultKey.next())\r\n\t\t\t\tthrow new Exception(\"Creating new Student failed - createStudent()\");\r\n\t\t\treturn resultKey.getInt(1);\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in setEnabled\",e);\r\n\t\t\tlink.rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void createAccount(){\n System.out.println(\"vi skal starte \");\n }",
"public void insertNewUser(String username, String password, String emailAddress) {\r\n\t\tConnection c = getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ptsmt = (PreparedStatement)c.prepareStatement(\"INSERT INTO user(userName, password, emailAddress) VALUES (?, ?, ?)\");\r\n\t\t\tptsmt.setString(1, username );\r\n\t\t\tptsmt.setString(2,password );\r\n\t\t\tptsmt.setString(3, emailAddress);\r\n\t\t\tptsmt.execute();\r\n\t\t\t\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"int insert(SysAuthentication record);",
"public void CreateUser(Connection conn, String user_name,\r\n String user_uid, String user_pwd, String status) \r\n throws DbException\r\n {\r\n Statement stmt = null;\r\n String sql = \"\";\r\n int id = 0;\r\n try \r\n {\r\n id = getNextID(conn, \"Users_seq\");\r\n \r\n sql = \"insert into Users values(\"+id+\", \"+sqlString(user_uid)+\", \"+sqlString(user_pwd)+\", \"+sqlString(user_name)+\", \"+sqlString(status)+\");\";\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n } \r\n catch (SQLException sqle) \r\n { \r\n sqle.printStackTrace(System.err);\r\n \r\n throw new DbException(\"Internal error. Failed to call PL/SQL procedure\\n(\" +\r\n sqle.getMessage() + \")\");\r\n } \r\n finally \r\n {\r\n try \r\n {\r\n if (stmt != null) stmt.close();\r\n } \r\n catch (SQLException ignored) \r\n {}\r\n }\r\n }",
"private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }",
"public void createAccount(String username, String password) {\n\t\tString send;\n\t\tsend = \"<NewAccount=\" + username + \",\" + password + \">\";\n\n\t\ttry {\n\t\t\tdos.writeUTF(send);\n\t\t} catch (Exception e) {\n\t\t\t//TODO\n\t\t}\n\t}",
"@Override\n\tpublic void addToUserAccountTable(int accountId,String username) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into user_account values(?, ?)\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setString(1, username);\n\t\t\tprepStmt.setInt(2, accountId);\n\t\t\tprepStmt.executeUpdate();\n\t}",
"int insert(PasswordCard record);",
"public void registerStudent(String firstName, String lastName, String bcsYear,\n String email, String accountID) throws SQLException {\n Statement myStatement = studentConn.createStatement();\n\n myStatement.executeUpdate(\"INSERT INTO student(firstName, lastName, bcsYear, email, accountID) \"\n + \"VALUES(\\\"\" + firstName + \"\\\", \\\"\" + lastName + \"\\\", \\\"\"\n + bcsYear + \"\\\", \\\"\" + email + \"\\\", \\\"\" + accountID + \"\\\");\");\n }",
"@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}",
"Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);",
"private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public static void creaStudente(Student stud) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_USER;\n\t\t\trp.userType = UserType.STUDENT;\n\t\t\trp.parameters = new Object[] { stud };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"int insert(SessionAccountConnectAttrs record);",
"public static void addUser(String username, String password) {\n try {\n // create a mysql database connection\n Class.forName(\"com.mysql.jdbc.Driver\");\n HashSalt hashSalt = new HashSalt();\n connection = DriverManager.getConnection(\"RDS_HOST\",\"RDS_USERNAME\",\"RDS_PASSWORD\");\n String query = \"INSERT INTO YOUR_TABLE_NAME_GOES_HERE (username, password) VALUES(?,?)\";\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1, username);\n preparedStatement.setString(2,hashSalt.hashPassword(password));\n preparedStatement.executeUpdate();\n connection.close();\n\n } catch (Exception e) {\n System.err.println(\"Got an exception!\");\n System.err.println(e.getMessage());\n }\n }",
"public void insertRegister(int id, String name, String password) throws SQLException\r\n\t{\n\t\tStatement stmt;\r\n\t\tstmt = conn.createStatement();\r\n\t\tString sql = \"insert into clientinfo(id, usrname, password,conninfo) values (\"+id+\", '\"+name+\"','\"+password+\"',true)\";\r\n\t\tstmt.executeUpdate(sql);\r\n\t}",
"public void makeNewUser(String name, int age, String address, String password)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (this.currentUserAuthenticated) {\n // find the role ID that corresponds to customer\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n int roleId = map.roleIds.get(Roles.CUSTOMER);\n int userId = DatabaseInsertHelper.insertNewUser(name, age, address, roleId, password);\n System.out.println(\"User ID - \" + userId);\n System.out.println(\"succesfully made user\");\n } else {\n System.out.println(\"failed making user\");\n throw new ConnectionFailedException();\n }\n }",
"public void insertUser() {}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"public void addUserCredentials(String login, String password) throws SQLException;",
"public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }",
"public boolean createUser(Connection con, String userid, String password, int access_code)\n throws SQLException, NoSuchAlgorithmException, UnsupportedEncodingException\n {\n PreparedStatement ps = null;\n try {\n if (userid != null && password != null && userid.length() <= 20){\n // Uses a secure Random not a simple Random\n SecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n // Salt generation 64 bits long\n byte[] bExtra = new byte[8];\n random.nextBytes(bExtra);\n // Digest computation\n byte[] bDigest = getHash(ITERATION_NUMBER,password,bExtra);\n String sDigest = byteToBase64(bDigest);\n String sSalt = byteToBase64(bExtra);\n\n ps = con.prepareStatement(\"insert into login (User_ID, password, access_code, extra) VALUES (?,?,?,?)\");\n ps.setString(1,userid);\n ps.setString(2,sDigest);\n ps.setInt(3,access_code);\n ps.setString(4, sSalt);\n ps.executeUpdate();\n return true;\n } else {\n return false;\n }\n } finally {\n close(ps);\n }\n }",
"public boolean create_user(String login_id, String first_name, String middle_name, String last_name, String password, String branch, String rollno, String gender, String mobileno, String house,String date_of_birth, String home_town, String about, String hostel, String education, String security_q, String security_a)\r\n {\r\n DBConnect db = new DBConnect();\r\n try{\r\n String SQL = \"insert into user2(login_id, first_name,middle_name,last_name,password,branch,rollno,gender,mobileno,house,date_of_birth,home_town,about,hostel,education) values ('\" + login_id + \"', '\" + first_name + \"','\" \r\n + middle_name + \"','\" + last_name + \"','\" + password + \"','\" + branch + \"','\" + rollno + \"','\" + gender + \"','\" + mobileno + \"','\" + house + \"','\" + date_of_birth + \"','\" + home_town + \"','\" + about + \"','\" + hostel + \"','\" + education + \"')\";\r\n System.out.println(\"\"+SQL);\r\n try\r\n {\r\n \r\n db.pstmt = db.conn.prepareStatement(SQL);\r\n \r\n try\r\n {\r\n if (db.pstmt.executeUpdate() != 0)\r\n return true;\r\n }\r\n catch(Exception e)\r\n {\r\n \r\n }\r\n } catch(Exception e){\r\n \r\n }\r\n \r\n finally\r\n {\r\n try\r\n {\r\n db.conn.close();\r\n }\r\n catch (Exception e)\r\n {\r\n \r\n }\r\n }\r\n \r\n \r\n } catch(Exception e){\r\n \r\n }\r\n return false;\r\n }",
"public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"public int createAccount(User user) throws ExistingUserException,\n UnsetPasswordException;",
"int insert(SysRoleUser record);",
"public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }",
"int insert(LoginRecordDO record);",
"static boolean registerStudent(String name, String id, String username, String password, String major) {\r\n Student student = new Student();\r\n if (!StudentSystem.accounts.containsKey(username)) {\r\n student.setName(name);\r\n student.setId(id);\r\n student.setUsername(username);\r\n student.setPassword(password);\r\n student.setMajor(major);\r\n student.setAccountType(1);\r\n\r\n accounts.put(username, student);\r\n return true;\r\n }\r\n return false;\r\n }",
"boolean createAccount(String username,String email,String password){\n boolean isEmailExist = checkEmailExist(email);\n boolean isnewUser = false;\n if(isEmailExist){\n System.out.println(\"email already exists\");\n }\n else{\n if(email !=\"\" && email !=null && username !=\"\" && username !=null && password !=\"\" && password !=null){\n try{\n stmt = con.prepareStatement(\"INSERT INTO users(name,email,password) VALUES(?,?,?)\");\n stmt.setString(1,username);\n stmt.setString(2,email);\n stmt.setString(3,password);\n stmt.executeUpdate();\n isnewUser = true;\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n else{\n System.out.println(\"Please check the value\");\n }\n }\n return isnewUser;\n }",
"public void crearUsuario(String cedula,String name ,String lastname ,String phone , String city ,String email,String password) throws BLException;",
"int insert(ShopAccount record);",
"public void SaveUserRegister(String fname, String sname, String email, String phonenum, String add1, String add2,\n\t\t\tString city, String postcode) {\n\t\ttry {\n\t\t\tconnection.getConnections();\n\t\t\tconnection.stmt = connection.con.createStatement();\n\t\t\tconnection.stmt.executeUpdate(\n\t\t\t\t\t\"Insert into customer (Firstname,Lastname,Email, AddressLine1,AddressLine2,City,Postcode,Telephone,disable) value ('\"\n\t\t\t\t\t\t\t+ fname + \"','\" + sname + \"','\" + email + \"','\" + add1 + \"','\" + add2 + \"','\" + city + \"','\"\n\t\t\t\t\t\t\t+ postcode + \"','\" + phonenum + \"','No')\");\n\t\t\tconnection.con.close();\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t}",
"public void insertUser(String username, String password) throws SQLException {\n PreparedStatement stmt;\n // SQL code for insert\n String insertSQL = \"INSERT INTO USERS(USERNAME, PASSWORD) VALUES(?, ?)\";\n\n String pw = getPassword(username);\n\n if (pw.equals(\"\")) {\n\n try {\n connect();\n // Create SQL statement for inserting\n stmt = this.connection.prepareStatement(insertSQL);\n stmt.setString(1, username);\n stmt.setString(2, password);\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n close();\n }\n\n } else {\n System.out.println(\"Username is already used!\");\n }\n }",
"int createAccount(Account account);",
"@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"int insert(Userinfo record);",
"void registerNewUser(String login, String name, String password, String matchingPassword,\n String email);",
"int newUser(String username, String password, Time creationTime);",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}",
"HttpStatus createUserAccount(final String realm, final String username, final String firstName,\n\t\t\tfinal String lastName, final String email, final String password);",
"private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }",
"public CreateNewUserDetails(String sLogin, String sFirstName, \r\n\t\t\tString sLastName, String sPassword, String sEmail)\r\n\t{\r\n\t\t// No language assume English user\r\n\t\tset(sLogin, sFirstName, sLastName, sPassword, sEmail, \"\", \"\", \"\", true);\r\n\t}",
"public void register(String firstname, String lastname, String username, String email, String password) {\n BasicDBObject query = new BasicDBObject();\n query.put(\"firstname\", firstname);\n query.put(\"lastname\", lastname);\n query.put(\"username\", username);\n query.put(\"email\", email);\n query.put(\"password\", password);\n query.put(\"rights\", 0);\n users.save(query);\n System.out.println(\"### DATABASE: user \" + username + \" registered ... password hash: \" + password);\n }",
"void insert(IrpSignInfo record) throws SQLException;",
"private void createUser(final String email, final String password) {\n\n }",
"public ResultSet adduser(String firstname, String lastname, String username,\r\n\t\tString password, String address, String city, String eMail, Long phone,\r\n\t\tString security, String answer, String dob,\r\n\t\tLong pincode)throws SQLException {\n\tLong logid=null;\r\n\tint i=DbConnect.getStatement().executeUpdate(\"insert into login values(login_seq.nextval,'\"+username+\"'||username_seq.nextval,'\"+password+\"','not approved','user','\"+security+\"','\"+answer+\"') \");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"insert into customer values(user_seq.nextval,'\"+firstname+\"','\"+lastname+\"','\"+city+\"','\"+eMail+\"',\"+phone+\",'\"+dob+\"',sysdate,\"+pincode+\",login_seq.nextval-1,'\"+address+\"')\");\r\n\tResultSet rss=DbConnect.getStatement().executeQuery(\"select login_seq.nextval-2 from dual\");\r\n\tif(rss.next())\r\n\t{\r\n\t\tlogid=rss.getLong(1);\r\n\t}\r\n\trs=DbConnect.getStatement().executeQuery(\"select username from login where login_id=\"+logid+\"\");\r\n\treturn rs;\r\n}",
"private void userRegister(String n, String e, String phn, String addr, String user, String pass) {\n Connection dbcon = DBConnection.connectDB();\n if(dbcon != null){\n try {\n PreparedStatement st = (PreparedStatement) \n dbcon.prepareStatement(\"INSERT INTO registration (name,email,phone,address,username,password) VALUES(?,?,?,?,?,?)\");\n \n \n \n st.setString(1, n);\n st.setString(2, e);\n st.setString(3, phn);\n st.setString(4, addr);\n st.setString(5, user);\n st.setString(6, pass);\n \n \n int rs = st.executeUpdate();\n \n JOptionPane.showMessageDialog(this, \"Registration Successful.\", \n \"Success\", JOptionPane.INFORMATION_MESSAGE);\n \n name.setText(\"\");\n email.setText(\"\");\n phone.setText(\"\");\n address.setText(\"\");\n username.setText(\"\");\n password.setText(\"\");\n \n\n \n } catch (SQLException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n System.out.println(\"The connection is not available\");\n }\n }",
"public void insertUser(int value1, String value2, String value3)\r\n {\r\n try {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO user(NSBMID,Name,Password)VALUES(\"+value1+\",'\"+value2+\"','\"+value3+\"')\");\r\n } \r\n catch (SQLException ex)\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n \r\n }\r\n }",
"public void createSystemUser(String nam, String surnam, String id, String username, String password) {\n\t\ttry {\n\t\t\trestaurant.addUser(nam, surnam, id, username, password);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"int insert(UserInfoUserinfo record);",
"int insert(UserInfo record);",
"int insert(R_dept_user record);",
"int insert(Account record);",
"int insert(Account record);",
"public void insertUserTable(String username, String password) throws SQLException {\n\n\t\tSQLInsert insertStatement = new SQLInsert();\n\t\tinsertStatement.insertUserTable(username, password);\n\t\tcurrentUser = username;\n\n\t}",
"public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}",
"public static void insert(String nome, String cognome, String email, String citta, Date dataNascita, String username, String password, int ruolo, Date dataSignup ) {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>(); \r\n \tmap.put(\"nome\", nome);\r\n \tmap.put(\"cognome\", cognome);\r\n \tmap.put(\"email\", email);\r\n \tmap.put(\"citta\", citta);\r\n \tmap.put(\"dataNascita\", dataNascita);\r\n \tmap.put(\"username\", username);\r\n \tmap.put(\"password\", crypt(password));\r\n \tmap.put(\"ruolo\", ruolo); // ruolo dell'utente normale \r\n \tmap.put(\"dataSignup\", dataSignup);\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Non esiste un altro utente con queste credenziali nel DB\");\r\n\t\t\tDatabase.connect();\r\n \t\tDatabase.insertRecord(\"utente\", map);\r\n\r\n \t\tDatabase.close();\r\n \t\t\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t\t\r\n\t}",
"private void addToDB(String CAlias, String CPwd, String CFirstName,\n String CLastName, String CStreet, String CZipCode, String CCity,\n String CEmail)\n {\n con.driverMysql();\n con.dbConnect();\n \n try \n {\n sqlStatement=con.getDbConnection().createStatement();\n sqlString=\"INSERT INTO customer (CAlias, CFirstName, CLastName, CPwd, \"\n + \"CStreetHNr, CZipCode, CCity, CEmail, CAccessLevel)\"\n + \" VALUES\"\n + \"('\" + CAlias + \"', '\" + CFirstName + \"', '\" + CLastName\n + \"', '\" + CPwd + \"', '\" + CStreet + \"', '\" \n + CZipCode + \"', '\" + CCity + \"', '\" + CEmail + \"', 1);\";\n \n sqlStatement.executeUpdate(sqlString);\n sqlString=null;\n con.getDbConnection().close();\n } \n catch (Exception ex) \n {\n error=ex.toString();\n }\n }",
"int insert(BizUserWhiteList record);",
"@POST\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Produces(MediaType.APPLICATION_JSON)\n public Response doPost(@FormParam(\"pass\") String password,\n @FormParam(\"fname\") String fname,\n @FormParam(\"lname\") String lname,\n @FormParam(\"acc_login\") String acc_login,\n @FormParam(\"my_code\") String code) throws SQLException {\n Methods.insert_student(password, fname, lname, acc_login, code);\n return Response.seeOther(URI.create(\"/home_assistant\")).build();\n }",
"public int insertNewUser(String uname,String pswd,String role){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConn();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(!this.resultSet.next()){\n\t\t\t\tString insQuery = \"insert into LoginDetails(username,password,user_role) values(?,?,?)\";\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(insQuery);\n\t\t\t\tthis.preparedStatement.setString(1,uname);\n\t\t\t\tthis.preparedStatement.setString(2,pswd);\n\t\t\t\tthis.preparedStatement.setString(3,role);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}",
"private void register(String username,String password){\n\n }",
"@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}",
"public void insertEntry(String userName, String password) {\n ContentValues newValues = new ContentValues();\n // Assign values for each column.\n newValues.put(\"USERNAME\", userName);\n newValues.put(\"PASSWORD\", password);\n\n // Insert the row into your table\n db.insert(\"LOGIN\", null, newValues);\n Toast.makeText(context, \"User Info Saved\", Toast.LENGTH_LONG).show();\n }",
"int insert(BankUserInfo record);",
"int insert(BankUserInfo record);",
"@Override\n\tpublic void create(Student student) {\n\t\tString query=\"insert into student values('\"+student.getId()+\"','\"+student.getName()+\"','\"+student.getAge()+\"')\";\n\t//\tjdbcTemplate.update(query);\n\t\tint result=jdbcTemplate.update(query);\n\t\tSystem.out.println(result+\"Record Inserted\");\n\t}",
"private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }",
"public CreateNewUserDetails(String sLogin, String sFirstName, \r\n\t\t\tString sLastName, String sPassword, String sEmail, String sRole)\r\n\t{\r\n\t\t// No language assume English user\r\n\t\tset(sLogin, sFirstName, sLastName, sPassword, sEmail, sRole, \"\", \"\", true);\r\n\t}",
"public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);",
"@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}",
"public static void CreateUser(Messenger esql){\n try{\n System.out.print(\"\\tEnter user login: \");\n String login = in.readLine();\n System.out.print(\"\\tEnter user password: \");\n String password = in.readLine();\n System.out.print(\"\\tEnter user phone: \");\n String phone = in.readLine();\n //Creating empty contact\\block lists for a user\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('block')\");\n int block_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('contact')\");\n int contact_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n String query = String.format(\"INSERT INTO USR (phoneNum, \" +\n \"login, password, block_list, \" + \n \"contact_list) VALUES ('%s','%s','%s',%s,%s)\"\n , phone, login, password, block_id, contact_id);\n\n esql.executeUpdate(query);\n System.out.println (\"User successfully created!\");\n }catch(Exception e){\n System.err.println (e.getMessage ());\n }\n }"
]
| [
"0.70070213",
"0.6888132",
"0.6770195",
"0.6743807",
"0.6623722",
"0.66169375",
"0.659982",
"0.65971625",
"0.6584105",
"0.6581124",
"0.65658927",
"0.6524226",
"0.65184104",
"0.6493432",
"0.6469633",
"0.64631474",
"0.6449772",
"0.64170283",
"0.63974077",
"0.6363539",
"0.6363539",
"0.63588935",
"0.6354665",
"0.6353704",
"0.63475484",
"0.6327928",
"0.6318415",
"0.62927514",
"0.62739426",
"0.6273741",
"0.62701744",
"0.6268603",
"0.6259113",
"0.62541807",
"0.62510896",
"0.6247669",
"0.624752",
"0.6233276",
"0.62166643",
"0.6190636",
"0.6189202",
"0.618871",
"0.61877877",
"0.61844975",
"0.6162433",
"0.6152018",
"0.6143121",
"0.6140034",
"0.6132792",
"0.6131306",
"0.61065835",
"0.61008406",
"0.60986656",
"0.6098524",
"0.609835",
"0.6096581",
"0.6096344",
"0.60919654",
"0.6083083",
"0.60801387",
"0.6077993",
"0.60778856",
"0.6059018",
"0.60483605",
"0.6043581",
"0.60410196",
"0.6037134",
"0.60333794",
"0.60293025",
"0.6025012",
"0.60182977",
"0.6013225",
"0.60037535",
"0.5992495",
"0.5991179",
"0.5982804",
"0.5982122",
"0.5977837",
"0.5969209",
"0.5969003",
"0.5966739",
"0.5966739",
"0.595517",
"0.5949763",
"0.5942287",
"0.5942075",
"0.59420556",
"0.5939587",
"0.5935474",
"0.59348035",
"0.59277236",
"0.5922884",
"0.5920661",
"0.5920661",
"0.59183276",
"0.59164345",
"0.5910823",
"0.5909131",
"0.5893964",
"0.58887416"
]
| 0.67359513 | 4 |
query all books' info of library | public static <T> void queryAll() {
String sql = "SELECT * FROM LIBRARY ORDER BY BID ";
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Lib.class;
System.out.println("All books info is displayed below: ");
try {
List<T> eleList = dao.queryData(sql, clazz);
for (T ele : eleList) {
System.out.println("\t"+ele);
}
} catch (Exception e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Book> getAllBooks();",
"public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }",
"public Books getBooks(String title,String authors,String isbn,String publisher);",
"public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}",
"public List<Book> listBooks() {\n\t\tArrayList<Book> books = new ArrayList<>();\n\t\ttry (Connection con = LibraryConnection.getConnection()) {\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"SELECT * FROM book\");\n\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbooks.add(new Book(rs.getString(\"isbn\"), rs.getString(\"title\")));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn books;\n\t}",
"public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }",
"public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }",
"public List<Book> getAllBooks(){\n\t\treturn this.bRepo.findAll();\n\t}",
"Collection<Book> getAll();",
"@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}",
"public List<Book> getAllBooks() {\n return entityManager.createQuery(\"select b from Book b\", Book.class).getResultList();\n }",
"List<Book> findAll();",
"public List<Book> allBooks() {\n return bookRepository.findAll();\n }",
"List<Book> getBooksByAuthorId(Integer authorId);",
"public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }",
"public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}",
"public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }",
"private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }",
"public java.util.List<com.huqiwen.demo.book.model.Books> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"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 }",
"public ArrayList<Book> getLibraryBooks() {\n return this.libraryBooks;\n }",
"public boolean searchLibrary(String key)\n\t{\n\t\tif(availableBooks!=0)\n\t\t{\n\t\t\tboolean val=b.searchBook(key);\n\t\t\treturn val;\n\t\t}\n\t\treturn false;\t\n\t\t\t\n\t}",
"public List<Book> getTotalBooksInLibrary() {\n\n return books;\n }",
"private void searchBook(String query) {\n String filter = this.bookFilter.getValue();\n String sort = this.sort.getValue();\n \n // Get the user defined comparator\n Comparator<Book> c = getBookComparator(filter, sort);\n\n // Create a book used for comparison\n Book book = createBookForQuery(filter, query);\n \n // Find all matches\n GenericList<Book> results = DashboardController.library.getBookTable().findAll(book, c);\n\n // Cast results to an array\n Book[] bookResults = bookResultsToArray(results, c);\n\n // Load the results in a new scene\n this.loadBookResultsView(bookResults);\n }",
"public List<Book> getAll() {\n return bookFacade.findAll(); \n }",
"public List<Book> findAll() {\n\t\treturn bookDao.findAll();\r\n\t}",
"public void getBookDetails() {\n\t}",
"public List<Book> getByAuthor(String name );",
"public ArrayList<Book> getListBook();",
"Collection<Book> readAll();",
"public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }",
"public ObservableList<Object> selectAllBooks(){\n System.out.println(\"Printing all books...\");\n dbmanager.open();\n ObservableList<Object> books = FXCollections.observableArrayList();\n\n try{\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n dbmanager.incrementNextId(Integer.parseInt(splittedString[1]));\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n Book book = new Book(jbook);\n \n book.setPublisher(dbmanager.getPmanager().read(jbook.getInt(\"publisher\")));\n \n JSONArray jauthors = jbook.getJSONArray(\"authors\");\n List<Author> authors = new ArrayList();\n for(int i=0; i<jauthors.length(); i++){\n \n int a=-1;\n a=jauthors.getInt(i);\n if(a>=0){ \n authors.add(dbmanager.getAmanager().read(a));\n }else{\n System.out.println(\"A book has mysterious author\"); \n }\n \n }\n \n book.setAuthors(authors);\n books.add(book);\n keyIterator.next();\n }\n }\n } catch(IOException e){\n e.printStackTrace();\n }\n dbmanager.close();\n return books;\n }",
"public List<BookData> getAllBooks() throws Exception{\n\t\tList<BookData> list = new ArrayList<>();\n\t\tStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\tmyStmt = myConn.createStatement();\n\t\t\tmyRs = myStmt.executeQuery(\"select title, author_name, publisher_name, book_id from books natural join book_authors\");\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public ArrayList<Book> getAllBooksArray(){\n ArrayList<Book> booksArray = new ArrayList<>();\n\n Connection con = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n try{\n Class.forName(\"org.sqlite.JDBC\");\n con = DriverManager.getConnection(\"jdbc:sqlite:Library.db\");\n stmt = con.createStatement();\n String sql = \"SELECT * FROM BOOKS\";\n rs = stmt.executeQuery(sql);\n while(rs.next()){\n Book book = new Book(rs.getString(\"TITLE\"), rs.getString(\"AUTHOR\"), rs.getString(\"ILLUSTRATOR\"), rs.getString(\"ISBN\"), rs.getString(\"DECIMAL\"),\n rs.getString(\"DESCRIPTION\"), rs.getString(\"GENRE\"), rs.getBoolean(\"NON_FICTION\"));\n String tags = rs.getString(\"TAGS\");\n book.setID(rs.getInt(\"ID\"));\n book.deserializeTags(tags);\n booksArray.add(book);\n }\n rs.close();\n stmt.close();\n con.close();\n }catch(SQLException | ClassNotFoundException e){\n e.printStackTrace();\n }\n return booksArray;\n }",
"@Override\n\tpublic List<BookInfoVO> findAll() {\n\t\treturn bookInfoDao.findAll();\n\t}",
"private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}",
"public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn booklist;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Book> getAllBook() {\n\t\treturn entityManager.createQuery(\"from Book\").getResultList();\n\t}",
"@Override\n\tpublic List<Book> getAllBooks() {\n\t\treturn bookList;\n\t}",
"@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}",
"public List<Book> findAll() {\n return bookRepository.findAll();\n }",
"public void searchBooks(String searchKeyword) {\n\n\n books = new ArrayList<>();\n Call<BooksObject> call = NetworkUtils.booksAPI.findBooks(searchKeyword, NetworkUtils.apiKey, 5);\n call.enqueue(new Callback<BooksObject>() {\n @Override\n public void onResponse(Call<BooksObject> call, Response<BooksObject> response) {\n if (!response.isSuccessful()) {\n Log.i(TAG, \"\" + response.code());\n return;\n }\n\n BooksObject booksObject = response.body();\n ArrayList<Book> bookList = booksObject.getItems();\n for (Book b : bookList) {\n String id = b.getId();\n boolean exists = false;\n for (Book bo : library) {\n if (id.equals(bo.getId())) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n books.add(b);\n }\n }\n\n customSearchAdapter = new CustomSearchAdapter(getContext(), books);\n acLibrary.setAdapter(customSearchAdapter);\n customSearchAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onFailure(Call<BooksObject> call, Throwable t) {\n Log.i(TAG, t.getMessage());\n }\n });\n\n }",
"List<Book> findBooksByName(String name);",
"@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }",
"public Map<String, BookBean> retrieveAllBooks() throws SQLException {\r\n\t\tString query = \"select * from BOOK order by CATEGORY\";\t\t\r\n\t\tMap<String, BookBean> rv= new HashMap<String, BookBean>();\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bid = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString category = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tBookBean s = new BookBean(bid, title, price,category);\t\t\t\r\n\t\t\trv.put(bid, s);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn rv;\r\n\t\t}",
"public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }",
"public List<Book> fetchAllBooks() {\n\t\treturn null;\n\t}",
"List<Info> getBookInfoById(Long infoId) throws Exception;",
"Book getBookByTitle(String title);",
"private static void queryBook(){\n\t\tSystem.out.println(\"===Book Queries Menu===\");\n\t\t\n\t\t/*Display menu options*/\n\t\tSystem.out.println(\"1--> Query Books by Author\");\n\t\tSystem.out.println(\"2--> Query Books by Genre\");\n\t\tSystem.out.println(\"3--> Query Books by Publisher\");\n\t\tSystem.out.println(\"Any other number --> Exit To Main Menu\");\n\t\tSystem.out.println(\"Enter menu option: \");\n\t\tint menu_option = getIntegerInput(); //ensures user input is an integer value\n\t\t\n\t\tswitch(menu_option){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByAuthor();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByGenre();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByPublisher();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public List<Book> getBooks() {\r\n \t\t// switch dates\r\n \t\tif (filter_dateFrom.compareTo(filter_dateTo) > 0) {\r\n \t\t\tCalendar tmp = filter_dateFrom;\r\n \t\t\tfilter_dateFrom = filter_dateTo;\r\n \t\t\tfilter_dateTo = tmp;\r\n \t\t}\r\n \r\n \t\tDate yearFrom = filter_dateFrom.getTime();\r\n \t\tDate yearTo = filter_dateTo.getTime();\r\n \r\n \t\t// genre\r\n \t\tGenre genre = null;\r\n \t\tif (!filter_genre.isEmpty() && !filter_genre.equalsIgnoreCase(\"all\")) {\r\n \t\t\tgenre = genreMgr.findByName(filter_genre);\r\n \t\t\tif (genre == null) {\r\n \t\t\t\tSystem.err.println(\"Badly working database encoding!\");\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn bookMgr.find(filter_name, filter_author, yearFrom, yearTo, genre, filter_isbn_issn);\r\n \t}",
"@GetMapping(\"api/books\")\n public List<Book> getallBooks() {\n return bookService.all().getPayload();\n }",
"public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }",
"public List<String > getBooks(){\n List<String> titles = new ArrayList<>();\n\n String strSQL = \"SELECT B._id, B.Title FROM TBooks B WHERE NOT B._id IN (Select TLoaned.TitleID \" +\n \" FROM TLoaned WHERE TLoaned.ReturnDate IS NULL);\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(strSQL, null);\n try {\n if (c.moveToFirst()) {\n do {\n titles.add(c.getString(0) + \". \" + c.getString(1));\n } while (c.moveToNext());\n }\n }\n finally {\n c.close();\n db.close();\n }\n return titles;\n }",
"@Override\n public List<Book> findBooks(SelectRequest selectRequest)\n throws DaoException {\n List<Book> foundBooks = new ArrayList<>();\n DataBaseHelper helper = new DataBaseHelper();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statement = helper\n .prepareStatementFind(connection, selectRequest);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n foundBooks.add(book);\n }\n } catch (SQLException e) {\n throw new DaoException(\"Error while reading database!\", e);\n }\n return foundBooks;\n }",
"public List<Books> searchBook(String keywords,String author,double low_price,double high_price){\n /*\n * search books by keywords of book_name\n * */\n List<Books> books=null;\n ResultSet resultSet=null;\n if(keywords!=\"\"&&author==\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book where book_name like '%\"+keywords+\"%'\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by keywords and author\n else if(keywords!=\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where b.book_name like '%keywords=?%' and book_author=?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{keywords,author});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by author\n else if(keywords==\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where book_author=?\";\n BaseDao baseDaot=dao.executeQuery(sql,new Object[]{author});\n books=resultSetToBook(baseDaot);\n return books;\n }\n else if(keywords==\"\"&&author==\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n //search books by keywords and price\n else if(keywords!=\"\"&&author!=\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where b.book_name like '%\"+keywords+\"%' \" +\n \"and book_author=? and book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{author,low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n return null;\n }",
"public List<Books> findBooksByTitle(String title) {\r\n return bookController.findBooksByTitle(title);\r\n }",
"public List<BookData> searchBookbyPublisher (String publisher) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where publisher_name = ?\");\n\t\t\tmyStmt.setString(1, publisher);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}",
"public static List<Book> getBookDetails_1() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_1\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n \r\n }",
"public Iterator getBooks() {\r\n return books.iterator();\r\n }",
"public List<Cosa> findAllBooks() {\r\n\t\tList<Cosa> cosas = (List<Cosa>) jdbcTemplate.query(\r\n\t\t\t\t\"select * from persone\", new CosaRowMapper());\r\n\t\treturn cosas;\r\n\t}",
"private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}",
"public Book[] getRecommendBooks()\n {\n String stmnt = String.format(\n \"SELECT * FROM book LIMIT %d \",\n PAGE_LIMIT);\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n\n }",
"public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"@Override\n\tpublic List<ShoppingCart> getAllBook() {\n\t\treturn dao.findAll();\n\t}",
"@GetMapping(\"/bookworm/showAllAuthors\")\n public ResponseEntity<List> showAllAuthors() {\n\n log.debug(\"Showing all the Authors whose books are present in library\");\n return ResponseEntity.ok(authorService.getAuthor());\n }",
"public List<BookData> searchBookbyAuthor (String author) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where author_name = ?\");\n\t\t\tmyStmt.setString(1, author);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}",
"public List getBookList() throws SQLException {\n\t\treturn null;\n\t}",
"private void printAvailableBooks() {\n\t\t\n\t}",
"public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }",
"public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}",
"public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"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 }",
"public void getAllBook(){\n Call<Book> call = api.testBooks();\n call.enqueue(\n new Callback<Book>() {\n @Override\n public void onResponse(Call<Book> call, Response<Book> response) {\n Log.e(\"Test API\", \"on Response \"+response.body());\n Book book = response.body();\n Log.e(\"Test API\", \"on Response \"+book.getAuthor());\n Log.e(\"Test API\", \"on Response \"+book.getTitle());\n Log.e(\"Test API\", \"on Response \"+book.getLanguage());\n Log.e(\"Test API\", \"on Response \"+book.getDescription());\n view.onGetSuccess(book);\n }\n\n @Override\n public void onFailure(Call<Book> call, Throwable t) {\n Log.i(\"Test API\", \"on Failure \"+t.getLocalizedMessage());\n }\n }\n );\n }",
"public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}",
"void viewBooks();",
"void availableBooks(){\n\t\tSystem.out.println(\")))))Available books((((((\");\n\t\tfor(int i=0;i<books.length;i++){\n\t\t\tString book=books[i];\n\t\t\tif(book==null){\n\t\t\tcontinue;\n\t\t}\n\t\t\tSystem.out.println(\"*\"+books[i]);\n\t\t}\n\t\t\n\t}",
"private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}",
"private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}",
"@Override\r\n\tpublic List<Book> getBooks(String kind) {\n\t\treturn null;\r\n\t}",
"public void listBooksByAuthor(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE AuthorName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}",
"@RequestMapping(value=\"/getbooks\", method=RequestMethod.GET, produces = \"application/json\")\n\tpublic List<Book> getAll() {\n\t\tList<Book> books = new ArrayList<>();\n\t\tbooks = bookDao.getAllFromDB();\n\t\t\n\t\treturn books;\n\t}",
"List<IntegralBook> selectByExample(IntegralBookExample example);",
"public ArrayList<Book> gettitleBook(String title);",
"@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}",
"public List<Books> findBooksByFormat(String format) {\r\n return bookController.findBooksByFormat(format);\r\n }",
"@Override\r\n\tpublic List<BookDto> getBookList(String storename) {\n\t\tList<BookDto> blist = sqlSession.selectList(ns + \"getBookList\", storename);\t\t\r\n\t\treturn blist;\r\n\t}",
"List<Book> selectByExample(BookExample example);",
"public List<Books> findBooksByIdentifier(String identifier) {\r\n List<Books> bookList = new ArrayList<Books>();\r\n Books book;\r\n\r\n try {\r\n book = bookController.findBookByIdentifier(identifier);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n\r\n bookList.add(bookController.findBookByIdentifier(identifier));\r\n\r\n return bookList;\r\n }",
"@Override\n public List<BookDto> getAllBooks() {\n try {\n List<BookEntity> bookEntityArrayList = bookRepository.findAll();\n if (bookEntityArrayList.isEmpty()) {\n LogUtils.getInfoLogger().info(\"No Books found\");\n return null;\n } else {\n List<BookDto> bookDtoArrayList = bookEntityArrayList.stream()\n .map(bookEntity ->\n bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity))\n .collect(Collectors.toList());\n LogUtils.getInfoLogger().info(\"Books Found: {}\", bookDtoArrayList.toString());\n return bookDtoArrayList;\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }",
"public Books[] getBooks() {\n return books;\n }",
"public Library() {\n this.okToPrint = true;\n this.libraryBooks = this.readBookCollection();\n this.patron = new HashMap<String, Patron>();\n this.calendar = new Calendar();\n this.openOrNot = false;\n this.numberedListOfServing = new HashMap<Integer, Book>();\n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n this.serveOrNot = false;\n this.searchOrNot = false;\n this.servingPatron = new Patron(null,null);\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 Library() {\n books = new Book[0];\n numBooks = 0;\n }",
"public List<Book> getBooks() {\n return books;\n }",
"Book getLatestBook();",
"int getCountOfAllBooks();"
]
| [
"0.710329",
"0.7020676",
"0.6970145",
"0.6951933",
"0.69319594",
"0.6898097",
"0.68314546",
"0.6793179",
"0.6741324",
"0.6731311",
"0.6723871",
"0.66693825",
"0.6627111",
"0.65992004",
"0.6595916",
"0.6578618",
"0.6566819",
"0.6463871",
"0.6458978",
"0.64383626",
"0.6436464",
"0.64352536",
"0.6424778",
"0.64130795",
"0.6400206",
"0.6399684",
"0.63996303",
"0.6384033",
"0.6368346",
"0.63607395",
"0.63504916",
"0.6320477",
"0.6305524",
"0.62930876",
"0.62854874",
"0.6273466",
"0.62688285",
"0.62630016",
"0.6258558",
"0.6253567",
"0.6249097",
"0.6248519",
"0.623423",
"0.62228006",
"0.62198406",
"0.6210163",
"0.6193487",
"0.6191793",
"0.6180743",
"0.61189413",
"0.61179554",
"0.60939217",
"0.6083968",
"0.60788614",
"0.6066639",
"0.60610396",
"0.6049963",
"0.60468435",
"0.60291046",
"0.60272807",
"0.60271096",
"0.6019802",
"0.60112923",
"0.6004093",
"0.60013354",
"0.5993551",
"0.59547937",
"0.59533286",
"0.59451365",
"0.594445",
"0.59423244",
"0.5931961",
"0.5923981",
"0.59158415",
"0.5910085",
"0.59099936",
"0.59001446",
"0.58917904",
"0.5885188",
"0.58833075",
"0.5882232",
"0.5877675",
"0.5874166",
"0.5867926",
"0.5865858",
"0.5863256",
"0.5853508",
"0.58501166",
"0.5844751",
"0.5843892",
"0.58372283",
"0.5829121",
"0.5821585",
"0.5820824",
"0.5807256",
"0.5800664",
"0.57965714",
"0.5785034",
"0.5782529",
"0.5777612"
]
| 0.7554795 | 0 |
Executa o speaker, de forma a que este esteja sempre a processar novos pedidos. | public void run() {
try {
int i = 0;
while (running) {
try {
TimeUnit.MILLISECONDS.sleep(250);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (requests.size() > 0) {
external_socket_out = new Socket(target_address, outside_port);
Request r = requests.first();
if (r.getStatus(secretKey).equals("na")) {
r.setStatus("ad",secretKey);
System.out.println("> Speaker: Found request!");
System.out.println("> TCPSpeaker: Sent request to server");
// Envia o pedido ao servidor de destino
PrintWriter pw = new PrintWriter(external_socket_out.getOutputStream());
pw.println(r.getMessage(secretKey));
pw.println();
pw.flush();
System.out.println("> TCPSpeaker: Getting response from server");
// Recebe a resposta do servidor de destino
BufferedReader br = new BufferedReader(new InputStreamReader(external_socket_out.getInputStream()));
String t;
while ((t = br.readLine()) != null)
r.concatenateResponse(t,secretKey);
r.setStatus("sd",secretKey);
System.out.println("> TCPSpeaker: Request has been served at destination!");
br.close();
external_socket_out.close();
//enviar o request via udp de volta
String ip = InetAddress.getLocalHost().getHostAddress();
i++;
startRequestHandler(this.UDPsocket,r,i,ip);
//remover o request da fila de espera deste nodo
requests.remove(r);
}
}
}
} catch(Exception e){
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void speakOut() {\n\n tts.speak(\"Hello I am jessie\", TextToSpeech.QUEUE_FLUSH, null);\n tts.setLanguage(Locale.ENGLISH);\n //tts.setPitch(9);\n tts.setSpeechRate(1);\n }",
"private void speakOut() {\n\n tts.speak(dialogue, TextToSpeech.QUEUE_FLUSH, null);\n }",
"public void speak(){\n System.out.println(\"Smile and wave boys. Smile and wave.\");\n }",
"@Override\n public void onSpeakPaused() throws RemoteException {\n Log.d(TAG, \"onSpeakPaused\");\n }",
"@Override\n public void speak() {\n System.out.println(\"I'm an Aardvark, I make grunting sounds most of the time.\");\n }",
"public void speak() {\r\n\t\tSystem.out.print(\"This Tiger speaks\");\r\n\t}",
"public void run() {\n\t\t\t Publisher<std_msgs.String> publisher = ROSControl.getPublisher(rosTopic);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tint maxSentenceLength = 90; // in terms of the number of characters\n\t\t\t\t\tint timer = 0;\n\t\t\t\t\tint maxWaitingTime = 100; // 100 x sleep(100) = 10 seconds\n\t\t\t\t\tArrayList<String> sentences = splitUtterance(output, maxSentenceLength);\n\t\t\t\t\t\n\t\t\t\t\t// ==================================== Just in case if the robot is currently speaking, wait for it to finish, halt when timeout ==================================== //\n\t\t\t\t\tif (ChatBot.isSpeaking) {\n\t\t\t\t\t\tlog.debug(\"+++++ Waiting for the current speech to finish +++++\");\n\t\t\t\t\t\tlog.debug(\"\\\"\" + output + \"\\\" is in the queue...\");\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile (ChatBot.isSpeaking && timer < maxWaitingTime) {\n\t\t\t\t\t\t\ttimer++;\n\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\tif (timer >= maxWaitingTime) log.warning(\"+++++ TIMEOUT! +++++\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ==================================== Send out the utterance sentence by sentence ==================================== //\n\t\t\t\t\tStopTheThread:\n\t\t\t\t\tfor (int i = 0; i < sentences.size(); i++) {\n\t\t\t\t\t\t// Send the next sentence when the the first sentence is finished\n\t\t\t\t\t\tif (i != 0) {\n\t\t\t\t\t\t\twhile (!ChatBot.sendNextSentence) {\n\t\t\t\t\t\t\t\t// Wait until it is allowed to send the next sentence\n\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// If a \"shut up\" signal is received, stop the thread from sending the rest of the sentences\n\t\t\t\t\t\t\t\tif (ChatBot.shutUp) {\n\t\t\t\t\t\t\t\t\tChatBot.shutUp = false;\n\t\t\t\t\t\t\t\t\tlog.warning(\"<< The speech is interrupted >>\");\n\t\t\t\t\t\t\t\t\tbreak StopTheThread;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString sentence = sentences.get(i);\n\t\t\t\t\t\tstd_msgs.String pubStr = publisher.newMessage();\n\t\t\t\t\t\tpubStr.setData(sentence);\n\t\t\t\t\t\tThread.sleep(130);\n\t\t\t\t\t\t\n\t\t\t\t\t\tChatBot.isSpeaking = true;\n\t\t\t\t\t\tlog.debug(\"Publishing: \" + sentence);\n\t\t\t\t\t\tpublisher.publish(pubStr);\n\t\t\t\t\t\tChatBot.sendNextSentence = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ==================================== Wait for the last sentence to finish, halt when timeout ==================================== //\n\t\t\t\t\tChatBot.speakingTheLastSentence = true;\n\t\t\t\t\tlog.debug(\"+++++ Waiting for the last sentence to finish +++++\");\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\twhile (!ChatBot.sendNextSentence && timer < maxWaitingTime) {\n\t\t\t\t\t\ttimer++;\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\tif (timer >= maxWaitingTime) log.warning(\"+++++ TIMEOUT! +++++\");\n\t\t\t\t\t}\n\t\t\t\t\tlog.debug(\"+++++ Last sentence finished +++++\");\n\t\t\t\t\tChatBot.isSpeaking = false;\n\t\t\t }\n\t\t\t \n\t\t\t catch(InterruptedException e) {\n\t\t\t \te.printStackTrace();\n\t\t\t }\n\t\t\t}",
"void speak() {\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tSystem.out.println(\"My name is \" + name + \" and I am \" + age + \" years old.\");\n\n\t\t}\n\t}",
"@Override\n\tpublic void speak() {\n\t\tSystem.out.println(\"tik tik.......\");\n\t}",
"private void speak() {\n if(textToSpeech != null && textToSpeech.isSpeaking()) {\n textToSpeech.stop();\n }else{\n textToSpeech = new TextToSpeech(activity, this);\n }\n }",
"public void run( Operation operation )\r\n {\r\n String[] commands = operation.getinputArray();\r\n GamePlayer player = Engine.currentPlayer();\r\n boolean spoken = false;\r\n for ( GameComponent component : Engine.componentList() )\r\n {\r\n if ( component instanceof GameSpeaker && component.getName().equalsIgnoreCase( commands[ 2 ] ) &&\r\n player.getLocation().hasSpeaker( commands[ 2 ], false ) )\r\n {\r\n GameSpeaker speaker = ( GameSpeaker ) component;\r\n speaker.initiateDialog();\r\n spoken = true;\r\n break;\r\n }\r\n }\r\n if ( !spoken )\r\n {\r\n IO.add( \"There is no \" + commands[ 2 ] + \" to speak to here.\" );\r\n }\r\n }",
"public void recordVoice() {\n\t\t\n\t\t//String command = \"ffmpeg -f alsa -i hw:0 -t 2 -acodec pcm_s16le -ar 16000 -ac 1 foo.wav\"\n\t\tString command = \"arecord -d 2 -r 22050 -c 1 -i -t wav -f s16_LE foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess recordProcess = pb.start();\n\t\t\t\n\t\t\trecordProcess.waitFor();\n\t\t\t\n\t\t\trecordProcess.destroy();\n\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void speak(){\n System.out.println(\"Shark bait oooh ha haa!\");\n }",
"static void speak(String words) {\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(\"say \" + words).waitFor();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void speak() {\r\n\t\tSystem.out.print(\"This Goose speaks\");\r\n\t}",
"private void speak() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) ;\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT, \"Speak the Item\");\n\n startActivityForResult(intent, SPEECH_REQUEST_CODE);\n\n }",
"private void speakInternal(int resId, Object... formatArgs) {\n final ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service == null) {\n LogUtils.log(Log.ERROR, \"Failed to get ScreenSpeakService instance.\");\n return;\n }\n\n final SpeechController speechController = service.getSpeechController();\n final String text = getString(resId, formatArgs);\n speechController.speak(text, null, null, 0, 0, SpeechController.UTTERANCE_GROUP_DEFAULT,\n null, null, mUtteranceCompleteRunnable);\n }",
"@Override\n public void onAudioVolumeIndication(AudioVolumeInfo[] speakers, int totalVolume) {\n Set<Integer> newUsersInCall = new HashSet<Integer>();\n if (speakers != null) {\n for (AudioVolumeInfo audioVolumeInfo : speakers) {\n int uid = audioVolumeInfo.uid;\n if (audioVolumeInfo.volume > VOLUME_OFF && usersCallId.containsKey(uid)) {\n String userId = usersCallId.get(uid);\n command.execute(true, userId);\n newUsersInCall.add(uid);\n }\n }\n }\n //Run the command on the users who stopped talking to adapt the UI\n for (int uid : usersInCall) {\n if (!newUsersInCall.contains(uid)) {\n if (talking.contains(uid)) {\n talking.remove(uid);\n } else {\n command.execute(false, usersCallId.get(uid));\n }\n\n }\n }\n talking.addAll(newUsersInCall);\n }",
"@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }",
"public void speak() {\r\n\t\tSystem.out.print(\"This animal speaks\");\r\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 onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"private void speak(String text, int queueMode, ArrayList<String> params) {\n if (queueMode == 0) {\n stop();\n }\n mSpeechQueue.add(new SpeechItem(text, params, SpeechItem.TEXT));\n if (!mIsSpeaking) {\n processSpeechQueue();\n }\n }",
"public void speak(String outputSpeak) \n {\n speaker.speaker(outputSpeak);\n }",
"@Override\n public void onClick(View v) {\n text_to_speech = set_voice(text_to_speech);\n int len = ar.length;\n for (int i = 0; i < len; i++){\n speak(text_to_speech,ar[i]);\n }\n }",
"public Void execute(Object audioMessage) {\n byte[] data = new byte[378];\r\n appVoice.play(new AmrAudioPlayer.AmrData(data));\r\n return null;\r\n }",
"private void sayHello() {\n\n\t\tmTts.speak(translatedText, TextToSpeech.QUEUE_FLUSH, // Drop allpending\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// entries in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the playback\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// queue.\n\t\t\t\tnull);\n\t}",
"@Override\n\tpublic void executeEvent(Meeting meeting) {\n\t\tServerLogger logger = new ServerLogger(\"Audio Event\");\n\t\tSet<Entry<MeetingClient,ThreadedBufferedMessageWriter>> writers = meeting.getClientMessageWriters();\n\t\tfor(Entry<MeetingClient,ThreadedBufferedMessageWriter> writer : writers)\n\t\t{\n\t\t\tif(writer.getKey() != getClientWhoCreatedEvent())\n\t\t\t{\n\t\t\t\twriter.getValue().enqueueMessage(audioMessage);\n\t\t\t}\n\t\t}\n\t}",
"private void pauseAudioPlayback() {\n // Shamelessly copied from MediaPlaybackService.java, which\n // should be public, but isn't.\n Intent i = new Intent(\"com.android.music.musicservicecommand\");\n i.putExtra(\"command\", \"pause\");\n\n sendBroadcast(i);\n }",
"private void speakOut(String text) {\n\n tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);\n }",
"public void run() {\n\t\tif (!Sequencer.isPaused()) update(Sequencer.getTempo());\n\t\tdisplay();\n\t}",
"@Override\n public String speak()\n {\n return \"peep\";\n }",
"public void speak(){\n System.out.println(\"Hi my name is \" + name + \".\\n\" +\n \"I am \" + age + \"years old and \" + height + \" feet tall.\");\n }",
"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 }",
"private void speakout(String cname) \n{\n\t{t1.speak(cname,TextToSpeech.QUEUE_FLUSH,null);\n\tt1.setLanguage(Locale.ENGLISH);\n\t}\n}",
"public void speakOut(final String text){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.speakOut(text.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\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 }",
"@Override\n\tpublic String speak() {\n\t\treturn null;\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tString aString = TestUtils.getStreamVoice(\"ToneTest\");\n\t\t\t\tint i = Integer.valueOf(aString).intValue();\n\t\t\t\tDswLog.e(TAG, \"i = \" + i);\n\t\t\t\tif (null != mAudioManager) {\n\t\t\t\t\tint maxVol = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n\t\t\t\t\tDswLog.e(TAG, \" set stream = music \");\n\t\t\t\t\tmAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, maxVol - i, 0);\n\t\t\t\t\tDswLog.e(TAG, \"maxVol = \" + maxVol + \" setStreamVolume = \" + (maxVol - i));\n\t\t\t\t}\n\t\t\t\t//Gionee <GN_BSP_AutoMMI> <chengq> <20170505> modify for ID 129027 end\n\t\t\t\tgenTone();\n\t\t\t\tplaySound();\n\t\t\t}",
"@Override\n public void run() {\n Transmitter trans = getTransmitter();\n\n if (trans == null) {\n return;\n }\n\n\n // You get your receiver from the synthesizer, then set it in\n // your transmitter. Optionally, you can create an implementation\n // of Receiver to display the messages before they're sent.\n DisplayReceiver displayReceiver = new DisplayReceiver(receiver);\n trans.setReceiver(displayReceiver); // or just \"receiver\"\n\n // You should be able to play on your musical keyboard (transmitter)\n // and hear sounds through your PC synthesizer (receiver)\n System.out.println(\"Play on your musical keyboard...\");\n }",
"public void speak(String text, int queueMode, String[] params) {\n ArrayList<String> speakingParams = new ArrayList<String>();\n if (params != null) {\n speakingParams = new ArrayList<String>(Arrays.asList(params));\n }\n mSelf.speak(text, queueMode, speakingParams);\n }",
"public void process () {\n consoleListenerAndSender.execute(() -> {\n String message = null;\n DataInputStream reader = null;\n try {\n reader = new DataInputStream(new BufferedInputStream(console.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (!isServerAvailable()) {\n message = reader.readUTF();\n\n if (Objects.equals(message, \"/quit\")){\n close();\n setQuitCommandAppear(true);\n break;\n }\n\n sender.sendMessage(message);\n message = null;\n\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n serverListenerAndConsoleWriter.execute(() -> {\n try {\n while (!isServerAvailable()) {\n System.out.println(getter.getInputMessage());\n }\n } catch (IOException e) {\n if (!isQuitCommandAppear()) {\n System.out.println(\"[SERVER ISSUE] server is down.\");\n close();\n setServerAvailable(true);\n }\n else {\n System.out.println(\"Quit...\");\n }\n }\n });\n }",
"public void speak(String text);",
"@Override\n public void onDone(String utteranceId)\n {\n String[] positionString = utteranceId.split(\"_\");\n int paragraph = Integer.parseInt(positionString[0]);\n int sentence = Integer.parseInt(positionString[1]);\n htmlConverter.paragraphs[paragraph].sentences[sentence].speechReady = true;\n }",
"@Override\n public void processPlayer(Player sender, CDPlayer playerData, String[] args) {\n }",
"protected void treatSpeakers()\n\t{\n\t\tint nHP = (Integer) results[0];\n\t\tdouble Xdist = (Double)results[1];\n\t\tdouble Ydist = (Double)results[2];\n\t\tdouble shift = (Double)results[3];\n\t\tfloat height = (Float) results[4];\n\t\tint numHP1 = (Integer) results[5];\n\t\tboolean stereoOrder = (Boolean)results[6];\n\t\tint lastHP = (replace ? 0 : gp.speakers.size()-1);\n\t\tint numHP;\n\t\tint rangees = (nHP / 2);\n\t\tfloat X, Y;\n\t\tif(replace) gp.speakers = new Vector<HoloSpeaker>(nHP);\n\t\tnumHP1 = (evenp(nHP) ? numHP1 : 1 + numHP1);\n\t\t// Creation des HPs en fonction de ces parametres\n\t\tfor (int i = 1; i <= rangees; i++)\n\t\t\t{\n\t\t\t\t// on part du haut a droite, on descend puis on remonte\n\t\t\t\t\n\t\t\t\tX = (float) (-Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + rangees + rangees - i) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\t\n\t\t\t\tX = (float) (Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2+1;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + i - 1) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\tinc();\n\t\t\t}\n\n\t\t\tif (!evenp(nHP))\n\t\t\t{\n\t\t\tX = 0;\n\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5));\n\t\t\tnumHP = ((numHP1 - 1) % nHP) + 1;\n\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t}\n\t}",
"public void speakClicked(View v)\n {\n EditText editText = (EditText) findViewById(R.id.inputText);\n\n mTts.speak(editText.getText().toString(),\n TextToSpeech.QUEUE_FLUSH, // Drop all pending entries in the playback queue.\n null,\n null);\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tendPir();\r\n\t\t}",
"public void reply(){\n ArrayList<String> potentialReceivers= messageController.replyOptionsForSpeaker(speaker);\n ArrayList<String> options = listBuilderWithIntegers(potentialReceivers.size());\n speakerMessageScreen.replyOptions(messageController.replyOptionsForSpeakerInString(speaker));\n if(messageController.replyOptionsForSpeakerInString(speaker).size() != 0) {\n String answerInString = scanner.nextLine();\n while(!options.contains(answerInString)){\n speakerMessageScreen.invalidInput(answerInString);\n answerInString = scanner.nextLine();\n }\n\n // now answer is valid\n\n int answerInInteger = Integer.parseInt(answerInString);\n String receiver = potentialReceivers.get(answerInInteger - 1);\n\n speakerMessageScreen.whatMessage();\n String messageContext = scanner.nextLine();\n messageController.sendMessage(speaker, receiver, messageContext);\n speakerMessageScreen.congratulations();\n }\n\n }",
"void playTone(){\n t = new Thread() {\n public void run(){\n isRunning = true;\n setPriority(Thread.MAX_PRIORITY);\n\n\n\n audioTrack.play();\n\n for (int i = 0; i < message.length(); i++) {\n\n ASCIIBreaker breaker = new ASCIIBreaker((int)message.charAt(i));\n\n int frequencies[] = breaker.ASCIIToFrequency();\n\n //Generate waves for all different frequencies\n for(int fre : frequencies) {\n audioTrack.write(generateSineInTimeDomain(fre),0,sample_size);\n }\n\n audioTrack.write(generateSineInTimeDomain(7000),0,sample_size);\n }\n\n audioTrack.stop();\n audioTrack.release();\n }\n };\n t.start();\n }",
"@Override\n\t public void onDone(String utteranceId)\n\t {\n\t \tLog.d(\"END\", \"FINISHED: \" + utteranceId);\n\t \t\t\tif(DataModel.getInstance().isVoiceActionsEnabled()) {\n\t \t\t\t\tWordActivatorAPI.getInstance().start(); \t\n\t \t\t\t}\n\t }",
"public boolean speak(FreeTTSSpeakable speakable) {\n\tlog(\"speak(FreeTTSSpeakable) called\");\n boolean ok = true;\n\tboolean posted = false;\n\n\tgetAudioPlayer().startFirstSampleTimer();\n\n\tfor (Iterator i = tokenize(speakable); \n !speakable.isCompleted() && i.hasNext() ; ) {\n\t try {\n\t\tUtterance utterance = (Utterance) i.next();\n\t\tif (utterance != null) {\n\t\t processUtterance(utterance);\n\t\t posted = true;\n\t\t}\n\t } catch (ProcessException pe) {\n\t\tok = false;\n\t }\n\t}\n\tif (ok && posted) {\n\t runTimer.start(\"WaitAudio\");\n ok = speakable.waitCompleted();\n runTimer.stop(\"WaitAudio\");\n\t}\n log(\"speak(FreeTTSSpeakable) completed\");\n\treturn ok;\n }",
"public void execute() {\n\t\tString userID = clientMediator.getUserName();\n\t\tString id = reactToController.communicateWith(userID);\n\t\tif(id != null){\n\t\t\tclientMediator.setReactTo(id);\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString message = reactToController.reactToEntity(id,userID);\n\t\t\tString result = \"You just interacted with \" + id + \", so you \" + message + \" at \" + df.format(new Date()).toString();\n\t\t\tclientMediator.setReactResult(result);\n\t\t\tclientMediator.getEventQueue().add(new ReactToEvent(id,userID));\n\t\t}\n\t}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"private void speakIpa(String ipaText, int queueMode, ArrayList<String> params) {\n if (queueMode == 0) {\n stop();\n }\n mSpeechQueue.add(new SpeechItem(ipaText, params, SpeechItem.IPA));\n if (!mIsSpeaking) {\n processSpeechQueue();\n }\n }",
"private void speakout(String cname) \n\t\t\t{\n\t\t\t\t{t1.speak(cname,TextToSpeech.QUEUE_FLUSH,null);\n\t\t\t\tt1.setLanguage(Locale.ENGLISH);\n\t\t\t\t}\n\t\t\t}",
"public void speak(int word) {\n\t\n\tconditionLock.acquire();\n\t \n\t\twhile(speakerReady == true){\n\t\t\tcondLock.sleep();\n\t\t}\n\t\t//~ else{\n\t\t\tspeakerReady = true;\n\t\t\tdata = word;\n\t\t\n\t\t\tif(listenerReady){\n\t\t\t\n\t\t\t\tdata = word;\n\t\t\t\t\n\t\t\t\t//~ speakerReady = false;\n\t\t\t\t\n\t\t\t\tcondLock.wakeAll();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcondLock.sleep();\n\t\t\t\t\n\t\t\t\tdata = word;\n\t\t\t\t//~ speakerReady = false;\n\t\t\t}\n\t\t//~ }\n\t\t\n\t \n\tconditionLock.release();\n\t \n\t\n }",
"private void turnOnSpeakerPhone() {\n mAudioManager.setMode(AudioManager.MODE_IN_CALL);\n mAudioManager.setSpeakerphoneOn(true);\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(1, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n public void run() {\n AudioManager m_amAudioManager;\n m_amAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n m_amAudioManager.setMode(AudioManager.MODE_IN_CALL);\n m_amAudioManager.setSpeakerphoneOn(false);\n AudioTrack track = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,\n AudioFormat.ENCODING_PCM_16BIT, BUF_SIZE, AudioTrack.MODE_STREAM);\n track.play();\n try {\n // Define a socket to receive the audio\n byte[] buf = new byte[BUF_SIZE];\n while(speakers && !UDP) {\n // Play back the audio received from packets\n int rec;\n rec = dataInputStreamInstance.read(buf);\n Log.d(\"rec123\", String.valueOf(rec));\n if (rec > 0)\n track.write(buf, 4, rec);\n }\n // Stop playing back and release resources\n track.stop();\n track.flush();\n track.release();\n speakers = false;\n return;\n }\n catch(SocketException e) {\n speakers = false;\n }\n catch(IOException e) {\n speakers = false;\n }\n }",
"@Override\r\n\tpublic void mesage() {\n\t\tSystem.out.println(\"通过语音发短信\");\r\n\t}",
"@Override\r\n\tpublic List<Speaker> findAllSpeaker() {\n\t\treturn sm.selectByExample(null);\r\n\t}",
"public void talk() {\n\n\t}",
"@Override\n\tpublic void speak() {\n\t\tsuper.speak();\n\t\tSystem.out.println(\"I am a cat.\");\n\t}",
"public static void selfTest() {\n\n\t\tSystem.out.println(\"Got to begin test\");\n\n\t\tSystem.out.println(\"Test 1 speaker 1 listener\");\n\t\tCommunicator comm = new Communicator();\n\t\tKThread threadSpeaker = new KThread(new Speaker(comm, 100));\n\t\tthreadSpeaker.setName(\"speaker\").fork();\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built speaker\");\n\t\tKThread threadListener = new KThread(new Listener(comm));\n\t\tthreadListener.setName(\"Thread listener\").fork();\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built listener\");\n\n\t\tthreadListener.join();\n\t\tthreadSpeaker.join();\n\t\tSystem.out.println(\"Did the join\");\n\n\t\tSystem.out.println(testa);\n\t\t//testing for 1 speaker 1 listener\n\n\t\tSystem.out.println(\"Test many speaker many listener\");\n\t\tCommunicator comm1 = new Communicator();\n\n\t\tKThread speaklist[] = new KThread[10];\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tspeaklist[i] = new KThread(new Speaker(comm1, i));\n\t\t\tspeaklist[i].setName(\"Speaker \" + i).fork();\n\t\t\t//System.out.println(i);\n\t\t}\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built speaker list\");\n\n\t\tKThread listenlist[] = new KThread[10];\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tlistenlist[i] = new KThread(new Listener(comm1));\n\t\t\tlistenlist[i].setName(\"Listener \" + i).fork();\n\t\t}\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built listener list\");\n\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tspeaklist[i].join();\t\t\n\t\t\tlistenlist[i].join();\n\t\t\tSystem.out.println(\"joined lists\");\n\t\t\tSystem.out.println(testa);\n\t\t}\n\t\t//test many speaker many listener\n\t\t\n\t\tSystem.out.println(\"Test many speaker 1 listener\");\n\t\tCommunicator comm2 = new Communicator();\n\t\t\n\t\tKThread speaklist1[] = new KThread[10];\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tspeaklist[i] = new KThread(new Speaker(comm2, i + 1));\n\t\t\tspeaklist[i].setName(\"Speaker \" + i).fork();\n\n\t\t}\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built speaker list 2\");\n\t\t\n\t\tKThread singleListener = new KThread(new Listener(comm2));\n\t\tsingleListener.setName(\"Listener\").fork();\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built listener\");\n\t\t\n\t\tspeaklist1[0].join();\n\t\tsingleListener.join();\n\t\tSystem.out.println(\"joined one on one\");\n\t\tSystem.out.println(testa);\n\t\t\n\t\tfor(int i = 1; i < 10; i++) {\n\t\t\tspeaklist[i].join();\n\t\t\tsingleListener.join();\n\t\t\tSystem.out.println(\"joined on \" + i);\n\t\t\tSystem.out.println(testa);\n\t\t}\n\t\t//test many speaker 1 listener\n\t\t\n\t\t\n\t\tSystem.out.println(\"Test one speaker many listener\");\n\t\tCommunicator comm3 = new Communicator();\n\t\t\n\t\tKThread singlespeaker = new KThread(new Speaker(comm3, 1));\n\t\tsinglespeaker.setName(\"Speaker\").fork();\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built speaker\");\n\t\t\n\t\tKThread listenlist1[] = new KThread[10];\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tlistenlist1[i] = new KThread(new Listener(comm3));\n\t\t\tlistenlist1[i].setName(\"Listener \" + i).fork();\n\t\t}\n\t\tKThread.yield();\n\t\tSystem.out.println(\"Built listener list\");\t\n\t\t\n\t\tsinglespeaker.join();\n\t\tlistenlist1[0].join();\n\t\tSystem.out.println(\"joined\");\n\t\tSystem.out.println(testa);\n\t\t\n\t\tfor(int i = 1; i < 10; i++) {\n\t\t\tsinglespeaker.join();\n\t\t\tlistenlist1[i].join();\n\t\t\tSystem.out.println(\"joined on \" + i);\n\t\t\tSystem.out.println(testa);\n\t\t}\n\t\t//test one speaker many listener\n\t\t\n\t}",
"private void broadcastVoiceCommandAction() {\n\t\tVoiceCommandStartIntent.putExtra(\"command\", mApplications.get(CurIndex).title);\r\n\t\tcontext.sendBroadcast(VoiceCommandStartIntent);\r\n\t}",
"@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tqueuePos.setVisibility(View.VISIBLE);\n\t\t\t\t\tqueuePos.setText(\"AUDIO streaming...\");\n\t\t\t\t\tstartsp.setVisibility(View.GONE);\n\t\t\t\t}",
"public RemoteCall<KlayTransactionReceipt.TransactionReceipt> pause() {\n final Function function = new Function(\n FUNC_PAUSE,\n Arrays.<Type>asList(),\n Collections.<TypeReference<?>>emptyList());\n return executeRemoteCallTransaction(function);\n }",
"public void askForSpeaker(){\n System.out.println(\"Enter the speaker username\");\n }",
"public void speak(int word) {\n\t\tmutex.acquire();\n\t\twhile (message != null)\n\t\t{\n\t\t\tspeakers.sleep();\n\t\t}\n\t\tmessage = new Integer(word);\n\t\tlisteners.wake();\n\t\tacknowledge.sleep();\n\t\tmutex.release();\n\t}",
"private void speakExtractedText(TextToSpeech tts, String fileTextContent){\n Bundle dataMap = new Bundle();\n dataMap.putFloat(TextToSpeech.Engine.KEY_PARAM_PAN, 0f);\n dataMap.putFloat(TextToSpeech.Engine.KEY_PARAM_VOLUME, 1f);\n dataMap.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_VOICE_CALL);\n\n\n tts.speak(fileTextContent, TextToSpeech.QUEUE_FLUSH, dataMap, FRAGMENT_GENERAL_UTTERANCE_ID);\n }",
"@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}",
"public void pauseFile() {\n Packet packet = new Packet(address, port);\n packet.setPauseFlag();\n \n Random random = new Random(); \n int sequenceNumber = random.nextInt();\n packet.setSeqNumber(sequenceNumber);\n \n sender = new ReliableSender(packet.makePacket(), sendQueue, sequenceNumber);\n sender.start();\n }",
"public void run() {\n //Moved Observers NOV 15\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController); //would be created\n }\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController.userInfo);\n }\n CSVReader fileReader = new CSVReader(\"phase1/src/Resources/Talks.csv\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n for(ArrayList<String> talkData: fileReader.getData()){\n this.talkManager.createTalk(talkData.get(0), talkData.get(1), talkData.get(2),\n talkData.get(3), LocalDateTime.parse(talkData.get(4), formatter));\n }\n setTalkManager();\n messagingSystem.run();\n scheduleSystem.run();\n createSignUpAttendees();\n if (this.user instanceof Attendee) {\n userScheduleController.setSignUpMap(signUpMap);\n }\n if (this.user instanceof Organizer) {\n orgScheduleController.setSignUpMap(signUpMap);\n }\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public void speakIpa(String ipaText, int queueMode, String[] params) {\n ArrayList<String> speakingParams = new ArrayList<String>();\n if (params != null) {\n speakingParams = new ArrayList<String>(Arrays.asList(params));\n }\n mSelf.speakIpa(ipaText, queueMode, speakingParams);\n }",
"public void speak(int word) {\n\t\tcommlock.acquire();\n\t\twhile(listenersWaiting == 0 || sharedWordInUse)\n\t\t\tspeaker.sleep();\n\n\t\tsharedWordInUse = true;\n\t\tsharedWord = word;\n\n\t\tlistener.wake();\n commlock.release();\n }",
"private void mute(String[] command) {\n\t\ttry {\n\t\t\tnew ProcessBuilder(Constants.CH_PATH_NIRCMD, \"mutesysvolume\", \"1\")\n\t\t\t\t\t.start();\n\t\t\tSystem.out.println(\"Muting sound.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void speak(int word) {\n\t\t\n\t\tboolean flag=Machine.interrupt().disable();\n\t\tspeakerNum++;\n\t\tif(hasSpoken||speakerNum!=1)\n\t\t{\n\t\t\twaitToSpeak.waitForAccess(KThread.currentThread());\n\t\t\tKThread.sleep();\n\t\t}\n\t\thasSpoken=true;\n\t\tthis.word=word;\n\t\tKThread thread=null;\n\t\tif((thread=waitToListen.nextThread())!=null)\n\t\t\tthread.ready();\n\t\tspeakerNum--;\n\t//\tSystem.out.println(\"speak:\"+word+\" \"+KThread.currentThread().toString());\n\t\tMachine.interrupt().setStatus(flag);\n\n\t\treturn ;\n\t}",
"@Override\n protected Void call() throws InterruptedException {\n _tempVr.SetTimeout(5);\n _tempVr.SetMicDistance(Protocol.Distance.FAR_MIC);\n\n updateMessage(String.format(\"Speak%s\", System.getProperty(\"line.separator\")));\n\n //instruct the module to listen for a built in word from the 1st wordset\n _tempVr.RecognizeWord(1);\n\n //need to wait until HasFinished has completed before collecting results\n while (!_tempVr.HasFinished()) {\n updateMessage(\".\");\n }\n\n // Once HasFinished has returned true, we can ask the module for the index of the word it recognised. If you're new to using the EasyVR module,\n // download the Easy VR Commander (http://www.veear.eu/downloads/) to interrogate the config of your module and see what the indexes correspond to\n // Here is a standard setup at time of writing for an EASYVR 3 module:\n // 0=Action,1=Move,2=Turn,3=Run,4=Look,5=Attack,6=Stop,7=Hello\n int indexOfRecognisedWord = _tempVr.GetWord();\n\n updateMessage(String.format(\"Response: %d%s\", indexOfRecognisedWord, System.getProperty(\"line.separator\")));\n // updateMessage(String.format(\"Recognition finished%s\", System.getProperty(\"line.separator\")));\n\n return null;\n }",
"public void execute() throws ProtocolException\n {\n protocol.addEventListener(this);\n\n try\n {\n // Loop forever\n while (true)\n {\n // Send command\n protocol.sendPlayAt(slot, track);\n \n // Wait for complete\n if (complete.attempt(10000))\n {\n // All done\n return;\n }\n\n LoggerSingleton.logDebugCoarse(this.getClass(), \"execute\", \"retry\");\n }\n }\n catch (InterruptedException e)\n {\n // Clear interruption and translate\n Thread.currentThread().interrupt();\n throw new ProtocolException(e.toString());\n }\n finally\n {\n // Alway bind the protocol\n protocol.removeEventListener(this);\n }\n }",
"@Override\r\n\tpublic void call() {\n\t\tSystem.out.println(\"通过语音打电话\");\r\n\t}",
"public void sounding() {\n\t\tSystem.out.println(\"Hello,I am your MobilePhone!\");\n\t}",
"public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }",
"protected void sequence_Pause(ISerializationContext context, Pause semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DroneDSLLibPackage.Literals.PAUSE__DUREE) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DroneDSLLibPackage.Literals.PAUSE__DUREE));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getPauseAccess().getDureeSecondeExpParserRuleCall_1_0(), semanticObject.getDuree());\n\t\tfeeder.finish();\n\t}",
"@Override\n public void pauseTTS() {\n Log.e(\"test_TTS\", \"pauseTTS\");\n }",
"@Override\n public void pauseTTS() {\n Log.e(\"test_TTS\", \"pauseTTS\");\n }",
"public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }",
"public void playRecording() {\n\t\tString command = \"aplay foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess playProcess = pb.start();\n\t\t\t\n\t\t\tplayProcess.waitFor();\n\t\t\t\n\t\t\tplayProcess.destroy();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}",
"public void run() {\n try {\n \t // Resends all packets that have been previously sent but that have\n \t // not yet been acknowledged \n \t for (packet packetToEmulator : unACKedPacketsSent) {\n // Writes the packet to send to the emulator out to the sender socket\n packetToEmulator.sendTo(emulatorAddress, emulatorPort, senderSocket);\n \n // Reads in the sequence number of the sent packet\n int seqNum = packetToEmulator.getSeqNum();\n \n if (!packetToEmulator.isEOT()) { // Sent a data packet?\n // Writes the sequence number of the sent packet to the sequence\n // number log\n seqNumLogWriter.write(String.valueOf(seqNum));\n seqNumLogWriter.newLine();\n } // if\n } // for\n } catch (Exception e) {\n \t System.out.println(\"ERROR: \" + e.toString());\n \t System.exit(-1);\n } // try\n }",
"void instancePaused(String pid, IPausedResult result);",
"@Override\n public void pause() {\n }",
"@Override\r\n public void run() {\n this.running = true;\r\n\r\n // start the execution cycle\r\n while (running) {\r\n if (!eventQ.isEmpty()) {\r\n while (!eventQ.isEmpty() && running) {\r\n EnvironmentEvent envEvent = eventQ.poll();\r\n if (envEvent != null) {\r\n playSound(envEvent);\r\n }\r\n }\r\n } else {\r\n try {\r\n Thread.sleep(10);\r\n Thread.yield();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}"
]
| [
"0.61174846",
"0.60070974",
"0.5718397",
"0.57063836",
"0.57019037",
"0.56821895",
"0.5677125",
"0.5648358",
"0.5627371",
"0.5587621",
"0.5532533",
"0.54803216",
"0.5458968",
"0.5428748",
"0.5421336",
"0.5420944",
"0.5406372",
"0.5393476",
"0.53873485",
"0.53766805",
"0.5363879",
"0.5362195",
"0.53384715",
"0.53299177",
"0.5318758",
"0.531676",
"0.53140146",
"0.53112394",
"0.5306088",
"0.5300488",
"0.5292958",
"0.5283251",
"0.52749854",
"0.52714556",
"0.5268425",
"0.5267689",
"0.5261705",
"0.5253984",
"0.52151865",
"0.5212958",
"0.52077615",
"0.5207176",
"0.5197838",
"0.5191952",
"0.5135418",
"0.51233083",
"0.50978035",
"0.5090393",
"0.5072801",
"0.50661933",
"0.50659126",
"0.50571537",
"0.5043522",
"0.5041773",
"0.5034171",
"0.5023721",
"0.50228274",
"0.5021926",
"0.5020089",
"0.50154084",
"0.5010981",
"0.49985743",
"0.4994343",
"0.49675015",
"0.4958633",
"0.49563238",
"0.49561766",
"0.495191",
"0.4942405",
"0.49307835",
"0.49280706",
"0.49248227",
"0.49160933",
"0.48941392",
"0.4890494",
"0.48745555",
"0.48649055",
"0.48594385",
"0.48548007",
"0.4853669",
"0.4847862",
"0.48458233",
"0.48442596",
"0.4844065",
"0.4834645",
"0.48325524",
"0.48277327",
"0.4827595",
"0.4827595",
"0.48250625",
"0.4823639",
"0.48175257",
"0.48168963",
"0.48164538",
"0.48130405",
"0.48101404",
"0.4808833",
"0.4808833",
"0.4808833",
"0.4808833",
"0.4808833"
]
| 0.0 | -1 |
/ renamed from: com.ss.android.ugc.asve.recorder.reaction.a | public interface C20779a {
/* renamed from: a */
C15430g mo56154a();
/* renamed from: a */
void mo56155a(float f);
/* renamed from: a */
void mo56156a(int i, int i2);
/* renamed from: b */
float mo56157b();
/* renamed from: b */
boolean mo56158b(int i, int i2);
/* renamed from: c */
int[] mo56159c();
/* renamed from: d */
int[] mo56160d();
/* renamed from: e */
void mo56161e();
/* renamed from: f */
ReactionWindowInfo mo56162f();
/* renamed from: g */
void mo56163g();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void m6600Q() {\n this.f5397Q = new C1290d(this, (C1296Ua) null);\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.android.bbksoundrecorder.intent.action.RECORDER_STATE\");\n intentFilter.addAction(\"com.android.bbksoundrecorder.intent.action.HANDLE_ERROR\");\n intentFilter.addAction(\"android.intent.action.USER_SWITCHED\");\n C0900b.m4902a(this.f5389I).mo4900a(this.f5397Q, intentFilter);\n }",
"public void mo5976m() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.android.activity.SoundRecorder.MARKRECEIVER\");\n registerReceiver(this.f5430ma, intentFilter);\n }",
"private void m6627b(Intent intent) {\n String action = intent.getAction();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>,getAction =\" + action);\n if (\"android.provider.MediaStore.RECORD_SOUND\".equals(action) || \"android.intent.action.GET_CONTENT\".equals(action) || \"android.intent.action.PICK\".equals(action)) {\n String type = intent.getType();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>,getType =\" + type);\n if (type != null) {\n if (type.equals(\"audio/mp4\") || type.equals(\"audio/amr\") || type.equals(\"audio/evrc\") || type.equals(\"audio/qcelp\") || type.equals(\"audio/aac_mp4\") || type.equals(\"audio/*\") || type.equals(\"*/*\")) {\n this.f5415f = \"audio/aac_mp4\";\n } else {\n setResult(0);\n finish();\n return;\n }\n }\n String O = m6598O();\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseNormalIntent>, referrerStr: \" + O);\n if (O == null || !O.contains(\"com.vivo.easyshare\")) {\n this.f5427l = true;\n m6661u();\n } else {\n m6661u();\n }\n this.f5453y = intent.getLongExtra(\"android.provider.MediaStore.extra.MAX_BYTES\", -1);\n long j = this.f5453y;\n if (-1 == j) {\n this.f5421i = false;\n } else if (j > 2048) {\n this.f5421i = true;\n } else {\n this.f5453y = -1;\n this.f5421i = false;\n setResult(0);\n finish();\n return;\n }\n C0938a.m5006c(\"SR/SoundRecorder\", \"<parseNormalIntent>,mMaxFileSize = \" + this.f5453y + \",mHasFileSizeLimitation = \" + this.f5421i + \",messageAddRecorder = \" + this.f5427l);\n }\n }",
"public final void h(int r13) {\n /*\n r12 = this;\n android.content.Intent r0 = new android.content.Intent\n java.lang.String r1 = \"com.cuatroochenta.miniland.PLAYER_ACTION\"\n r0.<init>(r1)\n java.lang.String r1 = \"EXTRA_KEY_PLAYER_STATUS_CODE\"\n r0.putExtra(r1, r13)\n java.lang.String r1 = r12.h\n java.lang.String r2 = \"EXTRA_KEY_PLAYLIST_TYPE\"\n r0.putExtra(r2, r1)\n boolean r1 = r12.f\n java.lang.String r2 = \"EXTRA_KEY_INFO_CURRENT_TRACK\"\n if (r1 == 0) goto L_0x0036\n int r1 = r12.f3936d\n if (r1 < 0) goto L_0x0036\n java.util.ArrayList<com.cuatroochenta.miniland.model.Song> r3 = r12.f3935c\n int r3 = r3.size()\n if (r1 >= r3) goto L_0x0036\n java.util.ArrayList<com.cuatroochenta.miniland.model.Song> r1 = r12.f3935c\n int r3 = r12.f3936d\n java.lang.Object r1 = r1.get(r3)\n com.cuatroochenta.miniland.model.Song r1 = (com.cuatroochenta.miniland.model.Song) r1\n java.util.ArrayList<com.cuatroochenta.miniland.model.Song> r3 = r12.f3934b\n int r1 = r3.indexOf(r1)\n goto L_0x0038\n L_0x0036:\n int r1 = r12.f3936d\n L_0x0038:\n r0.putExtra(r2, r1)\n boolean r1 = r12.f\n java.lang.String r2 = \"EXTRA_KEY_INFO_SHUFFLE_MODE\"\n r0.putExtra(r2, r1)\n boolean r1 = r12.f3937e\n java.lang.String r2 = \"EXTRA_KEY_INFO_IS_LOOP_MODE\"\n r0.putExtra(r2, r1)\n java.lang.String r1 = r12.c()\n java.lang.String r2 = \"EXTRA_KEY_INFO_CURRENT_SONG_NAME\"\n r0.putExtra(r2, r1)\n android.media.MediaPlayer r1 = r12.f3933a\n if (r1 == 0) goto L_0x0079\n int r1 = r1.getCurrentPosition()\n int r1 = r1 / 1000\n java.lang.String r2 = \"EXTRA_KEY_INFO_CURRENT_POSITION\"\n r0.putExtra(r2, r1)\n android.media.MediaPlayer r1 = r12.f3933a\n boolean r1 = r1.isPlaying()\n java.lang.String r2 = \"EXTRA_KEY_INFO_IS_PLAYING\"\n r0.putExtra(r2, r1)\n android.media.MediaPlayer r1 = r12.f3933a\n int r1 = r1.getDuration()\n int r1 = r1 / 1000\n java.lang.String r2 = \"EXTRA_KEY_INFO_TRACK_DURATION\"\n r0.putExtra(r2, r1)\n L_0x0079:\n android.os.CountDownTimer r1 = r12.i\n r2 = 0\n r3 = 1000(0x3e8, double:4.94E-321)\n java.lang.String r5 = \"EXTRA_KEY_INFO_COUNTDOWN_TIMEFINISH\"\n r6 = 1\n r7 = 0\n java.lang.String r9 = \"EXTRA_KEY_INFO_COUNTDOWN_STATUS\"\n if (r1 == 0) goto L_0x0098\n long r10 = r12.j\n int r1 = (r10 > r7 ? 1 : (r10 == r7 ? 0 : -1))\n if (r1 <= 0) goto L_0x0098\n r0.putExtra(r9, r2)\n long r7 = r12.j\n long r9 = java.lang.System.currentTimeMillis()\n long r7 = r7 - r9\n goto L_0x00a3\n L_0x0098:\n long r10 = r12.k\n int r1 = (r10 > r7 ? 1 : (r10 == r7 ? 0 : -1))\n if (r1 <= 0) goto L_0x00a9\n r0.putExtra(r9, r6)\n long r7 = r12.k\n L_0x00a3:\n long r7 = r7 / r3\n int r1 = (int) r7\n r0.putExtra(r5, r1)\n goto L_0x00ad\n L_0x00a9:\n r1 = 2\n r0.putExtra(r9, r1)\n L_0x00ad:\n com.sozpic.miniland.AppMiniland r1 = com.sozpic.miniland.AppMiniland.f()\n boolean r1 = r1.n()\n if (r1 == 0) goto L_0x00cf\n java.lang.Object[] r1 = new java.lang.Object[r6]\n java.lang.Integer r13 = java.lang.Integer.valueOf(r13)\n r1[r2] = r13\n java.lang.String r13 = \"PlayerService -> Send status %d to LocalBroadcast\"\n java.lang.String r13 = java.lang.String.format(r13, r1)\n a.c.a.f.e.b(r13)\n androidx.localbroadcastmanager.content.LocalBroadcastManager r13 = androidx.localbroadcastmanager.content.LocalBroadcastManager.getInstance(r12)\n r13.sendBroadcast(r0)\n L_0x00cf:\n r12.sendBroadcast(r0)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuatroochenta.miniland.player.PlayerService.h(int):void\");\n }",
"public void mo5958a(int i) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onError>,error = \" + i);\n if (i != 0) {\n Resources resources = getResources();\n String str = null;\n switch (i) {\n case 1:\n String string = resources.getString(R.string.error_space_expired_save);\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n if (bVar.mo6347h() != null) {\n str = this.f5401U.mo6347h().getName().substring(0);\n }\n this.f5411d = str;\n }\n m6629b(this.f5411d);\n C1492b.m7431a((Context) this, (CharSequence) string, 0).show();\n return;\n case 2:\n C1492b.m7431a((Context) this, (CharSequence) resources.getString(R.string.error_sdcard_access), 0).show();\n C1425w wVar = this.f5399S;\n if (wVar != null) {\n wVar.mo6191v();\n return;\n }\n return;\n case 4:\n C1492b.m7431a((Context) this, (CharSequence) resources.getString(R.string.error_app_unsupported), 0).show();\n return;\n case 6:\n this.f5401U.mo6350k();\n finish();\n return;\n case 7:\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onError>,ERROR_INTERNAL_RECORDER_OCCUPIED\");\n C1492b.m7431a((Context) this, (CharSequence) resources.getString(R.string.error_app_recorder_occupied), 0).show();\n return;\n case 9:\n if (C1413m.m6844f()) {\n this.f5392L.mo6499b();\n } else if (m6595L()) {\n this.f5391K.mo6584a();\n } else {\n this.f5392L.mo6499b();\n }\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onError>,ERROR_INTERNAL_RECORDER_OCCUPIED\");\n C1492b.m7431a((Context) this, (CharSequence) resources.getString(R.string.savefail), 0).show();\n return;\n case 10:\n AlertDialog alertDialog = this.f5383C;\n if (alertDialog != null && alertDialog.isShowing()) {\n this.f5383C.getButton(-2).performClick();\n return;\n }\n return;\n case 11:\n RecordService.C1445b bVar2 = this.f5401U;\n if (bVar2 != null && bVar2.mo6345f() == 2) {\n if (this.f5401U.mo6347h() != null) {\n str = this.f5401U.mo6347h().getName().substring(0);\n }\n this.f5411d = str;\n m6629b(this.f5411d);\n return;\n }\n return;\n default:\n return;\n }\n }\n }",
"public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }",
"private void b(com.whatsapp.protocol.co r15) {\n /*\n r14 = this;\n r8 = com.whatsapp.DialogToastActivity.f;\n r0 = r15.Q;\n r0 = (com.whatsapp.MediaData) r0;\n r1 = com.whatsapp.App.z();\n r2 = z;\n r3 = 9;\n r2 = r2[r3];\n r3 = r15.c;\n r4 = r15.r;\n r5 = 1;\n r3 = com.whatsapp.util.ag.a(r1, r2, r3, r4, r5);\n r1 = new com.whatsapp.akr;\n r2 = r0.file;\n r4 = r0.trimFrom;\n r6 = r0.trimTo;\n r1.<init>(r2, r3, r4, r6);\n r2 = new com.whatsapp.n3;\n r2.<init>(r14, r15, r0);\n r1.a(r2);\n r0.transcoder = r1;\n r4 = 0;\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x01df }\n r2 = r2.createNewFile();\t Catch:{ Exception -> 0x01df }\n if (r2 != 0) goto L_0x0057;\n L_0x0037:\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x01df }\n r2.<init>();\t Catch:{ Exception -> 0x01df }\n r5 = z;\t Catch:{ Exception -> 0x01df }\n r6 = 14;\n r5 = r5[r6];\t Catch:{ Exception -> 0x01df }\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x01df }\n r5 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x01df }\n r5 = r5.getAbsolutePath();\t Catch:{ Exception -> 0x01df }\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x01df }\n r2 = r2.toString();\t Catch:{ Exception -> 0x01df }\n com.whatsapp.util.Log.w(r2);\t Catch:{ Exception -> 0x01df }\n L_0x0057:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x01e1 }\n r2 = r2.getAbsolutePath();\t Catch:{ Exception -> 0x01e1 }\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\t Catch:{ Exception -> 0x01e1 }\n L_0x0060:\n r2 = r14.b;\t Catch:{ Exception -> 0x01ed }\n if (r2 == 0) goto L_0x0069;\n L_0x0064:\n r2 = r14.b;\t Catch:{ Exception -> 0x01ed }\n r2.acquire();\t Catch:{ Exception -> 0x01ed }\n L_0x0069:\n r2 = r0.file;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n r2 = com.whatsapp.akr.d(r2);\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n if (r2 == 0) goto L_0x00f1;\n L_0x0071:\n r6 = new com.whatsapp.util.a4;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n r2 = r0.file;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n r6.<init>(r2);\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n r7 = r6.a();\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n r9 = r6.d();\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n if (r7 < r9) goto L_0x0089;\n L_0x0082:\n r5 = 640; // 0x280 float:8.97E-43 double:3.16E-321;\n r2 = r9 * r5;\n r2 = r2 / r7;\n if (r8 == 0) goto L_0x008e;\n L_0x0089:\n r2 = 640; // 0x280 float:8.97E-43 double:3.16E-321;\n r5 = r7 * r2;\n r5 = r5 / r9;\n L_0x008e:\n r10 = r0.trimFrom;\t Catch:{ Exception -> 0x022c }\n r12 = 0;\n r7 = (r10 > r12 ? 1 : (r10 == r12 ? 0 : -1));\n if (r7 < 0) goto L_0x00cb;\n L_0x0096:\n r10 = r0.trimTo;\t Catch:{ Exception -> 0x022c }\n r12 = 0;\n r7 = (r10 > r12 ? 1 : (r10 == r12 ? 0 : -1));\n if (r7 <= 0) goto L_0x00cb;\n L_0x009e:\n r7 = r6.b();\t Catch:{ Exception -> 0x022e }\n if (r7 != 0) goto L_0x00ba;\n L_0x00a4:\n r7 = r0.file;\t Catch:{ Exception -> 0x0230 }\n r7 = com.whatsapp.akr.a(r7);\t Catch:{ Exception -> 0x0230 }\n if (r7 == 0) goto L_0x00ba;\n L_0x00ac:\n r7 = z;\t Catch:{ Exception -> 0x0232 }\n r9 = 12;\n r7 = r7[r9];\t Catch:{ Exception -> 0x0232 }\n com.whatsapp.util.Log.i(r7);\t Catch:{ Exception -> 0x0232 }\n r1.a();\t Catch:{ Exception -> 0x0232 }\n if (r8 == 0) goto L_0x00ef;\n L_0x00ba:\n r10 = r0.trimTo;\t Catch:{ Exception -> 0x0234 }\n r12 = r0.trimFrom;\t Catch:{ Exception -> 0x0234 }\n r10 = r10 - r12;\n r7 = com.whatsapp.util.ag.a(r5, r2, r10);\t Catch:{ Exception -> 0x0234 }\n r1.a(r7);\t Catch:{ Exception -> 0x0234 }\n r1.c();\t Catch:{ Exception -> 0x0234 }\n if (r8 == 0) goto L_0x00ef;\n L_0x00cb:\n r7 = r6.b();\t Catch:{ Exception -> 0x0236 }\n if (r7 != 0) goto L_0x00e1;\n L_0x00d1:\n r7 = z;\t Catch:{ Exception -> 0x0238 }\n r9 = 15;\n r7 = r7[r9];\t Catch:{ Exception -> 0x0238 }\n com.whatsapp.util.Log.i(r7);\t Catch:{ Exception -> 0x0238 }\n r7 = r0.file;\t Catch:{ Exception -> 0x0238 }\n com.whatsapp.util.ag.a(r7, r3);\t Catch:{ Exception -> 0x0238 }\n if (r8 == 0) goto L_0x00ef;\n L_0x00e1:\n r6 = r6.c();\t Catch:{ Exception -> 0x023a }\n r2 = com.whatsapp.util.ag.a(r5, r2, r6);\t Catch:{ Exception -> 0x023a }\n r1.a(r2);\t Catch:{ Exception -> 0x023a }\n r1.c();\t Catch:{ Exception -> 0x023a }\n L_0x00ef:\n if (r8 == 0) goto L_0x02d6;\n L_0x00f1:\n r6 = r0.trimFrom;\t Catch:{ Exception -> 0x0279 }\n r10 = 0;\n r2 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1));\n if (r2 < 0) goto L_0x0106;\n L_0x00f9:\n r6 = r0.trimTo;\t Catch:{ Exception -> 0x027b }\n r10 = 0;\n r2 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1));\n if (r2 <= 0) goto L_0x0106;\n L_0x0101:\n r1.a();\t Catch:{ Exception -> 0x027d }\n if (r8 == 0) goto L_0x02d6;\n L_0x0106:\n r2 = r0.file;\t Catch:{ Exception -> 0x027f }\n r6 = r2.length();\t Catch:{ Exception -> 0x027f }\n r6 = (double) r6;\t Catch:{ Exception -> 0x027f }\n r2 = com.whatsapp.a59.e;\t Catch:{ Exception -> 0x027f }\n r10 = (long) r2;\n r12 = 1048576; // 0x100000 float:1.469368E-39 double:5.180654E-318;\n r10 = r10 * r12;\n r10 = (double) r10;\n r12 = 4609434218613702656; // 0x3ff8000000000000 float:0.0 double:1.5;\n r10 = r10 * r12;\n r2 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1));\n if (r2 >= 0) goto L_0x012c;\n L_0x011c:\n r2 = z;\t Catch:{ Exception -> 0x0281 }\n r5 = 13;\n r2 = r2[r5];\t Catch:{ Exception -> 0x0281 }\n com.whatsapp.util.Log.i(r2);\t Catch:{ Exception -> 0x0281 }\n r2 = r0.file;\t Catch:{ Exception -> 0x0281 }\n com.whatsapp.util.ag.a(r2, r3);\t Catch:{ Exception -> 0x0281 }\n if (r8 == 0) goto L_0x02d6;\n L_0x012c:\n r2 = new java.lang.IllegalArgumentException;\t Catch:{ Exception -> 0x0132 }\n r2.<init>();\t Catch:{ Exception -> 0x0132 }\n throw r2;\t Catch:{ Exception -> 0x0132 }\n L_0x0132:\n r2 = move-exception;\n throw r2;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n L_0x0134:\n r2 = move-exception;\n r5 = z;\t Catch:{ all -> 0x0332 }\n r6 = 17;\n r5 = r5[r6];\t Catch:{ all -> 0x0332 }\n com.whatsapp.util.Log.b(r5, r2);\t Catch:{ all -> 0x0332 }\n b(r2);\t Catch:{ all -> 0x0332 }\n r2 = r14.a;\t Catch:{ all -> 0x0332 }\n r5 = new com.whatsapp.jz;\t Catch:{ all -> 0x0332 }\n r5.<init>(r14);\t Catch:{ all -> 0x0332 }\n r2.post(r5);\t Catch:{ all -> 0x0332 }\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\n r2 = r14.b;\n if (r2 == 0) goto L_0x0160;\n L_0x0153:\n r2 = r14.b;\t Catch:{ Exception -> 0x0380 }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x0380 }\n if (r2 == 0) goto L_0x0160;\n L_0x015b:\n r2 = r14.b;\t Catch:{ Exception -> 0x0380 }\n r2.release();\t Catch:{ Exception -> 0x0380 }\n L_0x0160:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0382 }\n r2 = r2.exists();\t Catch:{ Exception -> 0x0382 }\n if (r2 == 0) goto L_0x016d;\n L_0x0168:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0382 }\n r2.delete();\t Catch:{ Exception -> 0x0382 }\n L_0x016d:\n if (r4 == 0) goto L_0x01c8;\n L_0x016f:\n r0.file = r3;\t Catch:{ Exception -> 0x0398 }\n r2 = 1;\n r0.transcoded = r2;\t Catch:{ Exception -> 0x0398 }\n r2 = r0.file;\t Catch:{ Exception -> 0x0398 }\n r2 = r2.length();\t Catch:{ Exception -> 0x0398 }\n r0.fileSize = r2;\t Catch:{ Exception -> 0x0398 }\n r2 = r0.file;\t Catch:{ Exception -> 0x0398 }\n r2 = r2.getName();\t Catch:{ Exception -> 0x0398 }\n r15.A = r2;\t Catch:{ Exception -> 0x0398 }\n r2 = r0.fileSize;\t Catch:{ Exception -> 0x0398 }\n r15.z = r2;\t Catch:{ Exception -> 0x0398 }\n r2 = r0.file;\t Catch:{ Exception -> 0x0398 }\n r2 = com.whatsapp.util.ag.c(r2);\t Catch:{ Exception -> 0x0398 }\n r15.H = r2;\t Catch:{ Exception -> 0x0398 }\n r2 = r0.trimFrom;\t Catch:{ Exception -> 0x0398 }\n r4 = 0;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 <= 0) goto L_0x01b5;\n L_0x0198:\n com.whatsapp.util.bd.b(r15);\n r2 = r0.file;\n r2 = r2.getAbsolutePath();\n r2 = com.whatsapp.util.ag.b(r2);\n if (r2 == 0) goto L_0x01ac;\n L_0x01a7:\n r15.a(r2);\t Catch:{ Exception -> 0x039a }\n if (r8 == 0) goto L_0x01b5;\n L_0x01ac:\n r2 = z;\t Catch:{ Exception -> 0x039a }\n r3 = 20;\n r2 = r2[r3];\t Catch:{ Exception -> 0x039a }\n com.whatsapp.util.Log.w(r2);\t Catch:{ Exception -> 0x039a }\n L_0x01b5:\n r2 = com.whatsapp.App.aK;\t Catch:{ Exception -> 0x039c }\n r3 = 1;\n r4 = -1;\n r2.a(r15, r3, r4);\t Catch:{ Exception -> 0x039c }\n r2 = r14.a;\t Catch:{ Exception -> 0x039c }\n r3 = new com.whatsapp.o9;\t Catch:{ Exception -> 0x039c }\n r3.<init>(r14, r15);\t Catch:{ Exception -> 0x039c }\n r2.post(r3);\t Catch:{ Exception -> 0x039c }\n if (r8 == 0) goto L_0x01de;\n L_0x01c8:\n r2 = 0;\n r0.transferring = r2;\t Catch:{ Exception -> 0x039e }\n r2 = 0;\n r15.d = r2;\t Catch:{ Exception -> 0x039e }\n r1 = r1.h();\t Catch:{ Exception -> 0x039e }\n if (r1 == 0) goto L_0x01d7;\n L_0x01d4:\n r1 = 0;\n r0.autodownloadRetryEnabled = r1;\t Catch:{ Exception -> 0x039e }\n L_0x01d7:\n r0 = com.whatsapp.App.aK;\n r1 = 1;\n r2 = -1;\n r0.a(r15, r1, r2);\n L_0x01de:\n return;\n L_0x01df:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x01e1 }\n L_0x01e1:\n r2 = move-exception;\n r5 = z;\n r6 = 11;\n r5 = r5[r6];\n com.whatsapp.util.Log.b(r5, r2);\n goto L_0x0060;\n L_0x01ed:\n r2 = move-exception;\n throw r2;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n L_0x01ef:\n r2 = move-exception;\n r5 = z;\t Catch:{ all -> 0x0332 }\n r6 = 18;\n r5 = r5[r6];\t Catch:{ all -> 0x0332 }\n com.whatsapp.util.Log.e(r5);\t Catch:{ all -> 0x0332 }\n b(r2);\t Catch:{ all -> 0x0332 }\n r2 = r14.a;\t Catch:{ all -> 0x0332 }\n r5 = new com.whatsapp.gw;\t Catch:{ all -> 0x0332 }\n r5.<init>(r14);\t Catch:{ all -> 0x0332 }\n r2.post(r5);\t Catch:{ all -> 0x0332 }\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\n r2 = r14.b;\n if (r2 == 0) goto L_0x021b;\n L_0x020e:\n r2 = r14.b;\t Catch:{ Exception -> 0x0384 }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x0384 }\n if (r2 == 0) goto L_0x021b;\n L_0x0216:\n r2 = r14.b;\t Catch:{ Exception -> 0x0384 }\n r2.release();\t Catch:{ Exception -> 0x0384 }\n L_0x021b:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x022a }\n r2 = r2.exists();\t Catch:{ Exception -> 0x022a }\n if (r2 == 0) goto L_0x016d;\n L_0x0223:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x022a }\n r2.delete();\t Catch:{ Exception -> 0x022a }\n goto L_0x016d;\n L_0x022a:\n r0 = move-exception;\n throw r0;\n L_0x022c:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x022e }\n L_0x022e:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0230 }\n L_0x0230:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0232 }\n L_0x0232:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0234 }\n L_0x0234:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0236 }\n L_0x0236:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0238 }\n L_0x0238:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x023a }\n L_0x023a:\n r2 = move-exception;\n throw r2;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n L_0x023c:\n r2 = move-exception;\n r5 = z;\t Catch:{ all -> 0x0332 }\n r6 = 19;\n r5 = r5[r6];\t Catch:{ all -> 0x0332 }\n com.whatsapp.util.Log.b(r5, r2);\t Catch:{ all -> 0x0332 }\n b(r2);\t Catch:{ all -> 0x0332 }\n r2 = r14.a;\t Catch:{ all -> 0x0332 }\n r5 = new com.whatsapp.aie;\t Catch:{ all -> 0x0332 }\n r5.<init>(r14);\t Catch:{ all -> 0x0332 }\n r2.post(r5);\t Catch:{ all -> 0x0332 }\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\n r2 = r14.b;\n if (r2 == 0) goto L_0x0268;\n L_0x025b:\n r2 = r14.b;\t Catch:{ Exception -> 0x0386 }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x0386 }\n if (r2 == 0) goto L_0x0268;\n L_0x0263:\n r2 = r14.b;\t Catch:{ Exception -> 0x0386 }\n r2.release();\t Catch:{ Exception -> 0x0386 }\n L_0x0268:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0277 }\n r2 = r2.exists();\t Catch:{ Exception -> 0x0277 }\n if (r2 == 0) goto L_0x016d;\n L_0x0270:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0277 }\n r2.delete();\t Catch:{ Exception -> 0x0277 }\n goto L_0x016d;\n L_0x0277:\n r0 = move-exception;\n throw r0;\n L_0x0279:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x027b }\n L_0x027b:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x027d }\n L_0x027d:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x027f }\n L_0x027f:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0281 }\n L_0x0281:\n r2 = move-exception;\n throw r2;\t Catch:{ Exception -> 0x0132 }\n L_0x0283:\n r2 = move-exception;\n r5 = z;\t Catch:{ Exception -> 0x0388 }\n r6 = 21;\n r5 = r5[r6];\t Catch:{ Exception -> 0x0388 }\n com.whatsapp.util.Log.b(r5, r2);\t Catch:{ Exception -> 0x0388 }\n b(r2);\t Catch:{ Exception -> 0x0388 }\n r5 = r2.getMessage();\t Catch:{ Exception -> 0x0388 }\n if (r5 == 0) goto L_0x02b0;\n L_0x0296:\n r2 = r2.getMessage();\t Catch:{ Exception -> 0x0388 }\n r5 = z;\t Catch:{ Exception -> 0x0388 }\n r6 = 8;\n r5 = r5[r6];\t Catch:{ Exception -> 0x0388 }\n r2 = r2.contains(r5);\t Catch:{ Exception -> 0x0388 }\n if (r2 == 0) goto L_0x02b0;\n L_0x02a6:\n r2 = r14.a;\t Catch:{ Exception -> 0x038a }\n r5 = new com.whatsapp.aun;\t Catch:{ Exception -> 0x038a }\n r5.<init>(r14);\t Catch:{ Exception -> 0x038a }\n r2.post(r5);\t Catch:{ Exception -> 0x038a }\n L_0x02b0:\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\t Catch:{ Exception -> 0x038c }\n r2 = r14.b;\t Catch:{ Exception -> 0x038c }\n if (r2 == 0) goto L_0x02c5;\n L_0x02b8:\n r2 = r14.b;\t Catch:{ Exception -> 0x038c }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x038c }\n if (r2 == 0) goto L_0x02c5;\n L_0x02c0:\n r2 = r14.b;\t Catch:{ Exception -> 0x038e }\n r2.release();\t Catch:{ Exception -> 0x038e }\n L_0x02c5:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x02d4 }\n r2 = r2.exists();\t Catch:{ Exception -> 0x02d4 }\n if (r2 == 0) goto L_0x016d;\n L_0x02cd:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x02d4 }\n r2.delete();\t Catch:{ Exception -> 0x02d4 }\n goto L_0x016d;\n L_0x02d4:\n r0 = move-exception;\n throw r0;\n L_0x02d6:\n r2 = r1.h();\t Catch:{ Exception -> 0x0330 }\n if (r2 != 0) goto L_0x0356;\n L_0x02dc:\n r2 = com.whatsapp.util.b.e(r3);\t Catch:{ Exception -> 0x0330 }\n if (r2 == 0) goto L_0x02e5;\n L_0x02e2:\n r4 = 1;\n if (r8 == 0) goto L_0x0356;\n L_0x02e5:\n r2 = new java.lang.IllegalStateException;\t Catch:{ Exception -> 0x02f1 }\n r5 = z;\t Catch:{ Exception -> 0x02f1 }\n r6 = 16;\n r5 = r5[r6];\t Catch:{ Exception -> 0x02f1 }\n r2.<init>(r5);\t Catch:{ Exception -> 0x02f1 }\n throw r2;\t Catch:{ Exception -> 0x02f1 }\n L_0x02f1:\n r2 = move-exception;\n throw r2;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n L_0x02f3:\n r2 = move-exception;\n r5 = z;\t Catch:{ all -> 0x0332 }\n r6 = 10;\n r5 = r5[r6];\t Catch:{ all -> 0x0332 }\n com.whatsapp.util.Log.b(r5, r2);\t Catch:{ all -> 0x0332 }\n b(r2);\t Catch:{ all -> 0x0332 }\n r2 = r14.a;\t Catch:{ all -> 0x0332 }\n r5 = new com.whatsapp.on;\t Catch:{ all -> 0x0332 }\n r5.<init>(r14);\t Catch:{ all -> 0x0332 }\n r2.post(r5);\t Catch:{ all -> 0x0332 }\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\n r2 = r14.b;\n if (r2 == 0) goto L_0x031f;\n L_0x0312:\n r2 = r14.b;\t Catch:{ Exception -> 0x0390 }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x0390 }\n if (r2 == 0) goto L_0x031f;\n L_0x031a:\n r2 = r14.b;\t Catch:{ Exception -> 0x0390 }\n r2.release();\t Catch:{ Exception -> 0x0390 }\n L_0x031f:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x032e }\n r2 = r2.exists();\t Catch:{ Exception -> 0x032e }\n if (r2 == 0) goto L_0x016d;\n L_0x0327:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x032e }\n r2.delete();\t Catch:{ Exception -> 0x032e }\n goto L_0x016d;\n L_0x032e:\n r0 = move-exception;\n throw r0;\n L_0x0330:\n r2 = move-exception;\n throw r2;\t Catch:{ IllegalStateException -> 0x0134, cq -> 0x01ef, FileNotFoundException -> 0x023c, IOException -> 0x0283, at_ -> 0x02f3 }\n L_0x0332:\n r0 = move-exception;\n r1 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r1);\t Catch:{ Exception -> 0x0392 }\n r1 = r14.b;\t Catch:{ Exception -> 0x0392 }\n if (r1 == 0) goto L_0x0348;\n L_0x033b:\n r1 = r14.b;\t Catch:{ Exception -> 0x0394 }\n r1 = r1.isHeld();\t Catch:{ Exception -> 0x0394 }\n if (r1 == 0) goto L_0x0348;\n L_0x0343:\n r1 = r14.b;\t Catch:{ Exception -> 0x0394 }\n r1.release();\t Catch:{ Exception -> 0x0394 }\n L_0x0348:\n r1 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0396 }\n r1 = r1.exists();\t Catch:{ Exception -> 0x0396 }\n if (r1 == 0) goto L_0x0355;\n L_0x0350:\n r1 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x0396 }\n r1.delete();\t Catch:{ Exception -> 0x0396 }\n L_0x0355:\n throw r0;\n L_0x0356:\n r2 = 0;\n com.whatsapp.VideoFrameConverter.setLogFilePath(r2);\t Catch:{ Exception -> 0x037c }\n r2 = r14.b;\t Catch:{ Exception -> 0x037c }\n if (r2 == 0) goto L_0x036b;\n L_0x035e:\n r2 = r14.b;\t Catch:{ Exception -> 0x037c }\n r2 = r2.isHeld();\t Catch:{ Exception -> 0x037c }\n if (r2 == 0) goto L_0x036b;\n L_0x0366:\n r2 = r14.b;\t Catch:{ Exception -> 0x037e }\n r2.release();\t Catch:{ Exception -> 0x037e }\n L_0x036b:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x037a }\n r2 = r2.exists();\t Catch:{ Exception -> 0x037a }\n if (r2 == 0) goto L_0x016d;\n L_0x0373:\n r2 = com.whatsapp.App.a5;\t Catch:{ Exception -> 0x037a }\n r2.delete();\t Catch:{ Exception -> 0x037a }\n goto L_0x016d;\n L_0x037a:\n r0 = move-exception;\n throw r0;\n L_0x037c:\n r0 = move-exception;\n throw r0;\t Catch:{ Exception -> 0x037e }\n L_0x037e:\n r0 = move-exception;\n throw r0;\n L_0x0380:\n r0 = move-exception;\n throw r0;\n L_0x0382:\n r0 = move-exception;\n throw r0;\n L_0x0384:\n r0 = move-exception;\n throw r0;\n L_0x0386:\n r0 = move-exception;\n throw r0;\n L_0x0388:\n r0 = move-exception;\n throw r0;\t Catch:{ Exception -> 0x038a }\n L_0x038a:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0332 }\n L_0x038c:\n r0 = move-exception;\n throw r0;\t Catch:{ Exception -> 0x038e }\n L_0x038e:\n r0 = move-exception;\n throw r0;\n L_0x0390:\n r0 = move-exception;\n throw r0;\n L_0x0392:\n r0 = move-exception;\n throw r0;\t Catch:{ Exception -> 0x0394 }\n L_0x0394:\n r0 = move-exception;\n throw r0;\n L_0x0396:\n r0 = move-exception;\n throw r0;\n L_0x0398:\n r0 = move-exception;\n throw r0;\n L_0x039a:\n r0 = move-exception;\n throw r0;\n L_0x039c:\n r0 = move-exception;\n throw r0;\t Catch:{ Exception -> 0x039e }\n L_0x039e:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.tw.b(com.whatsapp.protocol.co):void\");\n }",
"private void c(com.whatsapp.protocol.co r13) {\n /*\n r12 = this;\n r3 = com.whatsapp.DialogToastActivity.f;\n r0 = r13.Q;\n r0 = (com.whatsapp.MediaData) r0;\n r1 = com.whatsapp.App.z();\n r2 = z;\n r4 = 5;\n r2 = r2[r4];\n r4 = r13.c;\n r5 = r13.r;\n r6 = 1;\n r4 = com.whatsapp.util.ag.a(r1, r2, r4, r5, r6);\n r1 = r0.file;\n r6 = com.whatsapp.util.ag.a(r1);\n r8 = 0;\n r1 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1));\n if (r1 != 0) goto L_0x00ea;\n L_0x0024:\n r1 = 96000; // 0x17700 float:1.34525E-40 double:4.74303E-319;\n L_0x0027:\n r2 = 12200; // 0x2fa8 float:1.7096E-41 double:6.0276E-320;\n r5 = 96000; // 0x17700 float:1.34525E-40 double:4.74303E-319;\n r1 = java.lang.Math.min(r1, r5);\n r1 = java.lang.Math.max(r2, r1);\n r2 = new com.whatsapp.mb;\n r5 = r0.file;\n r2.<init>(r5, r4);\n r1 = r2.a(r1);\n r5 = r1.a();\n r1 = new com.whatsapp.om;\n r1.<init>(r12, r13, r0);\n r5.a(r1);\n r0.transcoder = r5;\n r2 = 0;\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x00f8, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n if (r1 == 0) goto L_0x0057;\n L_0x0052:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x00f8, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n r1.acquire();\t Catch:{ IllegalStateException -> 0x00f8, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n L_0x0057:\n r5.d();\t Catch:{ IllegalStateException -> 0x0122, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n r1 = r5.b();\t Catch:{ IllegalStateException -> 0x0122, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n if (r1 != 0) goto L_0x0165;\n L_0x0060:\n r1 = com.whatsapp.util.b.b(r4);\t Catch:{ IllegalStateException -> 0x0122, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n if (r1 == 0) goto L_0x0069;\n L_0x0066:\n r2 = 1;\n if (r3 == 0) goto L_0x0165;\n L_0x0069:\n r1 = new java.lang.IllegalStateException;\t Catch:{ IllegalStateException -> 0x0074, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n r6 = z;\t Catch:{ IllegalStateException -> 0x0074, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n r7 = 4;\n r6 = r6[r7];\t Catch:{ IllegalStateException -> 0x0074, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n r1.<init>(r6);\t Catch:{ IllegalStateException -> 0x0074, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n throw r1;\t Catch:{ IllegalStateException -> 0x0074, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n L_0x0074:\n r1 = move-exception;\n throw r1;\t Catch:{ IllegalStateException -> 0x0076, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n L_0x0076:\n r1 = move-exception;\n r6 = z;\t Catch:{ all -> 0x0184 }\n r7 = 6;\n r6 = r6[r7];\t Catch:{ all -> 0x0184 }\n com.whatsapp.util.Log.b(r6, r1);\t Catch:{ all -> 0x0184 }\n a(r1);\t Catch:{ all -> 0x0184 }\n r1 = r12.a;\t Catch:{ all -> 0x0184 }\n r6 = new com.whatsapp.aih;\t Catch:{ all -> 0x0184 }\n r6.<init>(r12);\t Catch:{ all -> 0x0184 }\n r1.post(r6);\t Catch:{ all -> 0x0184 }\n r1 = r12.b;\n if (r1 == 0) goto L_0x009d;\n L_0x0090:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x017c }\n r1 = r1.isHeld();\t Catch:{ IllegalStateException -> 0x017c }\n if (r1 == 0) goto L_0x009d;\n L_0x0098:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x017c }\n r1.release();\t Catch:{ IllegalStateException -> 0x017c }\n L_0x009d:\n if (r2 == 0) goto L_0x00d3;\n L_0x009f:\n r0.file = r4;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = 1;\n r0.transcoded = r1;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = r0.file;\t Catch:{ IllegalStateException -> 0x019d }\n r6 = r1.length();\t Catch:{ IllegalStateException -> 0x019d }\n r0.fileSize = r6;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = r0.file;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = r1.getName();\t Catch:{ IllegalStateException -> 0x019d }\n r13.A = r1;\t Catch:{ IllegalStateException -> 0x019d }\n r6 = r0.fileSize;\t Catch:{ IllegalStateException -> 0x019d }\n r13.z = r6;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = r0.file;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = com.whatsapp.util.ag.c(r1);\t Catch:{ IllegalStateException -> 0x019d }\n r13.H = r1;\t Catch:{ IllegalStateException -> 0x019d }\n r1 = com.whatsapp.App.aK;\t Catch:{ IllegalStateException -> 0x019d }\n r2 = 1;\n r4 = -1;\n r1.a(r13, r2, r4);\t Catch:{ IllegalStateException -> 0x019d }\n r1 = r12.a;\t Catch:{ IllegalStateException -> 0x019d }\n r2 = new com.whatsapp.asp;\t Catch:{ IllegalStateException -> 0x019d }\n r2.<init>(r12, r13);\t Catch:{ IllegalStateException -> 0x019d }\n r1.post(r2);\t Catch:{ IllegalStateException -> 0x019d }\n if (r3 == 0) goto L_0x00e9;\n L_0x00d3:\n r1 = 0;\n r0.transferring = r1;\t Catch:{ IllegalStateException -> 0x019f }\n r1 = 0;\n r13.d = r1;\t Catch:{ IllegalStateException -> 0x019f }\n r1 = r5.b();\t Catch:{ IllegalStateException -> 0x019f }\n if (r1 == 0) goto L_0x00e2;\n L_0x00df:\n r1 = 0;\n r0.autodownloadRetryEnabled = r1;\t Catch:{ IllegalStateException -> 0x019f }\n L_0x00e2:\n r0 = com.whatsapp.App.aK;\n r1 = 1;\n r2 = -1;\n r0.a(r13, r1, r2);\n L_0x00e9:\n return;\n L_0x00ea:\n r1 = r0.file;\n r8 = r1.length();\n r10 = 8000; // 0x1f40 float:1.121E-41 double:3.9525E-320;\n r8 = r8 * r10;\n r6 = r8 / r6;\n r1 = (int) r6;\n goto L_0x0027;\n L_0x00f8:\n r1 = move-exception;\n throw r1;\t Catch:{ IllegalStateException -> 0x0076, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n L_0x00fa:\n r1 = move-exception;\n r6 = z;\t Catch:{ all -> 0x0184 }\n r7 = 3;\n r6 = r6[r7];\t Catch:{ all -> 0x0184 }\n com.whatsapp.util.Log.b(r6, r1);\t Catch:{ all -> 0x0184 }\n r1 = r12.a;\t Catch:{ all -> 0x0184 }\n r6 = new com.whatsapp.am;\t Catch:{ all -> 0x0184 }\n r6.<init>(r12);\t Catch:{ all -> 0x0184 }\n r1.post(r6);\t Catch:{ all -> 0x0184 }\n r1 = r12.b;\n if (r1 == 0) goto L_0x009d;\n L_0x0111:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0120 }\n r1 = r1.isHeld();\t Catch:{ IllegalStateException -> 0x0120 }\n if (r1 == 0) goto L_0x009d;\n L_0x0119:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0120 }\n r1.release();\t Catch:{ IllegalStateException -> 0x0120 }\n goto L_0x009d;\n L_0x0120:\n r0 = move-exception;\n throw r0;\n L_0x0122:\n r1 = move-exception;\n throw r1;\t Catch:{ IllegalStateException -> 0x0076, FileNotFoundException -> 0x00fa, IOException -> 0x0124 }\n L_0x0124:\n r1 = move-exception;\n r6 = r1.getMessage();\t Catch:{ IllegalStateException -> 0x017e }\n if (r6 == 0) goto L_0x0146;\n L_0x012b:\n r1 = r1.getMessage();\t Catch:{ IllegalStateException -> 0x017e }\n r6 = z;\t Catch:{ IllegalStateException -> 0x017e }\n r7 = 2;\n r6 = r6[r7];\t Catch:{ IllegalStateException -> 0x017e }\n r1 = r1.contains(r6);\t Catch:{ IllegalStateException -> 0x017e }\n if (r1 == 0) goto L_0x0146;\n L_0x013a:\n r1 = r12.a;\t Catch:{ IllegalStateException -> 0x0180 }\n r6 = new com.whatsapp.axt;\t Catch:{ IllegalStateException -> 0x0180 }\n r6.<init>(r12);\t Catch:{ IllegalStateException -> 0x0180 }\n r1.post(r6);\t Catch:{ IllegalStateException -> 0x0180 }\n if (r3 == 0) goto L_0x0150;\n L_0x0146:\n r1 = r12.a;\t Catch:{ IllegalStateException -> 0x0182 }\n r6 = new com.whatsapp.a2s;\t Catch:{ IllegalStateException -> 0x0182 }\n r6.<init>(r12);\t Catch:{ IllegalStateException -> 0x0182 }\n r1.post(r6);\t Catch:{ IllegalStateException -> 0x0182 }\n L_0x0150:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0197 }\n if (r1 == 0) goto L_0x009d;\n L_0x0154:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0197 }\n r1 = r1.isHeld();\t Catch:{ IllegalStateException -> 0x0197 }\n if (r1 == 0) goto L_0x009d;\n L_0x015c:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0163 }\n r1.release();\t Catch:{ IllegalStateException -> 0x0163 }\n goto L_0x009d;\n L_0x0163:\n r0 = move-exception;\n throw r0;\n L_0x0165:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x017a }\n if (r1 == 0) goto L_0x009d;\n L_0x0169:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x017a }\n r1 = r1.isHeld();\t Catch:{ IllegalStateException -> 0x017a }\n if (r1 == 0) goto L_0x009d;\n L_0x0171:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0178 }\n r1.release();\t Catch:{ IllegalStateException -> 0x0178 }\n goto L_0x009d;\n L_0x0178:\n r0 = move-exception;\n throw r0;\n L_0x017a:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x0178 }\n L_0x017c:\n r0 = move-exception;\n throw r0;\n L_0x017e:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x0180 }\n L_0x0180:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x0182 }\n L_0x0182:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0184 }\n L_0x0184:\n r0 = move-exception;\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x0199 }\n if (r1 == 0) goto L_0x0196;\n L_0x0189:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x019b }\n r1 = r1.isHeld();\t Catch:{ IllegalStateException -> 0x019b }\n if (r1 == 0) goto L_0x0196;\n L_0x0191:\n r1 = r12.b;\t Catch:{ IllegalStateException -> 0x019b }\n r1.release();\t Catch:{ IllegalStateException -> 0x019b }\n L_0x0196:\n throw r0;\n L_0x0197:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x0163 }\n L_0x0199:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x019b }\n L_0x019b:\n r0 = move-exception;\n throw r0;\n L_0x019d:\n r0 = move-exception;\n throw r0;\t Catch:{ IllegalStateException -> 0x019f }\n L_0x019f:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.tw.c(com.whatsapp.protocol.co):void\");\n }",
"@Override // com.igexin.push.p671g.p673b.AbstractC5937h\n /* renamed from: a */\n public void mo39819a() {\n try {\n StringBuilder sb = new StringBuilder();\n sb.append(C5871f.f24630f.getPackageName());\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append(C5792l.m35140a(this.f24367b, (String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME)));\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append((String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME));\n sb.append(MqttTopic.TOPIC_LEVEL_SEPARATOR);\n sb.append((String) this.f24366a.get(\"serviceName\"));\n sb.append(MqttTopic.MULTI_LEVEL_WILDCARD);\n sb.append(C5792l.m35148a((String) this.f24366a.get(PushClientConstants.TAG_PKG_NAME), (String) this.f24366a.get(\"serviceName\")) ? \"1\" : \"0\");\n C5792l.m35143a(this.f24367b, \"30026\", sb.toString(), (String) this.f24366a.get(\"messageId\"), (String) this.f24366a.get(\"taskId\"), (String) this.f24366a.get(\"id\"));\n ActivityC5721b.m34806a(\"feedback actionId=30026 result=\" + sb.toString());\n } catch (Throwable unused) {\n }\n }",
"public void m6632c(Intent intent) {\n if (intent != null) {\n String stringExtra = intent.getStringExtra(\"com.vivo.smartkey.SOUNDRECORDER_EXTRA\");\n String action = intent.getAction();\n if (stringExtra != null && (intent.getFlags() & 1048576) == 0) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseQuickStartIntent>, smartkey makes the recorder record\");\n if (!C1400d.m6806a().mo6136b()) {\n if (!C1424v.m6870a(\"android.permission.RECORD_AUDIO\", this) || !C1424v.m6870a(\"android.permission.WRITE_EXTERNAL_STORAGE\", this)) {\n C1492b.m7431a((Context) this, (CharSequence) getString(R.string.unable_quick_start), 0).show();\n finish();\n return;\n }\n this.f5419h = true;\n if (this.f5401U != null && !this.f5433o.booleanValue()) {\n onClick(this.f5384D);\n m6622a(true);\n this.f5401U.mo6340a(this.f5406Z.isKeyguardLocked());\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n } else {\n return;\n }\n }\n if (action != null && action.equals(\"com.record.finish.soundrecord\")) {\n m6604U();\n C0927a.m4982a().mo5050a(new C1271Pa(this), 0);\n }\n }\n }",
"public void mo4359a() {\n }",
"public static void m72639a(com.p280ss.android.ugc.aweme.feed.model.Aweme r3, java.lang.String r4, int r5) {\n /*\n if (r3 == 0) goto L_0x006d\n boolean r0 = r3.isFamiliar()\n r1 = 1\n if (r0 != r1) goto L_0x006c\n boolean r0 = com.p280ss.android.ugc.aweme.utils.C43122ff.m136762a(r3)\n if (r0 == 0) goto L_0x0010\n goto L_0x006c\n L_0x0010:\n com.ss.android.ugc.aweme.app.g.d r0 = com.p280ss.android.ugc.aweme.app.p305g.C22984d.m75611a()\n java.lang.String r1 = \"enter_from\"\n java.lang.String r2 = \"homepage_hot\"\n com.ss.android.ugc.aweme.app.g.d r0 = r0.mo59973a(r1, r2)\n java.lang.String r1 = \"event_type\"\n com.ss.android.ugc.aweme.app.g.d r4 = r0.mo59973a(r1, r4)\n java.lang.String r0 = \"rec_uid\"\n java.lang.String r1 = com.p280ss.android.ugc.aweme.metrics.C33230ac.m107205a(r3)\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"req_id\"\n java.lang.String r1 = r3.getRequestId()\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"rec_reason\"\n com.ss.android.ugc.aweme.feed.model.RelationDynamicLabel r1 = r3.getRelationLabel()\n if (r1 == 0) goto L_0x0044\n java.lang.String r1 = r1.getLabelInfo()\n if (r1 != 0) goto L_0x0046\n L_0x0044:\n java.lang.String r1 = \"\"\n L_0x0046:\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"card_type\"\n java.lang.String r1 = \"item\"\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"group_id\"\n java.lang.String r3 = r3.getAid()\n com.ss.android.ugc.aweme.app.g.d r3 = r4.mo59973a(r0, r3)\n r4 = -1\n if (r5 == r4) goto L_0x0064\n java.lang.String r4 = \"feed_order\"\n r3.mo59970a(r4, r5)\n L_0x0064:\n java.lang.String r4 = \"follow_card\"\n java.util.Map<java.lang.String, java.lang.String> r3 = r3.f60753a\n com.p280ss.android.ugc.aweme.common.C6907h.m21524a(r4, r3)\n return\n L_0x006c:\n return\n L_0x006d:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.familiar.p966b.C21718a.m72639a(com.ss.android.ugc.aweme.feed.model.Aweme, java.lang.String, int):void\");\n }",
"private void m6588E() {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<initResourceRefs>\");\n if (C1413m.m6844f()) {\n this.f5386F.mo6533a(getResources().getString(R.string.new_mark_name), (int) R.drawable.iqoo_btn_recorder_mark_selector, getResources().getDimensionPixelSize(R.dimen.side_text_margin_diff));\n this.f5385E.mo6533a(getResources().getString(R.string.done), (int) R.drawable.iqoo_btn_recorder_stop_selector, getResources().getDimensionPixelSize(R.dimen.side_text_margin_diff));\n } else {\n this.f5386F.mo6533a(getResources().getString(R.string.new_mark_name), (int) R.drawable.btn_recorder_mark_selector, getResources().getDimensionPixelSize(R.dimen.side_text_margin_diff_x50));\n this.f5385E.mo6533a(getResources().getString(R.string.done), (int) R.drawable.btn_recorder_stop_selector, getResources().getDimensionPixelSize(R.dimen.side_text_margin_diff_x50));\n }\n if (!C1413m.m6844f()) {\n this.f5384D.mo6533a(getResources().getString(R.string.manager_title), (int) R.drawable.btn_play_0, getResources().getDimensionPixelSize(R.dimen.middle_text_margin_diff));\n }\n if (C1413m.m6845g()) {\n this.f5386F.setTextSize(12.0f);\n } else {\n this.f5386F.setTextSize(14.0f);\n }\n if (C1413m.m6845g()) {\n this.f5384D.setTextSize(12.0f);\n } else {\n this.f5384D.setTextSize(14.0f);\n }\n if (C1411k.m6820b(this)) {\n TwoStateLayout twoStateLayout = this.f5384D;\n twoStateLayout.setContentDescription(getResources().getString(R.string.manager_title) + \",\" + getResources().getString(R.string.button_talkback));\n TwoStateLayout twoStateLayout2 = this.f5386F;\n twoStateLayout2.setContentDescription(getResources().getString(R.string.new_mark_name) + \",\" + getResources().getString(R.string.button_talkback));\n TwoStateLayout twoStateLayout3 = this.f5385E;\n twoStateLayout3.setContentDescription(getResources().getString(R.string.done) + \",\" + getResources().getString(R.string.button_talkback));\n }\n if (C1413m.m6845g()) {\n this.f5385E.setTextSize(12.0f);\n } else {\n this.f5385E.setTextSize(14.0f);\n }\n this.f5387G = (TimeView) findViewById(R.id.record_time_show);\n this.f5384D.setOnClickListener(this);\n this.f5385E.setOnClickListener(this);\n this.f5386F.setOnClickListener(this);\n this.f5384D.setClickable(false);\n this.f5385E.setClickable(false);\n if (C1413m.m6844f()) {\n this.f5392L = (RecordView) findViewById(R.id.record_wave1);\n } else if (m6595L()) {\n this.f5391K = (XRecordView) findViewById(R.id.record_wave1);\n } else {\n this.f5392L = (RecordView) findViewById(R.id.record_wave1);\n }\n m6605V();\n }",
"private void m110495a() {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f89235a.f89233a.f77546j);\n Aweme aweme = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75511a(\"result_ad\", aweme2.getAwemeRawAd(), \"bg_download_button\");\n Aweme aweme3 = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }",
"public final void a(com.tencent.mm.ui.chatting.ad.a r23, int r24, com.tencent.mm.ui.chatting.ChattingUI.a r25, com.tencent.mm.storage.at r26, java.lang.String r27) {\n /*\n r22 = this;\n r19 = r23;\n r19 = (com.tencent.mm.ui.chatting.m) r19;\n r0 = r25;\n r1 = r22;\n r1.onG = r0;\n r25.ay(r26);\n r19.reset();\n r0 = r26;\n r0 = r0.field_content;\n r21 = r0;\n r25.aw(r26);\n r4 = 0;\n if (r21 == 0) goto L_0x1212;\n L_0x001c:\n r0 = r26;\n r4 = r0.field_reserved;\n r0 = r21;\n r4 = com.tencent.mm.q.a.a.B(r0, r4);\n r20 = r4;\n L_0x0028:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r0 = r25;\n r6 = r0.nQK;\n r8 = 0;\n r9 = 0;\n r10 = 0;\n r5 = r26;\n r7 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10);\n if (r20 == 0) goto L_0x02a4;\n L_0x003a:\n r0 = r20;\n r5 = r0.appId;\n r0 = r20;\n r6 = r0.bpy;\n r7 = com.tencent.mm.pluginsdk.model.app.g.bA(r5, r6);\n r0 = r19;\n r5 = r0.dtY;\n r0 = r20;\n r6 = r0.title;\n r5.setText(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r20;\n r6 = r0.description;\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okC;\n r6 = 1;\n r5.setMaxLines(r6);\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r8 = 2131689909; // 0x7f0f01b5 float:1.9008847E38 double:1.0531947516E-314;\n r6 = r6.getColor(r8);\n r5.setTextColor(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r8 = 2131689792; // 0x7f0f0140 float:1.900861E38 double:1.053194694E-314;\n r6 = r6.getColor(r8);\n r5.setTextColor(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 2130837939; // 0x7f0201b3 float:1.7280846E38 double:1.0527738225E-314;\n r5.setBackgroundResource(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 0;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r8 = r8.getResources();\n r9 = 2131493152; // 0x7f0c0120 float:1.8609776E38 double:1.0530975407E-314;\n r8 = r8.getDimensionPixelSize(r9);\n r9 = 0;\n r10 = 0;\n r5.setPadding(r6, r8, r9, r10);\n r0 = r19;\n r5 = r0.okd;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okO;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okS;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okT;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okG;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okF;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okD;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okA;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.olb;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okU;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okQ;\n r6 = 0;\n r5.setVisibility(r6);\n if (r7 == 0) goto L_0x0133;\n L_0x0123:\n r5 = r7.field_appName;\n if (r5 == 0) goto L_0x0133;\n L_0x0127:\n r5 = r7.field_appName;\n r5 = r5.trim();\n r5 = r5.length();\n if (r5 > 0) goto L_0x02e5;\n L_0x0133:\n r0 = r20;\n r5 = r0.appName;\n L_0x0137:\n r6 = 1;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r9 = 12;\n com.tencent.mm.bd.a.fromDPToPix(r8, r9);\n r0 = r20;\n r8 = r0.type;\n r9 = 20;\n if (r8 == r9) goto L_0x0158;\n L_0x014b:\n r8 = \"wxaf060266bfa9a35c\";\n r0 = r20;\n r9 = r0.appId;\n r8 = r8.equals(r9);\n if (r8 == 0) goto L_0x0160;\n L_0x0158:\n r6 = com.tencent.mm.pluginsdk.j.a.bmq();\n r6 = r6.aNM();\n L_0x0160:\n if (r6 == 0) goto L_0x02f8;\n L_0x0162:\n r0 = r20;\n r6 = r0.appId;\n if (r6 == 0) goto L_0x02f8;\n L_0x0168:\n r0 = r20;\n r6 = r0.appId;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x02f8;\n L_0x0172:\n r6 = com.tencent.mm.pluginsdk.model.app.g.bo(r5);\n if (r6 == 0) goto L_0x02f8;\n L_0x0178:\n r0 = r19;\n r6 = r0.fSs;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r5 = com.tencent.mm.pluginsdk.model.app.g.a(r8, r7, r5);\n r6.setText(r5);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r8 = 0;\n r9 = 0;\n r10 = 0;\n r5.setCompoundDrawables(r6, r8, r9, r10);\n r0 = r19;\n r5 = r0.okz;\n r6 = 0;\n r5.setVisibility(r6);\n if (r7 == 0) goto L_0x02e9;\n L_0x01ae:\n r5 = r7.bnk();\n if (r5 == 0) goto L_0x02e9;\n L_0x01b4:\n r0 = r19;\n r6 = r0.fSs;\n r9 = r7.field_packageName;\n r0 = r26;\n r10 = r0.field_msgSvrId;\n r5 = r25;\n r7 = r26;\n r8 = r20;\n com.tencent.mm.ui.chatting.ad.a(r5, r6, r7, r8, r9, r10);\n L_0x01c7:\n r0 = r19;\n r5 = r0.okz;\n r0 = r20;\n r6 = r0.appId;\n r0 = r25;\n com.tencent.mm.ui.chatting.ad.a(r0, r5, r6);\n L_0x01d4:\n r5 = 0;\n r0 = r19;\n r6 = r0.okd;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r22;\n r6 = r0.lVu;\n if (r6 == 0) goto L_0x0382;\n L_0x01e3:\n r6 = 0;\n r0 = r20;\n r7 = r0.type;\n r8 = 33;\n if (r7 == r8) goto L_0x0203;\n L_0x01ec:\n r6 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r7 = r0.field_imgPath;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r8 = com.tencent.mm.bd.a.getDensity(r8);\n r9 = 0;\n r6 = r6.a(r7, r8, r9);\n L_0x0203:\n if (r6 == 0) goto L_0x037f;\n L_0x0205:\n r7 = r6.isRecycled();\n if (r7 != 0) goto L_0x037f;\n L_0x020b:\n r0 = r19;\n r7 = r0.okd;\n r7.setImageBitmap(r6);\n L_0x0212:\n r0 = r20;\n r7 = r0.type;\n r8 = 3;\n if (r7 != r8) goto L_0x022f;\n L_0x0219:\n r0 = r19;\n r7 = r0.okQ;\n r7 = r7.getViewTreeObserver();\n r8 = new com.tencent.mm.ui.chatting.aw$1;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r8.<init>(r0, r1, r2, r6);\n r7.addOnPreDrawListener(r8);\n L_0x022f:\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setOnClickListener(r7);\n r0 = r20;\n r6 = r0.type;\n switch(r6) {\n case 0: goto L_0x0ad2;\n case 1: goto L_0x023e;\n case 2: goto L_0x023e;\n case 3: goto L_0x0396;\n case 4: goto L_0x0559;\n case 5: goto L_0x05e8;\n case 6: goto L_0x04c4;\n case 7: goto L_0x0875;\n case 8: goto L_0x023e;\n case 9: goto L_0x023e;\n case 10: goto L_0x092a;\n case 11: goto L_0x023e;\n case 12: goto L_0x023e;\n case 13: goto L_0x09e5;\n case 14: goto L_0x023e;\n case 15: goto L_0x0b50;\n case 16: goto L_0x0df5;\n case 17: goto L_0x023e;\n case 18: goto L_0x023e;\n case 19: goto L_0x0f62;\n case 20: goto L_0x0a58;\n case 21: goto L_0x023e;\n case 22: goto L_0x023e;\n case 23: goto L_0x023e;\n case 24: goto L_0x0e88;\n case 25: goto L_0x0c06;\n case 26: goto L_0x0cba;\n case 27: goto L_0x0cba;\n case 28: goto L_0x023e;\n case 29: goto L_0x023e;\n case 30: goto L_0x023e;\n case 31: goto L_0x023e;\n case 32: goto L_0x023e;\n case 33: goto L_0x06da;\n case 34: goto L_0x1034;\n default: goto L_0x023e;\n };\n L_0x023e:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x11fb;\n L_0x0244:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x11fb;\n L_0x024e:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0269:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0274:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x1206;\n L_0x028c:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x1206;\n L_0x0292:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n L_0x0299:\n r0 = r20;\n r5 = r0.cob;\n r0 = r19;\n r1 = r21;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r5);\n L_0x02a4:\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n r0 = r19;\n r4 = r0.okP;\n r0 = r25;\n r5 = r0.onh;\n r5 = r5.oqh;\n r4.setOnClickListener(r5);\n r0 = r22;\n r4 = r0.lVu;\n if (r4 == 0) goto L_0x02cb;\n L_0x02be:\n r0 = r19;\n r4 = r0.okP;\n r0 = r25;\n r5 = r0.onh;\n r5 = r5.oqj;\n r4.setOnLongClickListener(r5);\n L_0x02cb:\n r0 = r25;\n r4 = r0.onh;\n r7 = r4.cyO;\n r0 = r25;\n r8 = r0.nQK;\n r0 = r25;\n r4 = r0.onh;\n r9 = r4.oqh;\n r4 = r24;\n r5 = r19;\n r6 = r26;\n com.tencent.mm.ui.chatting.ad.a(r4, r5, r6, r7, r8, r9);\n return;\n L_0x02e5:\n r5 = r7.field_appName;\n goto L_0x0137;\n L_0x02e9:\n r0 = r19;\n r5 = r0.fSs;\n r0 = r20;\n r6 = r0.appId;\n r0 = r25;\n com.tencent.mm.ui.chatting.ad.a(r0, r5, r6);\n goto L_0x01c7;\n L_0x02f8:\n r0 = r20;\n r5 = r0.type;\n r6 = 24;\n if (r5 != r6) goto L_0x032d;\n L_0x0300:\n r0 = r19;\n r5 = r0.fSs;\n r6 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r7 = 2131232638; // 0x7f08077e float:1.808139E38 double:1.0529688297E-314;\n r6 = r6.getString(r7);\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x032d:\n r0 = r20;\n r5 = r0.type;\n r6 = 19;\n if (r5 != r6) goto L_0x0362;\n L_0x0335:\n r0 = r19;\n r5 = r0.fSs;\n r6 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r7 = 2131231816; // 0x7f080448 float:1.8079724E38 double:1.0529684236E-314;\n r6 = r6.getString(r7);\n r5.setText(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x0362:\n r0 = r19;\n r5 = r0.okB;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okz;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x01d4;\n L_0x037f:\n r5 = 1;\n goto L_0x0212;\n L_0x0382:\n r0 = r19;\n r6 = r0.okd;\n r7 = r25.getResources();\n r8 = 2130838790; // 0x7f020506 float:1.7282572E38 double:1.052774243E-314;\n r7 = android.graphics.BitmapFactory.decodeResource(r7, r8);\n r6.setImageBitmap(r7);\n goto L_0x022f;\n L_0x0396:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0486;\n L_0x039c:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0486;\n L_0x03a6:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131690127; // 0x7f0f028f float:1.9009289E38 double:1.0531948593E-314;\n r7 = r7.getColor(r8);\n r6.setTextColor(r7);\n L_0x03c6:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131690127; // 0x7f0f028f float:1.9009289E38 double:1.0531948593E-314;\n r7 = r7.getColor(r8);\n r6.setTextColor(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r23;\n r6 = r0.onE;\n r0 = r26;\n r8 = r0.field_msgId;\n r6 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1));\n if (r6 != 0) goto L_0x0491;\n L_0x0413:\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130838733; // 0x7f0204cd float:1.7282457E38 double:1.052774215E-314;\n r6.setImageResource(r7);\n L_0x041d:\n r6 = new com.tencent.mm.ui.chatting.cp$b;\n r6.<init>();\n r0 = r26;\n r8 = r0.field_msgId;\n r6.bao = r8;\n r0 = r26;\n r7 = r0.field_content;\n r6.blq = r7;\n r0 = r26;\n r7 = r0.field_imgPath;\n r6.bhr = r7;\n r0 = r19;\n r7 = r0.okH;\n r7.setTag(r6);\n r0 = r19;\n r6 = r0.okH;\n r0 = r25;\n r7 = r0.onh;\n r7 = r7.oqp;\n r6.setOnClickListener(r7);\n if (r5 == 0) goto L_0x046f;\n L_0x044a:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x0465;\n L_0x045f:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x049c;\n L_0x0465:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165232; // 0x7f070030 float:1.7944675E38 double:1.0529355267E-314;\n r5.setImageResource(r6);\n L_0x046f:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x04a4;\n L_0x0475:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x047b:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0486:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x03c6;\n L_0x0491:\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130838735; // 0x7f0204cf float:1.728246E38 double:1.052774216E-314;\n r6.setImageResource(r7);\n goto L_0x041d;\n L_0x049c:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x046f;\n L_0x04a4:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x04aa:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x04b9:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x04c4:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x054f;\n L_0x04ca:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x054f;\n L_0x04d4:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r7 = 2;\n r6.setMaxLines(r7);\n L_0x04e4:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r20;\n r7 = r0.cob;\n r8 = (long) r7;\n r7 = com.tencent.mm.sdk.platformtools.be.aw(r8);\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n r6 = 0;\n r6 = java.lang.Boolean.valueOf(r6);\n r0 = r20;\n r7 = r0.aXa;\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r1 = r26;\n com.tencent.mm.ui.chatting.m.a(r0, r6, r1, r7, r8);\n if (r5 == 0) goto L_0x0299;\n L_0x0534:\n r0 = r20;\n r5 = r0.coc;\n r5 = com.tencent.mm.sdk.platformtools.be.KY(r5);\n if (r5 != 0) goto L_0x1206;\n L_0x053e:\n r0 = r19;\n r5 = r0.okd;\n r0 = r20;\n r6 = r0.coc;\n r6 = com.tencent.mm.pluginsdk.model.p.Gt(r6);\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x054f:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x04e4;\n L_0x0559:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x05d6;\n L_0x055f:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x05d6;\n L_0x0569:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n L_0x0571:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 2130839370; // 0x7f02074a float:1.7283749E38 double:1.0527745295E-314;\n r6.setImageResource(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x05a6:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x05c1;\n L_0x05bb:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x05e0;\n L_0x05c1:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165244; // 0x7f07003c float:1.79447E38 double:1.0529355327E-314;\n r5.setImageResource(r6);\n L_0x05cb:\n r0 = r19;\n r5 = r0.okH;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x05d6:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0571;\n L_0x05e0:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x05cb;\n L_0x05e8:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x068c;\n L_0x05f7:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x068c;\n L_0x0601:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x061c:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x066a;\n L_0x0637:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 != 0) goto L_0x06a1;\n L_0x064c:\n r5 = new com.tencent.mm.pluginsdk.model.r;\n r0 = r20;\n r6 = r0.thumburl;\n r0 = r26;\n r7 = r0.field_type;\n r8 = \"@S\";\n r9 = 0;\n r5.<init>(r6, r7, r8, r9);\n r5 = com.tencent.mm.platformtools.j.a(r5);\n if (r5 == 0) goto L_0x0696;\n L_0x0663:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n L_0x066a:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x06ba;\n L_0x0670:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0681:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x068c:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x061c;\n L_0x0696:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x066a;\n L_0x06a1:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x06b2;\n L_0x06a7:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x066a;\n L_0x06b2:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x066a;\n L_0x06ba:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x06c0:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x06cf:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x06da:\n r6 = new com.tencent.mm.e.a.m;\n r6.<init>();\n r5 = r6.aWJ;\n r0 = r20;\n r7 = r0.cqp;\n r5.aWH = r7;\n r5 = com.tencent.mm.sdk.c.a.nhr;\n r5.z(r6);\n r5 = r6.aWK;\n r5 = r5.aWL;\n if (r5 == 0) goto L_0x0729;\n L_0x06f2:\n r5 = r6.aWK;\n r5 = r5.appName;\n L_0x06f6:\n r7 = r6.aWK;\n r7 = r7.aWL;\n if (r7 == 0) goto L_0x072e;\n L_0x06fc:\n r6 = r6.aWK;\n r6 = r6.aWM;\n L_0x0700:\n r0 = r20;\n r7 = r0.cqr;\n switch(r7) {\n case 1: goto L_0x0821;\n case 2: goto L_0x0733;\n default: goto L_0x0707;\n };\n L_0x0707:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x0855;\n L_0x070d:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x071e:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0729:\n r0 = r20;\n r5 = r0.bnS;\n goto L_0x06f6;\n L_0x072e:\n r0 = r20;\n r6 = r0.cqv;\n goto L_0x0700;\n L_0x0733:\n r0 = r19;\n r7 = r0.okQ;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.olb;\n r8 = 0;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okU;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r8 = r0.okX;\n r0 = r20;\n r7 = r0.description;\n r7 = android.text.TextUtils.isEmpty(r7);\n if (r7 == 0) goto L_0x07e3;\n L_0x075b:\n r7 = 8;\n L_0x075d:\n r8.setVisibility(r7);\n r0 = r19;\n r7 = r0.old;\n r0 = r20;\n r8 = r0.title;\n r7.setText(r8);\n r0 = r19;\n r7 = r0.okX;\n r0 = r20;\n r8 = r0.description;\n r7.setText(r8);\n r0 = r19;\n r7 = r0.okZ;\n r7.setText(r5);\n r0 = r20;\n r5 = r0.cqt;\n switch(r5) {\n case 1: goto L_0x07e6;\n case 2: goto L_0x0803;\n default: goto L_0x0784;\n };\n L_0x0784:\n r0 = r19;\n r5 = r0.okY;\n r7 = 0;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 0;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230936; // 0x7f0800d8 float:1.8077939E38 double:1.052967989E-314;\n r5.setText(r7);\n L_0x079e:\n r5 = com.tencent.mm.ae.n.GL();\n r0 = r19;\n r7 = r0.okY;\n r0 = r22;\n r8 = r0.onQ;\n r5.a(r6, r7, r8);\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r7 = 1;\n r7 = r5.x(r6, r7);\n r0 = r19;\n r5 = r0.olc;\n r6 = 0;\n r5.setImageBitmap(r6);\n r5 = com.tencent.mm.t.a.b.AL();\n r0 = r19;\n r6 = r0.olc;\n r8 = new java.lang.StringBuilder;\n r9 = \"file://\";\n r8.<init>(r9);\n r7 = r8.append(r7);\n r7 = r7.toString();\n r8 = 0;\n r9 = 0;\n r10 = com.tencent.mm.ui.chatting.m.a.fVO;\n r5.a(r6, r7, r8, r9, r10);\n goto L_0x0707;\n L_0x07e3:\n r7 = 0;\n goto L_0x075d;\n L_0x07e6:\n r0 = r19;\n r5 = r0.okY;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230999; // 0x7f080117 float:1.8078067E38 double:1.05296802E-314;\n r5.setText(r7);\n goto L_0x079e;\n L_0x0803:\n r0 = r19;\n r5 = r0.okY;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.okZ;\n r7 = 8;\n r5.setVisibility(r7);\n r0 = r19;\n r5 = r0.ola;\n r7 = 2131230998; // 0x7f080116 float:1.8078065E38 double:1.0529680195E-314;\n r5.setText(r7);\n goto L_0x079e;\n L_0x0821:\n r0 = r19;\n r7 = r0.okQ;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.olb;\n r8 = 8;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okU;\n r8 = 0;\n r7.setVisibility(r8);\n r0 = r19;\n r7 = r0.okW;\n r7.setText(r5);\n r5 = com.tencent.mm.t.a.b.AL();\n r0 = r19;\n r7 = r0.okV;\n r8 = com.tencent.mm.t.a.a.AK();\n r9 = com.tencent.mm.t.a.c.cxH;\n r5.a(r7, r6, r8, r9);\n goto L_0x0707;\n L_0x0855:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x085b:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x086a:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0875:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x08f8;\n L_0x0884:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x08f8;\n L_0x088e:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x08a1:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x08e1;\n L_0x08bc:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x08d7;\n L_0x08d1:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x0902;\n L_0x08d7:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n L_0x08e1:\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x090a;\n L_0x08e7:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x08ed:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x08f8:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x08a1;\n L_0x0902:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x08e1;\n L_0x090a:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0910:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x091f:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x092a:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.cox;\n r7 = 1;\n if (r6 != r7) goto L_0x09a8;\n L_0x0939:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234775; // 0x7f080fd7 float:1.8085725E38 double:1.0529698855E-314;\n r6.setText(r7);\n L_0x0943:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0966;\n L_0x0949:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0966;\n L_0x0953:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0966:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0981:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x09d9;\n L_0x0999:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x09d9;\n L_0x099f:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x09a8:\n r0 = r20;\n r6 = r0.cox;\n r7 = 2;\n if (r6 != r7) goto L_0x09ba;\n L_0x09af:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234777; // 0x7f080fd9 float:1.808573E38 double:1.0529698865E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09ba:\n r0 = r20;\n r6 = r0.cox;\n r7 = 3;\n if (r6 != r7) goto L_0x09cd;\n L_0x09c1:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234776; // 0x7f080fd8 float:1.8085727E38 double:1.052969886E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09cd:\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131234778; // 0x7f080fda float:1.8085731E38 double:1.052969887E-314;\n r6.setText(r7);\n goto L_0x0943;\n L_0x09d9:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x09e5:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2131233764; // 0x7f080be4 float:1.8083675E38 double:1.052969386E-314;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0a25:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0a4c;\n L_0x0a3d:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x0a4c;\n L_0x0a43:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0a4c:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0a58:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0a84;\n L_0x0a5e:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0a84;\n L_0x0a68:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0a84:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0a9f:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0ac6;\n L_0x0ab7:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x0ac6;\n L_0x0abd:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0ac6:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0ad2:\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0b3d;\n L_0x0ad8:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0b3d;\n L_0x0ae2:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n L_0x0aea:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 2;\n r6.setMaxLines(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0b16:\n r0 = r20;\n r5 = r0.appId;\n r6 = 1;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = com.tencent.mm.pluginsdk.model.app.g.b(r5, r6, r7);\n if (r5 == 0) goto L_0x0b31;\n L_0x0b2b:\n r6 = r5.isRecycled();\n if (r6 == 0) goto L_0x0b47;\n L_0x0b31:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0b3d:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0aea;\n L_0x0b47:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0b50:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0bf3;\n L_0x0b56:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0bf3;\n L_0x0b60:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0b68:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0bbc;\n L_0x0b94:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0bb2;\n L_0x0bac:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0bfe;\n L_0x0bb2:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n L_0x0bbc:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r6 = 0;\n r8 = \"\";\n r9 = 8;\n r10 = 0;\n r11 = r25.bFU();\n r0 = r20;\n r12 = r0.bnR;\n r0 = r20;\n r13 = r0.bnS;\n r0 = r20;\n r14 = r0.title;\n r0 = r20;\n r15 = r0.coF;\n r0 = r20;\n r0 = r0.url;\n r16 = r0;\n r17 = 0;\n r18 = 0;\n r5 = r26;\n r7 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18);\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0bf3:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0b68;\n L_0x0bfe:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0bbc;\n L_0x0c06:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0ca7;\n L_0x0c0c:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0ca7;\n L_0x0c16:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0c1e:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0c72;\n L_0x0c4a:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0c68;\n L_0x0c62:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0cb2;\n L_0x0c68:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n L_0x0c72:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r7 = \"\";\n r8 = r25.bFU();\n r0 = r20;\n r9 = r0.bnR;\n r0 = r20;\n r10 = r0.bnS;\n r0 = r20;\n r11 = r0.title;\n r0 = r20;\n r12 = r0.cqd;\n r0 = r20;\n r13 = r0.designerName;\n r0 = r20;\n r14 = r0.designerRediretctUrl;\n r0 = r20;\n r15 = r0.url;\n r5 = r26;\n r6 = r24;\n r4.<init>(r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15);\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0ca7:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0c1e;\n L_0x0cb2:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0c72;\n L_0x0cba:\n r0 = r20;\n r4 = r0.title;\n if (r4 == 0) goto L_0x0d7b;\n L_0x0cc0:\n r0 = r20;\n r4 = r0.title;\n r4 = r4.length();\n if (r4 <= 0) goto L_0x0d7b;\n L_0x0cca:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 0;\n r4.setVisibility(r6);\n L_0x0cd2:\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 0;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okC;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okH;\n r6 = 8;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.okD;\n r6 = 4;\n r4.setVisibility(r6);\n r0 = r19;\n r4 = r0.dtZ;\n r6 = 2;\n r4.setMaxLines(r6);\n if (r5 == 0) goto L_0x0d17;\n L_0x0cfe:\n r0 = r26;\n r4 = r0.field_imgPath;\n r4 = com.tencent.mm.sdk.platformtools.be.kS(r4);\n if (r4 == 0) goto L_0x0d86;\n L_0x0d08:\n r4 = com.tencent.mm.ae.n.GL();\n r0 = r20;\n r5 = r0.thumburl;\n r0 = r19;\n r6 = r0.okd;\n r4.a(r5, r6);\n L_0x0d17:\n r4 = new com.tencent.mm.ui.chatting.dl;\n r4.<init>();\n r0 = r26;\n r4.bmk = r0;\n r5 = 0;\n r4.nQK = r5;\n r0 = r24;\n r4.position = r0;\n r5 = 0;\n r4.oxP = r5;\n r5 = r25.bFU();\n r4.title = r5;\n r0 = r20;\n r5 = r0.bnR;\n r4.bnR = r5;\n r0 = r20;\n r5 = r0.bnS;\n r4.bnS = r5;\n r0 = r20;\n r5 = r0.title;\n r4.oxQ = r5;\n r0 = r20;\n r5 = r0.type;\n r6 = 26;\n if (r5 != r6) goto L_0x0db9;\n L_0x0d4a:\n r5 = 12;\n r4.eKg = r5;\n r0 = r20;\n r5 = r0.tid;\n r4.tid = r5;\n r0 = r20;\n r5 = r0.cqe;\n r4.cqe = r5;\n r0 = r20;\n r5 = r0.desc;\n r4.desc = r5;\n r0 = r20;\n r5 = r0.iconUrl;\n r4.iconUrl = r5;\n r0 = r20;\n r5 = r0.secondUrl;\n r4.secondUrl = r5;\n r0 = r20;\n r5 = r0.pageType;\n r4.pageType = r5;\n L_0x0d72:\n r0 = r19;\n r5 = r0.okP;\n r5.setTag(r4);\n goto L_0x0299;\n L_0x0d7b:\n r0 = r19;\n r4 = r0.dtY;\n r6 = 8;\n r4.setVisibility(r6);\n goto L_0x0cd2;\n L_0x0d86:\n r4 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r5 = r0.field_imgPath;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = com.tencent.mm.bd.a.getDensity(r6);\n r4 = r4.a(r5, r6);\n if (r4 == 0) goto L_0x0da4;\n L_0x0d9e:\n r5 = r4.isRecycled();\n if (r5 == 0) goto L_0x0db0;\n L_0x0da4:\n r0 = r19;\n r4 = r0.okd;\n r5 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r4.setImageResource(r5);\n goto L_0x0d17;\n L_0x0db0:\n r0 = r19;\n r5 = r0.okd;\n r5.setImageBitmap(r4);\n goto L_0x0d17;\n L_0x0db9:\n r0 = r20;\n r5 = r0.type;\n r6 = 27;\n if (r5 != r6) goto L_0x0dea;\n L_0x0dc1:\n r5 = 13;\n r4.eKg = r5;\n r0 = r20;\n r5 = r0.tid;\n r4.tid = r5;\n r0 = r20;\n r5 = r0.cqe;\n r4.cqe = r5;\n r0 = r20;\n r5 = r0.desc;\n r4.desc = r5;\n r0 = r20;\n r5 = r0.iconUrl;\n r4.iconUrl = r5;\n r0 = r20;\n r5 = r0.secondUrl;\n r4.secondUrl = r5;\n r0 = r20;\n r5 = r0.pageType;\n r4.pageType = r5;\n goto L_0x0d72;\n L_0x0dea:\n r5 = \"MicroMsg.ChattingItemAppMsgTo\";\n r6 = \"unknow view type\";\n com.tencent.mm.sdk.platformtools.v.i(r5, r6);\n goto L_0x0d72;\n L_0x0df5:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.dtY;\n r0 = r20;\n r7 = r0.description;\n r6.setText(r7);\n r0 = r19;\n r6 = r0.dtZ;\n r0 = r20;\n r7 = r0.cpn;\n r6.setText(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0e72;\n L_0x0e19:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0e72;\n L_0x0e23:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r20;\n r7 = r0.title;\n r6.setText(r7);\n L_0x0e36:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0299;\n L_0x0e51:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r5 = r5.a(r6, r7);\n if (r5 == 0) goto L_0x0e7c;\n L_0x0e69:\n r0 = r19;\n r6 = r0.okd;\n r6.setImageBitmap(r5);\n goto L_0x0299;\n L_0x0e72:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0e36;\n L_0x0e7c:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2131165247; // 0x7f07003f float:1.7944706E38 double:1.052935534E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x0e88:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x0f1a;\n L_0x0e9f:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x0f1a;\n L_0x0ea9:\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n L_0x0ec9:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 3;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0eed;\n L_0x0ee4:\n r0 = r19;\n r6 = r0.okd;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0eed:\n r0 = r25;\n r1 = r19;\n r2 = r20;\n r3 = r26;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r2, r3, r5);\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x0f42;\n L_0x0efe:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0f0f:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0f1a:\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r8 = com.tencent.mm.sdk.platformtools.aa.getContext();\n r9 = 2131232755; // 0x7f0807f3 float:1.8081628E38 double:1.0529688875E-314;\n r8 = r8.getString(r9);\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n goto L_0x0ec9;\n L_0x0f42:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0f48:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x0f57:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x0f62:\n r0 = r19;\n r6 = r0.dtY;\n r7 = 8;\n r6.setVisibility(r7);\n r0 = r20;\n r6 = r0.title;\n if (r6 == 0) goto L_0x100a;\n L_0x0f71:\n r0 = r20;\n r6 = r0.title;\n r6 = r6.length();\n if (r6 <= 0) goto L_0x100a;\n L_0x0f7b:\n r0 = r19;\n r6 = r0.okC;\n r7 = 0;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okC;\n r7 = 2;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okC;\n r0 = r19;\n r7 = r0.okC;\n r7 = r7.getContext();\n r0 = r20;\n r8 = r0.title;\n r0 = r19;\n r9 = r0.okC;\n r9 = r9.getTextSize();\n r9 = (int) r9;\n r7 = com.tencent.mm.pluginsdk.ui.d.e.a(r7, r8, r9);\n r6.setText(r7);\n L_0x0fab:\n r0 = r19;\n r6 = r0.dtZ;\n r7 = 4;\n r6.setMaxLines(r7);\n r0 = r19;\n r6 = r0.okD;\n r7 = 4;\n r6.setVisibility(r7);\n r0 = r19;\n r6 = r0.okH;\n r7 = 8;\n r6.setVisibility(r7);\n if (r5 == 0) goto L_0x0fcf;\n L_0x0fc6:\n r0 = r19;\n r6 = r0.okd;\n r7 = 8;\n r6.setVisibility(r7);\n L_0x0fcf:\n r0 = r19;\n r1 = r20;\n com.tencent.mm.ui.chatting.m.a(r0, r1, r5);\n r0 = r19;\n r5 = r0.okd;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okO;\n r6 = 8;\n r5.setVisibility(r6);\n r5 = com.tencent.mm.ui.chatting.ad.bEA();\n if (r5 == 0) goto L_0x1014;\n L_0x0fee:\n r0 = r25;\n r5 = r0.onh;\n r0 = r19;\n r1 = r26;\n a(r0, r5, r1);\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x0fff:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x100a:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0fab;\n L_0x1014:\n r0 = r19;\n r5 = r0.ieT;\n if (r5 == 0) goto L_0x0299;\n L_0x101a:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r26;\n r5 = r0.field_status;\n r6 = 2;\n if (r5 < r6) goto L_0x0299;\n L_0x1029:\n r0 = r19;\n r5 = r0.ieT;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x0299;\n L_0x1034:\n r0 = r20;\n r5 = r0.title;\n if (r5 == 0) goto L_0x119e;\n L_0x103a:\n r0 = r20;\n r5 = r0.title;\n r5 = r5.length();\n if (r5 <= 0) goto L_0x119e;\n L_0x1044:\n r0 = r19;\n r5 = r0.dtY;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cpw;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x1184;\n L_0x1056:\n r0 = r20;\n r5 = r0.cpw;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x116a;\n L_0x1060:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r20;\n r6 = r0.cpw;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r7 = r7.getColor(r8);\n r6 = com.tencent.mm.sdk.platformtools.be.am(r6, r7);\n r5.setTextColor(r6);\n L_0x1080:\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 2;\n r5.setMaxLines(r6);\n r0 = r19;\n r5 = r0.dtZ;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cpx;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x11a9;\n L_0x109a:\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r20;\n r6 = r0.cpx;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = r7.getResources();\n r8 = 2131689769; // 0x7f0f0129 float:1.9008563E38 double:1.0531946825E-314;\n r7 = r7.getColor(r8);\n r6 = com.tencent.mm.sdk.platformtools.be.am(r6, r7);\n r5.setTextColor(r6);\n L_0x10ba:\n r0 = r19;\n r5 = r0.okC;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okD;\n r6 = 4;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okH;\n r6 = 8;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.okB;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r19;\n r5 = r0.fSs;\n r6 = 0;\n r5.setVisibility(r6);\n r0 = r20;\n r5 = r0.cps;\n r5 = com.tencent.mm.sdk.platformtools.be.kS(r5);\n if (r5 != 0) goto L_0x11c3;\n L_0x10ee:\n r0 = r19;\n r5 = r0.fSs;\n r0 = r20;\n r6 = r0.cps;\n r5.setText(r6);\n L_0x10f9:\n r0 = r22;\n r5 = r0.lVu;\n if (r5 == 0) goto L_0x11e7;\n L_0x10ff:\n r5 = com.tencent.mm.ae.n.GH();\n r0 = r26;\n r6 = r0.field_imgPath;\n r0 = r25;\n r7 = r0.nDR;\n r7 = r7.nEl;\n r7 = com.tencent.mm.bd.a.getDensity(r7);\n r8 = 0;\n r5 = r5.a(r6, r7, r8);\n if (r5 == 0) goto L_0x1131;\n L_0x1118:\n r6 = r5.isRecycled();\n if (r6 != 0) goto L_0x1131;\n L_0x111e:\n r6 = 0;\n r7 = r5.getWidth();\n r7 = r7 / 2;\n r7 = (float) r7;\n r6 = com.tencent.mm.sdk.platformtools.d.a(r5, r6, r7);\n r0 = r19;\n r7 = r0.okd;\n r7.setImageBitmap(r6);\n L_0x1131:\n r0 = r20;\n r6 = r0.cpv;\n r6 = com.tencent.mm.sdk.platformtools.be.kS(r6);\n if (r6 != 0) goto L_0x11cf;\n L_0x113b:\n r5 = com.tencent.mm.ae.n.GL();\n r0 = r20;\n r6 = r0.cpv;\n r7 = new android.widget.ImageView;\n r0 = r25;\n r8 = r0.nDR;\n r8 = r8.nEl;\n r7.<init>(r8);\n r8 = new com.tencent.mm.ae.a.a.c$a;\n r8.<init>();\n r9 = 1;\n r8.cPs = r9;\n r8 = r8.GU();\n r9 = new com.tencent.mm.ui.chatting.aw$2;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r9.<init>(r0, r1, r2);\n r5.a(r6, r7, r8, r9);\n goto L_0x0299;\n L_0x116a:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x1080;\n L_0x1184:\n r0 = r19;\n r5 = r0.dtY;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689547; // 0x7f0f004b float:1.9008112E38 double:1.053194573E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x1080;\n L_0x119e:\n r0 = r19;\n r5 = r0.dtY;\n r6 = 8;\n r5.setVisibility(r6);\n goto L_0x1080;\n L_0x11a9:\n r0 = r19;\n r5 = r0.dtZ;\n r0 = r25;\n r6 = r0.nDR;\n r6 = r6.nEl;\n r6 = r6.getResources();\n r7 = 2131689769; // 0x7f0f0129 float:1.9008563E38 double:1.0531946825E-314;\n r6 = r6.getColor(r7);\n r5.setTextColor(r6);\n goto L_0x10ba;\n L_0x11c3:\n r0 = r19;\n r5 = r0.fSs;\n r6 = 2131231814; // 0x7f080446 float:1.807972E38 double:1.0529684226E-314;\n r5.setText(r6);\n goto L_0x10f9;\n L_0x11cf:\n r0 = r19;\n r6 = r0.okQ;\n r6 = r6.getViewTreeObserver();\n r7 = new com.tencent.mm.ui.chatting.aw$3;\n r0 = r22;\n r1 = r19;\n r2 = r25;\n r7.<init>(r0, r1, r2, r5);\n r6.addOnPreDrawListener(r7);\n goto L_0x0299;\n L_0x11e7:\n r0 = r19;\n r5 = r0.okd;\n r6 = r25.getResources();\n r7 = 2130838790; // 0x7f020506 float:1.7282572E38 double:1.052774243E-314;\n r6 = android.graphics.BitmapFactory.decodeResource(r6, r7);\n r5.setImageBitmap(r6);\n goto L_0x0299;\n L_0x11fb:\n r0 = r19;\n r6 = r0.okC;\n r7 = 8;\n r6.setVisibility(r7);\n goto L_0x0269;\n L_0x1206:\n r0 = r19;\n r5 = r0.okd;\n r6 = 2130837666; // 0x7f0200a2 float:1.7280293E38 double:1.0527736876E-314;\n r5.setImageResource(r6);\n goto L_0x0299;\n L_0x1212:\n r20 = r4;\n goto L_0x0028;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.ui.chatting.aw.a(com.tencent.mm.ui.chatting.ad$a, int, com.tencent.mm.ui.chatting.ChattingUI$a, com.tencent.mm.storage.at, java.lang.String):void\");\n }",
"private void m6615a(Bundle bundle) {\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onCreate\");\n setVolumeControlStream(3);\n this.f5405Y = (AudioManager) getSystemService(\"audio\");\n this.f5406Z = (KeyguardManager) getSystemService(KeyguardManager.class);\n this.f5389I = getApplicationContext();\n this.f5429m = false;\n getWindow().clearFlags(67108864);\n if (bundle != null) {\n this.f5435p = bundle.getInt(\"save_state\");\n }\n if (Build.VERSION.SDK_INT >= 26) {\n this.f5432na = (Vibrator) getSystemService(\"vibrator\");\n }\n this.f5442sa = getIntent();\n }",
"public at(com.tencent.mm.bj.g r15) {\n /*\n r14 = this;\n r12 = 5000; // 0x1388 float:7.006E-42 double:2.4703E-320;\n r11 = 2;\n r1 = 1;\n r4 = 0;\n r6 = 0;\n r14.<init>();\n r14.gUz = r15;\n r7 = \"MediaDuplication\";\n r0 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = \"PRAGMA table_info( \";\n r2.<init>(r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.append(r7);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = \" )\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3 = 0;\n r5 = 2;\n r2 = r0.a(r2, r3, r5);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = \"name\";\n r8 = r2.getColumnIndex(r0);\t Catch:{ Exception -> 0x0195 }\n r0 = r6;\n r3 = r6;\n r5 = r6;\n L_0x0037:\n r9 = r2.moveToNext();\t Catch:{ Exception -> 0x0195 }\n if (r9 == 0) goto L_0x0064;\n L_0x003d:\n if (r8 < 0) goto L_0x0037;\n L_0x003f:\n r9 = r2.getString(r8);\t Catch:{ Exception -> 0x0195 }\n r10 = \"remuxing\";\n r10 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r10 == 0) goto L_0x004e;\n L_0x004c:\n r5 = r1;\n goto L_0x0037;\n L_0x004e:\n r10 = \"duration\";\n r10 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r10 == 0) goto L_0x0059;\n L_0x0057:\n r3 = r1;\n goto L_0x0037;\n L_0x0059:\n r10 = \"status\";\n r9 = r10.equalsIgnoreCase(r9);\t Catch:{ Exception -> 0x0195 }\n if (r9 == 0) goto L_0x0037;\n L_0x0062:\n r0 = r1;\n goto L_0x0037;\n L_0x0064:\n r2.close();\t Catch:{ Exception -> 0x0195 }\n r2 = com.tencent.mm.kernel.h.vI();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = r2.gYg;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = java.lang.Thread.currentThread();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = r8.getId();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r8 = r2.cs(r8);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n if (r5 != 0) goto L_0x008c;\n L_0x007b:\n r2 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"it had no [remuxing] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r2, r5);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = \"alter table MediaDuplication add remuxing text \";\n r5 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r5.eE(r7, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x008c:\n if (r3 != 0) goto L_0x009f;\n L_0x008e:\n r2 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r3 = \"it had no [duration] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r2, r3);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2 = \"alter table MediaDuplication add duration int \";\n r3 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r3.eE(r7, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x009f:\n if (r0 != 0) goto L_0x00b2;\n L_0x00a1:\n r0 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r2 = \"it had no [status] column, alter table now\";\n com.tencent.mm.sdk.platformtools.w.i(r0, r2);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = \"alter table MediaDuplication add status int \";\n r2 = r14.gUz;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r2.eE(r7, r0);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x00b2:\n r2 = 0;\n r0 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x00c1;\n L_0x00b8:\n r0 = com.tencent.mm.kernel.h.vI();\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0 = r0.gYg;\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n r0.aD(r8);\t Catch:{ Exception -> 0x0116, all -> 0x0145 }\n L_0x00c1:\n r7 = \"MediaDuplication\";\n r2 = 0;\n r0 = r14.gUz;\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r8 = \"SELECT count(*) from \";\n r5.<init>(r8);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = r5.append(r7);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r5 = r5.toString();\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r8 = 0;\n r9 = 2;\n r5 = r0.a(r5, r8, r9);\t Catch:{ Exception -> 0x014c, all -> 0x017d }\n r0 = r5.moveToFirst();\t Catch:{ Exception -> 0x0187 }\n if (r0 == 0) goto L_0x0197;\n L_0x00e4:\n r0 = 0;\n r0 = r5.getInt(r0);\t Catch:{ Exception -> 0x0187 }\n L_0x00e9:\n r5.close();\t Catch:{ Exception -> 0x018b }\n if (r0 < r12) goto L_0x00f7;\n L_0x00ee:\n r5 = r14.gUz;\t Catch:{ Exception -> 0x018d, all -> 0x017d }\n r8 = 0;\n r9 = 0;\n r2 = r5.delete(r7, r8, r9);\t Catch:{ Exception -> 0x018d, all -> 0x017d }\n r2 = (long) r2;\n L_0x00f7:\n r4 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"MediaDuplication record[%d], max record[%d], deleteRecord[%d]\";\n r7 = 3;\n r7 = new java.lang.Object[r7];\n r0 = java.lang.Integer.valueOf(r0);\n r7[r6] = r0;\n r0 = java.lang.Integer.valueOf(r12);\n r7[r1] = r0;\n r0 = java.lang.Long.valueOf(r2);\n r7[r11] = r0;\n com.tencent.mm.sdk.platformtools.w.i(r4, r5, r7);\n return;\n L_0x0116:\n r0 = move-exception;\n r2 = r4;\n L_0x0118:\n r3 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = \"\";\n r7 = 0;\n r7 = new java.lang.Object[r7];\t Catch:{ all -> 0x0192 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r3, r0, r5, r7);\t Catch:{ all -> 0x0192 }\n r3 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0192 }\n r7 = \"tryAddDBCol error: \";\n r5.<init>(r7);\t Catch:{ all -> 0x0192 }\n r0 = r0.toString();\t Catch:{ all -> 0x0192 }\n r0 = r5.append(r0);\t Catch:{ all -> 0x0192 }\n r0 = r0.toString();\t Catch:{ all -> 0x0192 }\n com.tencent.mm.sdk.platformtools.w.e(r3, r0);\t Catch:{ all -> 0x0192 }\n if (r2 == 0) goto L_0x00c1;\n L_0x0140:\n r2.close();\n goto L_0x00c1;\n L_0x0145:\n r0 = move-exception;\n L_0x0146:\n if (r4 == 0) goto L_0x014b;\n L_0x0148:\n r4.close();\n L_0x014b:\n throw r0;\n L_0x014c:\n r0 = move-exception;\n r5 = r4;\n r4 = r0;\n r0 = r6;\n L_0x0150:\n r7 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r8 = \"\";\n r9 = 0;\n r9 = new java.lang.Object[r9];\t Catch:{ all -> 0x0185 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r7, r4, r8, r9);\t Catch:{ all -> 0x0185 }\n r7 = \"MicroMsg.MediaCheckDuplicationStorage\";\n r8 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0185 }\n r9 = \"check to delete MediaDuplication. error : \";\n r8.<init>(r9);\t Catch:{ all -> 0x0185 }\n r4 = r4.toString();\t Catch:{ all -> 0x0185 }\n r4 = r8.append(r4);\t Catch:{ all -> 0x0185 }\n r4 = r4.toString();\t Catch:{ all -> 0x0185 }\n com.tencent.mm.sdk.platformtools.w.e(r7, r4);\t Catch:{ all -> 0x0185 }\n if (r5 == 0) goto L_0x00f7;\n L_0x0178:\n r5.close();\n goto L_0x00f7;\n L_0x017d:\n r0 = move-exception;\n r5 = r4;\n L_0x017f:\n if (r5 == 0) goto L_0x0184;\n L_0x0181:\n r5.close();\n L_0x0184:\n throw r0;\n L_0x0185:\n r0 = move-exception;\n goto L_0x017f;\n L_0x0187:\n r0 = move-exception;\n r4 = r0;\n r0 = r6;\n goto L_0x0150;\n L_0x018b:\n r4 = move-exception;\n goto L_0x0150;\n L_0x018d:\n r5 = move-exception;\n r13 = r5;\n r5 = r4;\n r4 = r13;\n goto L_0x0150;\n L_0x0192:\n r0 = move-exception;\n r4 = r2;\n goto L_0x0146;\n L_0x0195:\n r0 = move-exception;\n goto L_0x0118;\n L_0x0197:\n r0 = r6;\n goto L_0x00e9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.storage.at.<init>(com.tencent.mm.bj.g):void\");\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void m6631c(int i) {\n XRecordView xRecordView;\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,state = \" + i);\n this.f5435p = i;\n m6606W();\n if (i == 0) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_IDLE\");\n m6622a(false);\n this.f5385E.setEnabled(true);\n C1288b bVar = this.f5396P;\n if (bVar != null) {\n bVar.removeMessages(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"setState() RecordView or RecognizeVoiceView error:\");\n }\n }\n if (this.f5425k) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,fileSizeSet = \" + this.f5425k);\n this.f5425k = false;\n this.f5453y = -1;\n this.f5409c = getResources().getString(R.string.max_filesize_reached);\n C1492b.m7431a((Context) this, (CharSequence) this.f5409c, 0).show();\n }\n } else if (i == 1) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_CREATED\");\n m6622a(true);\n } else if (i == 2) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_STARTED\");\n m6622a(true);\n if (C1411k.m6820b(this)) {\n TwoStateLayout twoStateLayout = this.f5384D;\n twoStateLayout.setContentDescription(getResources().getString(R.string.pause) + \",\" + getResources().getString(R.string.button_talkback));\n }\n m6637d(16);\n if (!this.f5427l) {\n this.f5386F.setEnabled(true);\n } else {\n this.f5385E.setEnabled(true);\n }\n } else if (i == 3) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_STOPPED\");\n m6622a(false);\n if (C1413m.m6844f()) {\n mo5975l();\n }\n C0938a.m5002a(\"SR/SoundRecorder\", \"RecordState.RECORDER_STOPPED:preventAnimationOOMReverse()\");\n if (m6595L() && (xRecordView = this.f5391K) != null) {\n xRecordView.mo6584a();\n }\n this.f5441s = 0.0f;\n this.f5443t = 0;\n C1288b bVar2 = this.f5396P;\n if (bVar2 != null) {\n bVar2.removeMessages(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused2) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"setState() RecordView or RecognizeVoiceView error:\");\n }\n }\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_STOPED\");\n } else if (i == 4) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_PAUSED\");\n this.f5407aa = mo5971h();\n mo5965b(this.f5407aa);\n C0938a.m5002a(\"SR/SoundRecorder\", \"<onStateChanged>,RECORDER_PAUSED\");\n m6622a(false);\n C0938a.m5002a(\"SR/SoundRecorder\", \"RecordState.RECORDER_PAUSED:preventAnimationOOMReverse()\");\n if (C1411k.m6820b(this)) {\n TwoStateLayout twoStateLayout2 = this.f5384D;\n twoStateLayout2.setContentDescription(getResources().getString(R.string.manager_title) + \",\" + getResources().getString(R.string.button_talkback));\n }\n C1288b bVar3 = this.f5396P;\n if (bVar3 != null) {\n bVar3.removeMessages(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused3) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"setState() RecordView or RecognizeVoiceView error:\");\n }\n }\n }\n }",
"public void mo63045a(C44921e eVar) {\n String str;\n super.mo63045a(eVar);\n C24942al.m81836b(mo75261ab(), this.f89221bo);\n if (C25352e.m83221d(this.f77546j)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str = \"\";\n } else {\n str = \"video\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }",
"public void mo55254a() {\n }",
"public void m6606W() {\n /*\n r17 = this;\n r0 = r17\n com.android.service.RecordService$b r1 = r0.f5401U\n if (r1 != 0) goto L_0x0007\n return\n L_0x0007:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"<updateTimerView>,mState = \"\n r1.append(r2)\n int r2 = r0.f5435p\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n java.lang.String r2 = \"SR/SoundRecorder\"\n p050c.p051a.p058e.p059a.C0938a.m5002a(r2, r1)\n com.android.service.RecordService$b r1 = r0.f5401U\n long r3 = r1.mo6348i()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r7 = r3 / r5\n r0.f5420ha = r7\n com.android.service.RecordService$b r1 = r0.f5401U\n long r9 = r1.mo6346g()\n int r1 = r0.f5435p\n r11 = 3\n r12 = 4\n r13 = 1\n r14 = 2\n r5 = 0\n if (r1 == 0) goto L_0x009a\n if (r1 == r13) goto L_0x0043\n if (r1 == r14) goto L_0x0055\n if (r1 == r11) goto L_0x0045\n if (r1 == r12) goto L_0x00a1\n L_0x0043:\n r7 = r5\n goto L_0x00a1\n L_0x0045:\n int r1 = (r9 > r5 ? 1 : (r9 == r5 ? 0 : -1))\n if (r1 > 0) goto L_0x004b\n r7 = r5\n goto L_0x004d\n L_0x004b:\n r0.f5451x = r5\n L_0x004d:\n android.os.Handler r1 = r0.f5394N\n java.lang.Runnable r3 = r0.f5446ua\n r1.removeCallbacks(r3)\n goto L_0x00a1\n L_0x0055:\n r0.f5449w = r3\n int r1 = r0.f5439r\n if (r1 != r12) goto L_0x006b\n android.os.Handler r1 = r0.f5394N\n java.lang.Runnable r3 = r0.f5446ua\n long r7 = r0.f5451x\n r15 = 1000(0x3e8, double:4.94E-321)\n long r7 = r7 * r15\n long r12 = r0.f5449w\n long r7 = r7 - r12\n r1.postDelayed(r3, r7)\n goto L_0x007f\n L_0x006b:\n r15 = 1000(0x3e8, double:4.94E-321)\n android.os.Handler r1 = r0.f5394N\n java.lang.Runnable r3 = r0.f5446ua\n long r7 = r0.f5451x\n r12 = 1\n long r7 = r7 + r12\n r0.f5451x = r7\n long r7 = r7 * r15\n long r12 = r0.f5449w\n long r7 = r7 - r12\n r1.postDelayed(r3, r7)\n L_0x007f:\n long r7 = r0.f5449w\n r12 = 500(0x1f4, double:2.47E-321)\n long r7 = r7 + r12\n long r7 = r7 / r15\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r3 = \"<updateTimerView>,currentTime = \"\n r1.append(r3)\n r1.append(r7)\n java.lang.String r1 = r1.toString()\n p050c.p051a.p058e.p059a.C0938a.m5002a(r2, r1)\n goto L_0x00a1\n L_0x009a:\n r0.f5451x = r5\n r7 = -1000(0xfffffffffffffc18, double:NaN)\n r0.f5449w = r7\n goto L_0x0043\n L_0x00a1:\n java.lang.Object[] r1 = new java.lang.Object[r11]\n r3 = 0\n r11 = 3600(0xe10, double:1.7786E-320)\n long r15 = r7 / r11\n java.lang.Long r13 = java.lang.Long.valueOf(r15)\n r1[r3] = r13\n long r11 = r7 % r11\n r15 = 60\n long r11 = r11 / r15\n java.lang.Long r3 = java.lang.Long.valueOf(r11)\n r11 = 1\n r1[r11] = r3\n long r11 = r7 % r15\n java.lang.Long r3 = java.lang.Long.valueOf(r11)\n r1[r14] = r3\n java.lang.String r3 = \"%02d:%02d:%02d\"\n java.lang.String r1 = java.lang.String.format(r3, r1)\n r0.f5413e = r1\n int r1 = r0.f5435p\n if (r1 == r14) goto L_0x00d1\n r3 = 4\n if (r1 != r3) goto L_0x00d6\n L_0x00d1:\n com.android.view.timeview.TimeView r1 = r0.f5387G\n r1.setCurrentTime(r7)\n L_0x00d6:\n int r1 = r0.f5435p\n r0.f5439r = r1\n com.android.service.RecordService$b r1 = r0.f5401U\n if (r1 == 0) goto L_0x012f\n boolean r1 = r0.f5425k\n if (r1 != 0) goto L_0x012f\n boolean r1 = r0.f5421i\n if (r1 == 0) goto L_0x012f\n int r1 = (r9 > r5 ? 1 : (r9 == r5 ? 0 : -1))\n if (r1 > 0) goto L_0x012f\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r3 = \"<updateTimerView>,mHasFileSizeLimitation : \"\n r1.append(r3)\n boolean r3 = r0.f5421i\n r1.append(r3)\n java.lang.String r3 = \",mRecorder.getRemainingTime(): \"\n r1.append(r3)\n r1.append(r9)\n java.lang.String r1 = r1.toString()\n p050c.p051a.p058e.p059a.C0938a.m5002a(r2, r1)\n android.os.Handler r1 = r0.f5394N\n java.lang.Runnable r3 = r0.f5446ua\n r1.removeCallbacks(r3)\n r1 = 1\n r0.f5425k = r1\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r3 = \"<updateTimerView>, mState = \"\n r1.append(r3)\n int r3 = r0.f5435p\n r1.append(r3)\n java.lang.String r1 = r1.toString()\n p050c.p051a.p058e.p059a.C0938a.m5002a(r2, r1)\n int r1 = r0.f5435p\n if (r1 != r14) goto L_0x012f\n r17.m6604U()\n L_0x012f:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.activity.SoundRecorder.m6606W():void\");\n }",
"private void m6597N() {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<popClearDialogBox>\");\n String lowerCase = this.f5399S.mo6173f().getAbsolutePath().toLowerCase();\n if (this.f5419h) {\n C1492b.m7431a((Context) this, (CharSequence) getResources().getString(R.string.phone_mtp_space_expired_smartkey), 1).show();\n this.f5419h = false;\n }\n Intent intent = new Intent(\"com.iqoo.secure.LOW_MEMORY_WARNING\");\n intent.addFlags(268435456);\n intent.putExtra(\"require_size\", 5242880);\n intent.putExtra(\"pkg_name\", getPackageName());\n intent.putExtra(\"extra_loc\", 1);\n intent.putExtra(\"tips_title\", getResources().getString(R.string.manager_title));\n intent.putExtra(\"tips_title_all\", getResources().getString(R.string.unable_to_record));\n try {\n startActivity(intent);\n } catch (Exception unused) {\n Intent intent2 = new Intent();\n intent2.putExtra(\"BBKPhoneCardName\", lowerCase);\n intent2.setComponent(new ComponentName(\"com.android.filemanager\", \"com.android.filemanager.FileManagerActivity\"));\n startActivity(intent2);\n }\n }",
"private /* synthetic */ void m74087a(String str, View view) {\n ZAEvent a = ((ZAEvent) ZA.m91648f().mo87656a(4848)).mo87711a(C31346k.EnumC31349c.Click);\n ZALayer[] iVarArr = {new ZALayer().mo87718a(new PageInfoType(ContentType.EnumC30787c.RemixAlbum, str))};\n ((ZAEvent) ((ZAEvent) a.mo87666a(iVarArr)).mo87664a(new ButtonExtra(getString(R.string.n8)))).mo87673e();\n dismissAllowingStateLoss();\n }",
"com.google.speech.logs.timeline.InputEvent.Event getEvent();",
"private void startRecording() {\n\n }",
"public void mo44053a() {\n }",
"private void m6613a(Intent intent) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<parseIntentFromListFragment>\");\n if (intent != null) {\n String stringExtra = intent.getStringExtra(\"startMode\");\n if (stringExtra != null && stringExtra.contains(\"startFromSelf\")) {\n C0938a.m5002a(\"SR/SoundRecorder\", \"startMode: startFromSelf\");\n if (this.f5435p == 0 && !this.f5427l && !C1413m.m6844f()) {\n this.f5384D.mo6532a(getResources().getString(R.string.pause), R.drawable.btn_play_15);\n }\n this.f5444ta.sendEmptyMessageDelayed(5, 350);\n } else if (!this.f5427l) {\n this.f5444ta.sendEmptyMessageDelayed(6, 350);\n }\n }\n }",
"public final void mo75263ad() {\n String str;\n super.mo75263ad();\n if (C25352e.m83313X(this.f77546j)) {\n if (C6399b.m19944t()) {\n if (!C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) && C25371n.m83443a(mo75261ab())) {\n C25371n.m83471b(mo75261ab(), C25352e.m83305P(this.f77546j));\n }\n } else if (!DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f77546j);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75512a(\"result_ad\", aweme2.getAwemeRawAd(), false);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }\n }\n m110463ax();\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) || DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\");\n if (C25352e.m83313X(this.f77546j)) {\n str = \"download_button\";\n } else {\n str = \"more_button\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }",
"public void mo5977n() {\n this.f5394N.postDelayed(new C1273Qa(this, new String[]{\"android.permission.RECORD_AUDIO\", \"android.permission.WRITE_EXTERNAL_STORAGE\"}), 300);\n }",
"public final void zza(com.google.android.gms.internal.cast.zzcn r9) {\n /*\n r8 = this;\n com.google.android.gms.cast.RemoteMediaPlayer r9 = r8.zzfd\n java.lang.Object r9 = \n // error: 0x0002: INVOKE (r9 I:java.lang.Object) = (r9 I:com.google.android.gms.cast.RemoteMediaPlayer) com.google.android.gms.cast.RemoteMediaPlayer.zze(com.google.android.gms.cast.RemoteMediaPlayer):java.lang.Object type: STATIC\n monitor-enter(r9)\n com.google.android.gms.cast.RemoteMediaPlayer r0 = r8.zzfd // Catch:{ all -> 0x0055 }\n com.google.android.gms.cast.RemoteMediaPlayer$zza r0 = r0.zzey // Catch:{ all -> 0x0055 }\n com.google.android.gms.common.api.GoogleApiClient r1 = r8.zzfe // Catch:{ all -> 0x0055 }\n r0.zza(r1) // Catch:{ all -> 0x0055 }\n r0 = 0\n com.google.android.gms.cast.RemoteMediaPlayer r1 = r8.zzfd // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n com.google.android.gms.internal.cast.zzdh r2 = r1.zzex // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n com.google.android.gms.internal.cast.zzdm r3 = r8.zzgd // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n long r4 = r8.val$position // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n int r6 = r8.zzfw // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n org.json.JSONObject r7 = r8.zzfk // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n r2.zza(r3, r4, r6, r7) // Catch:{ zzdk | IllegalStateException -> 0x0030 }\n com.google.android.gms.cast.RemoteMediaPlayer r1 = r8.zzfd // Catch:{ all -> 0x0055 }\n com.google.android.gms.cast.RemoteMediaPlayer$zza r1 = r1.zzey // Catch:{ all -> 0x0055 }\n r1.zza(r0) // Catch:{ all -> 0x0055 }\n goto L_0x0049\n L_0x002e:\n r1 = move-exception\n goto L_0x004b\n L_0x0030:\n com.google.android.gms.common.api.Status r1 = new com.google.android.gms.common.api.Status // Catch:{ all -> 0x002e }\n r2 = 2100(0x834, float:2.943E-42)\n r1.<init>(r2) // Catch:{ all -> 0x002e }\n com.google.android.gms.common.api.Result r1 = r8.createFailedResult(r1) // Catch:{ all -> 0x002e }\n com.google.android.gms.cast.RemoteMediaPlayer$MediaChannelResult r1 = (com.google.android.gms.cast.RemoteMediaPlayer.MediaChannelResult) r1 // Catch:{ all -> 0x002e }\n r8.setResult(r1) // Catch:{ all -> 0x002e }\n com.google.android.gms.cast.RemoteMediaPlayer r1 = r8.zzfd // Catch:{ all -> 0x0055 }\n com.google.android.gms.cast.RemoteMediaPlayer$zza r1 = r1.zzey // Catch:{ all -> 0x0055 }\n r1.zza(r0) // Catch:{ all -> 0x0055 }\n L_0x0049:\n monitor-exit(r9) // Catch:{ all -> 0x0055 }\n return\n L_0x004b:\n com.google.android.gms.cast.RemoteMediaPlayer r2 = r8.zzfd // Catch:{ all -> 0x0055 }\n com.google.android.gms.cast.RemoteMediaPlayer$zza r2 = r2.zzey // Catch:{ all -> 0x0055 }\n r2.zza(r0) // Catch:{ all -> 0x0055 }\n throw r1 // Catch:{ all -> 0x0055 }\n L_0x0055:\n r0 = move-exception\n monitor-exit(r9) // Catch:{ all -> 0x0055 }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.cast.zzbj.zza(com.google.android.gms.internal.cast.zzcn):void\");\n }",
"private final void m123456a() {\n CutVideoViewModel cutVideoViewModel = this.f100413c;\n if (cutVideoViewModel == null) {\n C7573i.m23583a(\"cutVideoViewModel\");\n }\n Serializable q = cutVideoViewModel.mo97164q();\n if (q == null) {\n return;\n }\n if (q != null) {\n startActivity(new Intent(this, (Class) q));\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type java.lang.Class<*>\");\n }",
"public abstract void mo20127a(AdRsp adRsp);",
"void mo21580A(Intent intent);",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString contextText = (String) mController.getText();\r\n\t\t\t\t\r\n\t\t\t\tif (contextText.equals(\"開始轉播\")){\r\n\t\t\t\t\ttry {\r\n\t\t startRecording();\r\n\t\t } catch (Exception e) {\r\n\t\t \te.getStackTrace();\r\n\t\t String message = e.getMessage();\r\n\t\t Log.i(null, \"Problem \" + message);\r\n\t\t mrec.release();\r\n\t\t }\r\n\t\t\t\t}\r\n\t\t\t}",
"public void mo7361a() {\n IntentFilter intentFilter = new IntentFilter();\n StringBuilder sb = new StringBuilder();\n sb.append(\"com.facebook.ads.interstitial.displayed:\");\n sb.append(this.f5196b.getUniqueId());\n intentFilter.addAction(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"videoInterstitalEvent:\");\n sb2.append(this.f5196b.getUniqueId());\n intentFilter.addAction(sb2.toString());\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"performCtaClick:\");\n sb3.append(this.f5196b.getUniqueId());\n intentFilter.addAction(sb3.toString());\n C0362f.m1362a(this.f5195a).mo1251a(this, intentFilter);\n }",
"public final void a(com.tencent.mm.plugin.game.c.ai r12, java.lang.String r13, int r14, int r15) {\n /*\n r11 = this;\n if (r12 == 0) goto L_0x000a;\n L_0x0002:\n r0 = r12.nmz;\n r0 = com.tencent.mm.sdk.platformtools.bi.cC(r0);\n if (r0 == 0) goto L_0x0010;\n L_0x000a:\n r0 = 8;\n r11.setVisibility(r0);\n L_0x000f:\n return;\n L_0x0010:\n r11.mAppId = r13;\n r11.niV = r15;\n r0 = r12.nmz;\n r7 = r0.iterator();\n L_0x001a:\n r0 = r7.hasNext();\n if (r0 == 0) goto L_0x000f;\n L_0x0020:\n r0 = r7.next();\n r4 = r0;\n r4 = (com.tencent.mm.plugin.game.c.k) r4;\n if (r4 == 0) goto L_0x001a;\n L_0x0029:\n r5 = new com.tencent.mm.plugin.game.d.e$a$a;\n r5.<init>();\n r0 = r4.nlz;\n switch(r0) {\n case 1: goto L_0x004a;\n case 2: goto L_0x00e3;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = 2;\n if (r14 != r0) goto L_0x001a;\n L_0x0036:\n r0 = r11.mContext;\n r1 = 10;\n r2 = 1002; // 0x3ea float:1.404E-42 double:4.95E-321;\n r3 = r4.nlw;\n r4 = r4.nlr;\n r6 = com.tencent.mm.plugin.game.model.ap.CD(r4);\n r4 = r13;\n r5 = r15;\n com.tencent.mm.plugin.game.model.ap.a(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x001a;\n L_0x004a:\n r0 = r4.nlx;\n if (r0 == 0) goto L_0x001a;\n L_0x004e:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djD;\n r2 = 1;\n r6 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cxP;\n r0 = r6.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cxR;\n r1 = r6.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cxO;\n r2 = r6.findViewById(r2);\n r2 = (com.tencent.mm.plugin.game.widget.EllipsizingTextView) r2;\n r3 = 2;\n r2.setMaxLines(r3);\n r3 = com.tencent.mm.R.h.cxQ;\n r3 = r6.findViewById(r3);\n r3 = (android.widget.ImageView) r3;\n r8 = r11.mContext;\n r9 = r4.nlv;\n r10 = r0.getTextSize();\n r8 = com.tencent.mm.pluginsdk.ui.d.i.b(r8, r9, r10);\n r0.setText(r8);\n r0 = r11.mContext;\n r8 = r4.nlx;\n r8 = r8.fpg;\n r9 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r8, r9);\n r1.setText(r0);\n r0 = r11.mContext;\n r1 = r4.nlx;\n r1 = r1.nkL;\n r8 = r2.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r1, r8);\n r2.setText(r0);\n r0 = r4.nlx;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x00dd;\n L_0x00b9:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nlx;\n r1 = r1.nkM;\n r2 = r5.aSD();\n r0.a(r3, r1, r2);\n L_0x00c8:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nlx;\n r2 = r2.nkN;\n r3 = r4.nlr;\n r0.<init>(r1, r2, r3);\n r6.setTag(r0);\n r6.setOnClickListener(r11);\n goto L_0x0033;\n L_0x00dd:\n r0 = 8;\n r3.setVisibility(r0);\n goto L_0x00c8;\n L_0x00e3:\n r0 = r4.nly;\n if (r0 == 0) goto L_0x001a;\n L_0x00e7:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djE;\n r2 = 1;\n r3 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cOG;\n r0 = r3.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cOI;\n r1 = r3.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cOH;\n r2 = r3.findViewById(r2);\n r2 = (android.widget.ImageView) r2;\n r6 = r11.mContext;\n r8 = r4.nlv;\n r9 = r0.getTextSize();\n r6 = com.tencent.mm.pluginsdk.ui.d.i.b(r6, r8, r9);\n r0.setText(r6);\n r0 = r11.mContext;\n r6 = r4.nly;\n r6 = r6.fpg;\n r8 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r6, r8);\n r1.setText(r0);\n r0 = r4.nly;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x016f;\n L_0x0135:\n r0 = r4.nly;\n r0 = r0.npS;\n r1 = 1;\n if (r0 != r1) goto L_0x0167;\n L_0x013c:\n r0 = 1;\n r5.nDa = r0;\n r0 = com.tencent.mm.R.g.bCF;\n r5.nDd = r0;\n L_0x0143:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nly;\n r1 = r1.nkM;\n r5 = r5.aSD();\n r0.a(r2, r1, r5);\n L_0x0152:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nly;\n r2 = r2.nkN;\n r5 = r4.nlr;\n r0.<init>(r1, r2, r5);\n r3.setTag(r0);\n r3.setOnClickListener(r11);\n goto L_0x0033;\n L_0x0167:\n r0 = 1;\n r5.hFJ = r0;\n r0 = com.tencent.mm.R.g.bCE;\n r5.nDd = r0;\n goto L_0x0143;\n L_0x016f:\n r0 = 8;\n r2.setVisibility(r0);\n goto L_0x0152;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.ui.f.a(com.tencent.mm.plugin.game.c.ai, java.lang.String, int, int):void\");\n }",
"protected void mo6255a() {\n }",
"void fireOnMessage(QRecord qr);",
"public void mo23813b() {\n }",
"public void mo5248a() {\n }",
"protected void onReactionAdded(String channel, String sender, String receiver, String emojiName) {}",
"@Override\n public void onClick(View v) {\n recorder = new AudioRecord(MediaRecorder.AudioSource.VOICE_COMMUNICATION,\n RECORDER_SAMPLERATE, RECORDER_CHANNELS,\n RECORDER_AUDIO_ENCODING, BufferElements2Rec * BytesPerElement);\n\n recorder.startRecording();\n }",
"public interface C9715b {\n\n /* renamed from: com.tencent.mm.modelvideo.b$a */\n public interface C9714a {\n /* renamed from: ad */\n void mo9058ad(String str, int i);\n\n /* renamed from: h */\n void mo9075h(String str, int i, int i2);\n\n /* renamed from: ml */\n void mo21050ml(int i);\n\n void onDataAvailable(String str, int i, int i2);\n }\n\n /* renamed from: a */\n void mo8712a(C9714a c9714a);\n\n /* renamed from: dV */\n void mo8713dV(String str);\n\n boolean isVideoDataAvailable(String str, int i, int i2);\n\n /* renamed from: r */\n void mo8715r(String str, String str2, String str3);\n\n void requestVideoData(String str, int i, int i2);\n}",
"private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }",
"private final void m110461av() {\n /*\n r4 = this;\n android.widget.LinearLayout r0 = r4.f89217bk\n r1 = 8\n if (r0 == 0) goto L_0x0009\n r0.setVisibility(r1)\n L_0x0009:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n java.lang.String r0 = r0.getDesc()\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n r2 = 0\n if (r0 != 0) goto L_0x0082\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r4.f89218bl\n if (r0 == 0) goto L_0x0025\n r1 = 2\n r0.setMaxLines(r1)\n L_0x0025:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r4.f89218bl\n if (r0 == 0) goto L_0x0039\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n java.lang.String r1 = r1.getDesc()\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n r0.setText(r1)\n L_0x0039:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25352e.m83221d(r0)\n if (r0 != 0) goto L_0x0089\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x0053\n java.lang.String r0 = r0.getAdMoreTextual()\n goto L_0x0054\n L_0x0053:\n r0 = r2\n L_0x0054:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 != 0) goto L_0x0089\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r4.f89218bl\n if (r0 == 0) goto L_0x0089\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 != 0) goto L_0x0070\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x0070:\n java.lang.String r3 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n java.lang.String r1 = r1.getAdMoreTextual()\n java.lang.String r3 = \"mAweme.awemeRawAd!!.adMoreTextual\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n r0.setMoreString(r1)\n goto L_0x0089\n L_0x0082:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r4.f89218bl\n if (r0 == 0) goto L_0x0089\n r0.setVisibility(r1)\n L_0x0089:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n if (r0 == 0) goto L_0x00c7\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n java.lang.String r1 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.base.model.UrlModel r0 = r0.getAvatarMedium()\n if (r0 != 0) goto L_0x00ad\n goto L_0x00c7\n L_0x00ad:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r4.f89219bm\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r3 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.getAvatarMedium()\n com.p280ss.android.ugc.aweme.base.C23323e.m76524b(r0, r1)\n goto L_0x00d3\n L_0x00c7:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r4.f89219bm\n r1 = 2131232103(0x7f080567, float:1.8080306E38)\n com.ss.android.ugc.aweme.base.model.AppImageUri r1 = com.p280ss.android.ugc.aweme.base.model.AppImageUri.m76615a(r1)\n com.p280ss.android.ugc.aweme.base.C23323e.m76504a(r0, r1)\n L_0x00d3:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x00e1\n return\n L_0x00e1:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r4.f77546j\n r1 = 3\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25300bx.m83125a(r0, r1)\n if (r0 == 0) goto L_0x012d\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r4.f89216bj\n if (r0 == 0) goto L_0x012c\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 == 0) goto L_0x0108\n com.ss.android.ugc.aweme.commercialize.model.OmVast r1 = r1.getOmVast()\n if (r1 == 0) goto L_0x0108\n com.bytedance.vast.model.Vast r1 = r1.vast\n if (r1 == 0) goto L_0x0108\n java.lang.String r1 = r1.adTitle\n goto L_0x0109\n L_0x0108:\n r1 = r2\n L_0x0109:\n if (r1 != 0) goto L_0x010e\n java.lang.String r2 = \"\"\n goto L_0x0127\n L_0x010e:\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 == 0) goto L_0x0127\n com.ss.android.ugc.aweme.commercialize.model.OmVast r1 = r1.getOmVast()\n if (r1 == 0) goto L_0x0127\n com.bytedance.vast.model.Vast r1 = r1.vast\n if (r1 == 0) goto L_0x0127\n java.lang.String r2 = r1.adTitle\n L_0x0127:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x012c:\n return\n L_0x012d:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r4.f89216bj\n if (r0 == 0) goto L_0x015c\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n if (r1 != 0) goto L_0x0143\n java.lang.String r1 = \"\"\n L_0x0140:\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n goto L_0x0158\n L_0x0143:\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r4.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r2 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n java.lang.String r1 = r1.getNickname()\n goto L_0x0140\n L_0x0158:\n r0.setText(r1)\n return\n L_0x015c:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.newfollow.p1424vh.CommercialFlowFeedViewHolder.m110461av():void\");\n }",
"void mo23497a(MediaSource mediaSource, Timeline timeline, Object obj);",
"public void m4566a() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.facebook.ads.interstitial.impression.logged:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.displayed:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.dismissed:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.clicked:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.error:\" + this.f4211a);\n intentFilter.addAction(\"com.facebook.ads.interstitial.activity_destroyed:\" + this.f4211a);\n LocalBroadcastManager.getInstance(this.f4212b).registerReceiver(this, intentFilter);\n }",
"public static final java.lang.String m133282a(com.p280ss.android.ugc.aweme.draft.model.C27311c r1) {\n /*\n java.lang.String r0 = \"draft\"\n kotlin.jvm.internal.C7573i.m23587b(r1, r0)\n boolean r0 = r1.mo70215ad()\n if (r0 == 0) goto L_0x001a\n com.ss.android.ugc.aweme.shortvideo.edit.model.EditPreviewInfo r1 = r1.mo70214ac()\n if (r1 == 0) goto L_0x0017\n java.lang.String r1 = r1.getDraftDir()\n if (r1 != 0) goto L_0x0019\n L_0x0017:\n java.lang.String r1 = \"\"\n L_0x0019:\n return r1\n L_0x001a:\n com.ss.android.ugc.aweme.photomovie.PhotoMovieContext r0 = r1.f72034c\n boolean r0 = com.p280ss.android.ugc.aweme.storage.p1640b.C41902b.m133264a(r0)\n if (r0 == 0) goto L_0x002b\n com.ss.android.ugc.aweme.draft.model.b r1 = r1.f72031S\n java.lang.String r1 = r1.f71951O\n if (r1 != 0) goto L_0x002a\n java.lang.String r1 = \"\"\n L_0x002a:\n return r1\n L_0x002b:\n com.ss.android.ugc.aweme.draft.model.b r1 = r1.f72031S\n java.lang.String r1 = r1.f71951O\n java.lang.String r1 = com.p280ss.android.ugc.aweme.shortvideo.WorkSpace.Workspace.m122803a(r1)\n if (r1 != 0) goto L_0x0037\n java.lang.String r1 = \"\"\n L_0x0037:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.storage.p1640b.C41911c.m133282a(com.ss.android.ugc.aweme.draft.model.c):java.lang.String\");\n }",
"public void m23075a() {\n }",
"@Override\n public void onAddIceCreamRaised() {\n }",
"void mo23214a(Message message);",
"public void mo1401a(Intent intent) {\n }",
"@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}",
"public interface C9067a {\n /* renamed from: a */\n void mo23497a(MediaSource mediaSource, Timeline timeline, Object obj);\n }",
"private final void m110460au() {\n /*\n r6 = this;\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n if (r0 == 0) goto L_0x003e\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n java.lang.String r1 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.base.model.UrlModel r0 = r0.getAvatarMedium()\n if (r0 != 0) goto L_0x0024\n goto L_0x003e\n L_0x0024:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r2 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.getAvatarMedium()\n com.p280ss.android.ugc.aweme.base.C23323e.m76524b(r0, r1)\n goto L_0x004a\n L_0x003e:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n r1 = 2131232103(0x7f080567, float:1.8080306E38)\n com.ss.android.ugc.aweme.base.model.AppImageUri r1 = com.p280ss.android.ugc.aweme.base.model.AppImageUri.m76615a(r1)\n com.p280ss.android.ugc.aweme.base.C23323e.m76504a(r0, r1)\n L_0x004a:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25352e.m83221d(r0)\n if (r0 != 0) goto L_0x0053\n return\n L_0x0053:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n r1 = 3\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25300bx.m83125a(r0, r1)\n r1 = 0\n if (r0 == 0) goto L_0x00a2\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x007b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x007b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x007b\n java.lang.String r2 = r2.adTitle\n goto L_0x007c\n L_0x007b:\n r2 = r1\n L_0x007c:\n if (r2 != 0) goto L_0x0081\n java.lang.String r2 = \"\"\n goto L_0x009c\n L_0x0081:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x009b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x009b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x009b\n java.lang.String r2 = r2.adTitle\n goto L_0x009c\n L_0x009b:\n r2 = r1\n L_0x009c:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n goto L_0x00d0\n L_0x00a2:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n if (r2 != 0) goto L_0x00b8\n java.lang.String r2 = \"\"\n L_0x00b5:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n goto L_0x00cd\n L_0x00b8:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n java.lang.String r3 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getNickname()\n goto L_0x00b5\n L_0x00cd:\n r0.setText(r2)\n L_0x00d0:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x00e2\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x00e3\n L_0x00e2:\n r0 = r1\n L_0x00e3:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n r2 = 1082130432(0x40800000, float:4.0)\n r3 = 8\n if (r0 == 0) goto L_0x011b\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x00ff\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x00ff:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x011b\n android.widget.LinearLayout r0 = r6.f89217bk\n if (r0 == 0) goto L_0x0113\n r0.setVisibility(r3)\n L_0x0113:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x011b\n r4 = 2\n r0.setMaxLines(r4)\n L_0x011b:\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x013b\n com.ss.android.ugc.aweme.feed.model.Aweme r4 = r6.f77546j\n java.lang.String r5 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r4 = r4.getAwemeRawAd()\n if (r4 != 0) goto L_0x012f\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x012f:\n java.lang.String r5 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n float r4 = r4.getAppLike()\n r0.setRatingProgress(r4)\n L_0x013b:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x014b\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x014b:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x0166\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x015f\n r0.setVisibility(r3)\n L_0x015f:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x0166\n r0.setVisibility(r3)\n L_0x0166:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x0178\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x0179\n L_0x0178:\n r0 = r1\n L_0x0179:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 == 0) goto L_0x0190\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x0188\n r0.setVisibility(r3)\n L_0x0188:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x01ac\n r0.setVisibility(r3)\n goto L_0x01ac\n L_0x0190:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x01ac\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x01a6\n java.lang.String r2 = r2.getAppInstall()\n goto L_0x01a7\n L_0x01a6:\n r2 = r1\n L_0x01a7:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01ac:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n java.lang.String r0 = r0.getDesc()\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 != 0) goto L_0x0212\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x01d3\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getDesc()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01d3:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x01e4\n java.lang.String r1 = r0.getAdMoreTextual()\n L_0x01e4:\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n boolean r0 = android.text.TextUtils.isEmpty(r1)\n if (r0 != 0) goto L_0x021a\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x0211\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 != 0) goto L_0x0200\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x0200:\n java.lang.String r2 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n java.lang.String r1 = r1.getAdMoreTextual()\n java.lang.String r2 = \"mAweme.awemeRawAd!!.adMoreTextual\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n r0.setMoreString(r1)\n L_0x0211:\n return\n L_0x0212:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x021a\n r0.setVisibility(r3)\n return\n L_0x021a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.newfollow.p1424vh.CommercialFlowFeedViewHolder.m110460au():void\");\n }",
"public interface C45630d {\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$f */\n public interface C10555f {\n /* renamed from: es */\n void mo22049es(boolean z);\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$d */\n public interface C19512d {\n /* renamed from: dd */\n void mo34676dd(int i, int i2);\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$e */\n public interface C27129e {\n void onVisibilityChanged(boolean z);\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$g */\n public enum C27130g {\n DEFAULT,\n FILL,\n CONTAIN,\n COVER;\n\n static {\n AppMethodBeat.m2505o(126548);\n }\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$a */\n public interface C38399a {\n void aDF();\n\n void aEZ();\n\n boolean aFA();\n\n void aFD();\n\n void aFE();\n\n boolean aFF();\n\n void aFG();\n\n void aFH();\n\n boolean aFI();\n\n void aFN();\n\n void aFO();\n\n boolean aFR();\n\n void aFy();\n\n void hide();\n\n void onDestroy();\n\n void seek(int i);\n\n void setDanmakuBtnOnClickListener(C10555f c10555f);\n\n void setDanmakuBtnOpen(boolean z);\n\n void setExitFullScreenBtnOnClickListener(OnClickListener onClickListener);\n\n void setFullScreenBtnOnClickListener(OnClickListener onClickListener);\n\n void setIplaySeekCallback(C42594c c42594c);\n\n void setMuteBtnOnClickListener(OnClickListener onClickListener);\n\n void setMuteBtnState(boolean z);\n\n void setOnPlayButtonClickListener(OnClickListener onClickListener);\n\n void setOnUpdateProgressLenListener(C19512d c19512d);\n\n void setOnVisibilityChangedListener(C27129e c27129e);\n\n void setPlayBtnInCenterPosition(boolean z);\n\n void setShowControlProgress(boolean z);\n\n void setShowDanmakuBtn(boolean z);\n\n void setShowFullScreenBtn(boolean z);\n\n void setShowMuteBtn(boolean z);\n\n void setShowPlayBtn(boolean z);\n\n void setShowProgress(boolean z);\n\n void setStatePorter(C38400h c38400h);\n\n void setTitle(String str);\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$h */\n public interface C38400h {\n int aFg();\n\n int aFh();\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$b */\n public interface C42593b {\n /* renamed from: H */\n void mo34677H(String str, int i, int i2);\n\n void aFq();\n\n void aFr();\n\n void aFs();\n\n void aFt();\n\n void aFu();\n\n void aFv();\n\n /* renamed from: de */\n void mo34684de(int i, int i2);\n }\n\n /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.video.d$c */\n public interface C42594c {\n void aFw();\n\n /* renamed from: oA */\n void mo22044oA(int i);\n }\n\n void aEX();\n\n void akV();\n\n void akW();\n\n /* renamed from: as */\n boolean mo61579as(float f);\n\n /* renamed from: c */\n void mo61580c(boolean z, String str, int i);\n\n /* renamed from: e */\n boolean mo61581e(double d, boolean z);\n\n int getCacheTimeSec();\n\n int getCurrPosMs();\n\n int getCurrPosSec();\n\n int getVideoDurationSec();\n\n boolean isLive();\n\n boolean isPlaying();\n\n boolean pause();\n\n /* renamed from: s */\n boolean mo61590s(double d);\n\n void setControlBar(C38399a c38399a);\n\n void setIMMVideoViewCallback(C42593b c42593b);\n\n void setMute(boolean z);\n\n void setScaleType(C27130g c27130g);\n\n void setVideoSource(int i);\n\n void start();\n\n void stop();\n}",
"public interface C31378a {\n /* renamed from: a */\n void mo80555a(MediaChooseResult mediaChooseResult);\n}",
"public void mo5994p() {\n this.f5411d = this.f5389I.getString(R.string.new_recording) + \" \" + C1398b.m6805a();\n C1413m.f5726x = this.f5411d;\n }",
"public interface C2368d {\n\n /* renamed from: com.google.android.exoplayer2.upstream.d$a */\n public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }\n\n /* renamed from: a */\n int mo1684a(byte[] bArr, int i, int i2);\n\n /* renamed from: a */\n long mo1685a(C2369e c2369e);\n\n /* renamed from: a */\n Uri mo1686a();\n\n /* renamed from: b */\n void mo1687b();\n}",
"public final void mo88395b() {\n if (this.f90938h == null) {\n this.f90938h = new C29242a(this.f90931a, this.f90937g).mo74873a((C39376h) new C39376h() {\n /* renamed from: a */\n public final void mo74759a(C29296g gVar) {\n }\n\n /* renamed from: a */\n public final void mo74760a(C29296g gVar, int i) {\n }\n\n /* renamed from: d */\n public final void mo74763d(C29296g gVar) {\n }\n\n /* renamed from: b */\n public final void mo74761b(C29296g gVar) {\n C34867a.this.f90934d.setVisibility(0);\n if (!C39805en.m127445a()) {\n C23487o.m77136a((Activity) C34867a.this.f90931a);\n }\n C6907h.m21519a((Context) C34867a.this.f90931a, \"filter_confirm\", \"mid_page\", \"0\", 0, C34867a.this.f90936f);\n }\n\n /* renamed from: c */\n public final void mo74762c(C29296g gVar) {\n String str;\n C34867a.this.f90933c = gVar;\n C34867a.this.f90932b.mo88467a(gVar.f77273h);\n if (C34867a.this.f90935e != null) {\n C34867a.this.f90935e.mo98958a(gVar);\n }\n EffectCategoryResponse b = C35563c.m114837d().mo74825b(C34867a.this.f90933c);\n if (b == null) {\n str = \"\";\n } else {\n str = b.name;\n }\n C6907h.m21524a(\"select_filter\", (Map) C38511bc.m123103a().mo96485a(\"creation_id\", C34867a.this.f90932b.mo88460a().creationId).mo96485a(\"shoot_way\", C34867a.this.f90932b.mo88460a().mShootWay).mo96483a(\"draft_id\", C34867a.this.f90932b.mo88460a().draftId).mo96485a(\"enter_method\", \"click\").mo96485a(\"filter_name\", C34867a.this.f90933c.f77268c).mo96483a(\"filter_id\", C34867a.this.f90933c.f77266a).mo96485a(\"tab_name\", str).mo96485a(\"content_source\", C34867a.this.f90932b.mo88460a().getAvetParameter().getContentSource()).mo96485a(\"content_type\", C34867a.this.f90932b.mo88460a().getAvetParameter().getContentType()).mo96485a(\"enter_from\", \"video_edit_page\").f100112a);\n }\n }).mo74871a((C29240bc) new C39369c(C35563c.f93224F.mo70097l().mo74950c().mo74723f())).mo74874a(this.f90932b.mo88460a().getAvetParameter()).mo74876a();\n if (this.f90933c != null) {\n this.f90938h.mo74751a(this.f90933c);\n }\n }\n this.f90938h.mo74749a();\n this.f90934d.setVisibility(8);\n }",
"public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }",
"private void startrecoding() {\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n String CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n mFileName = Environment.getExternalStorageDirectory().getAbsolutePath();\r\n mFileName += \"/AudioRecording\" + CurrentTime + \".3gp\";\r\n\r\n mediaRecorder = new MediaRecorder();\r\n\r\n mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\r\n mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\r\n mediaRecorder.setOutputFile(mFileName);\r\n mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\r\n\r\n try {\r\n\r\n mediaRecorder.prepare();\r\n mediaRecorder.start();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }",
"void mo23491a(MediaSourceEventListener mediaSourceEventListener);",
"public interface C38172a {\n /* renamed from: A */\n void mo21580A(Intent intent);\n\n String name();\n }",
"public void mo21793R() {\n }",
"void mo3194r();",
"private void grabar(View v) {\n if (ContextCompat.checkSelfPermission(getApplicationContext(),\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions((Activity) getApplicationContext(),\n new String[]{Manifest.permission.RECORD_AUDIO},\n REQUEST_MICROPHONE);\n\n }\n Audio = new File(AudioDir, \"audio.3gp\");\n\n mr = new MediaRecorder();\n mr.reset();\n mr.setAudioSource(MediaRecorder.AudioSource.MIC);\n mr.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n mr.setOutputFile(Audio.getAbsolutePath());\n\n try {\n mr.prepare();\n mr.start();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n\n }",
"public static void viewAlarms(){\r\n\t\t\r\n\t}",
"private void m6669y() {\n long currentTimeMillis = System.currentTimeMillis();\n long j = this.f5381A;\n if (currentTimeMillis - j > 200 || j == 0) {\n this.f5381A = currentTimeMillis;\n AudioManager audioManager = this.f5405Y;\n if (audioManager != null) {\n if (this.f5414ea) {\n audioManager.setParameters(\"audio_recordaec_enable=0\");\n this.f5410ca.setImageResource(R.drawable.btn_aec_off_selector);\n this.f5414ea = false;\n C1492b.m7433a((Context) AppFeature.m6734b(), getResources().getString(R.string.aec_close), 0);\n } else {\n audioManager.setParameters(\"audio_recordaec_enable=1\");\n this.f5410ca.setImageResource(R.drawable.btn_aec_on_selector);\n this.f5414ea = true;\n C1492b.m7433a((Context) AppFeature.m6734b(), getResources().getString(R.string.aec_open), 0);\n }\n C1387D.m6763a(this.f5414ea);\n }\n }\n }",
"public void mo5996r() {\n Message obtainMessage = this.f5396P.obtainMessage(1);\n this.f5396P.removeMessages(1);\n this.f5396P.sendMessageDelayed(obtainMessage, 16);\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n this.f5441s = (float) bVar.mo6344e();\n this.f5443t = this.f5401U.mo6348i();\n }\n if (C1413m.m6844f()) {\n this.f5392L.mo6498a(this.f5443t, this.f5431n);\n this.f5392L.mo6500b(this.f5441s);\n } else if (m6595L()) {\n this.f5391K.mo6585a(this.f5443t, this.f5431n);\n this.f5391K.mo6586b(this.f5441s);\n } else {\n this.f5392L.mo6498a(this.f5443t, this.f5431n);\n this.f5392L.mo6500b(this.f5441s);\n }\n this.f5431n = false;\n }",
"public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }",
"public void mo1531a() {\n }",
"public void mo1531a() {\n C2201w.m8373a(\"Photo TransferData start!\", 1);\n }",
"ReactionWindowInfo mo56162f();",
"public void mo115188a() {\n }",
"void mo80453a(Message message);",
"private final void m7043b() {\n AudienceView audienceView = this.f11482f;\n if (!(audienceView == null || this.f11483g == null)) {\n audienceView.setEnabled(false);\n this.f11483g.setEnabled(false);\n }\n m7042a(true);\n rqa a = rpz.m34221a();\n a.mo25007a(this.f11478b);\n a.mo25013b(this.f11480d.f30287b);\n a.f43513a.putParcelableArrayListExtra(\"INITIAL_ACL\", rqa.m34224a(this.f11480d.f30287b));\n a.mo25019d(\"80\");\n a.mo25011b(getString(C0126R.string.auth_plus_audience_selection_description_acl));\n startActivityForResult(a.f43513a, 1);\n }",
"public abstract void mo27464a();",
"interface C0868a {\n /* renamed from: a */\n void mo3207a(Object obj);\n\n /* renamed from: a */\n void mo3208a(String str, Bundle bundle);\n\n /* renamed from: a */\n void mo3209a(String str, Bundle bundle, ResultReceiver resultReceiver);\n\n /* renamed from: a */\n boolean mo3210a(Intent intent);\n }",
"public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }",
"public void mo2740a() {\n }",
"private void m6659t() {\n C0938a.m5002a(\"SR/SoundRecorder\", \"destroyObjects().\");\n if (this.f5397Q != null) {\n C0900b.m4902a(this.f5389I).mo4899a((BroadcastReceiver) this.f5397Q);\n this.f5397Q = null;\n }\n BroadcastReceiver broadcastReceiver = this.f5398R;\n if (broadcastReceiver != null) {\n unregisterReceiver(broadcastReceiver);\n this.f5398R = null;\n }\n mo5995q();\n RecordPageAddMarkReceiver recordPageAddMarkReceiver = this.f5430ma;\n if (recordPageAddMarkReceiver != null) {\n unregisterReceiver(recordPageAddMarkReceiver);\n this.f5430ma = null;\n }\n if (this.f5400T != null && mo5973j()) {\n this.f5400T.dismiss();\n this.f5427l = false;\n }\n AlertDialog alertDialog = this.f5383C;\n if (alertDialog != null && alertDialog.isShowing()) {\n this.f5383C.getButton(-1).performClick();\n }\n C1288b bVar = this.f5396P;\n if (bVar != null) {\n bVar.removeMessages(0);\n this.f5396P.removeMessages(1);\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n }\n C1425w wVar = this.f5399S;\n if (wVar != null) {\n wVar.mo6189t();\n this.f5399S = null;\n }\n }",
"AudioProcessor[] mo25073a();",
"public abstract void audioMessage(Message m);",
"public void mo38117a() {\n }",
"private void m122580a() {\n ((ShareActionBar) this.receiver).mo95951a();\n }",
"void track(String sender, String additionalInfo);",
"public final void mo86958ap() {\n if (!mo86959aq()) {\n C24411a.m80259a();\n C24411a.m80261a(mo75261ab(), this.f77546j);\n if (C25352e.m83221d(this.f77546j)) {\n Context ab = mo75261ab();\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n String valueOf = String.valueOf(awemeRawAd.getCreativeId().longValue());\n String str = \"background\";\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme2.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd2, \"mAweme.awemeRawAd!!\");\n C24976t.m82219f(ab, valueOf, str, awemeRawAd2.getLogExtra());\n }\n mo75308a(true, false);\n }\n }",
"void mo25008a(MessageSnapshot messageSnapshot);",
"void mo713a(RatingCompat ratingCompat, Bundle bundle) throws RemoteException;",
"private final void m11061a(android.app.Activity r5, app.zenly.locator.experimental.inbox.p092i.C3708a r6) {\n /*\n r4 = this;\n app.zenly.locator.experimental.inbox.j.b r0 = r6.mo10234a()\n co.znly.models.i r0 = r0.mo10237a()\n if (r0 == 0) goto L_0x0011\n java.util.List r0 = r0.getPhoneNumbersList()\n if (r0 == 0) goto L_0x0011\n goto L_0x0015\n L_0x0011:\n java.util.List r0 = kotlin.collections.C12848o.m33640a()\n L_0x0015:\n androidx.appcompat.app.a$a r1 = new androidx.appcompat.app.a$a\n r1.<init>(r5)\n r2 = 2131231362(0x7f080282, float:1.8078803E38)\n r1.mo527a(r2)\n r2 = 2132018240(0x7f140440, float:1.9674781E38)\n r1.mo548c(r2)\n app.zenly.locator.experimental.inbox.b$a r2 = new app.zenly.locator.experimental.inbox.b$a\n r2.<init>(r4, r6)\n r1.mo530a(r2)\n android.widget.ArrayAdapter r2 = new android.widget.ArrayAdapter\n r3 = 2131624347(0x7f0e019b, float:1.8875871E38)\n r2.<init>(r5, r3, r0)\n app.zenly.locator.experimental.inbox.b$b r3 = new app.zenly.locator.experimental.inbox.b$b\n r3.<init>(r4, r0, r6, r5)\n r1.mo536a(r2, r3)\n androidx.appcompat.app.a r5 = r1.mo542a()\n r5.show()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: app.zenly.locator.experimental.inbox.C3689b.m11061a(android.app.Activity, app.zenly.locator.experimental.inbox.i.a):void\");\n }",
"private String m6598O() {\n try {\n Field declaredField = Class.forName(\"android.app.Activity\").getDeclaredField(\"mReferrer\");\n declaredField.setAccessible(true);\n return (String) declaredField.get(this);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"<reflectGetReferrer>,Exception: \" + e.toString());\n return null;\n }\n }",
"void m1864a() {\r\n }",
"public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }"
]
| [
"0.58831215",
"0.58810973",
"0.5859",
"0.5856456",
"0.58168805",
"0.58104265",
"0.57934123",
"0.57848585",
"0.577781",
"0.57766515",
"0.5750008",
"0.5746232",
"0.5731442",
"0.57256514",
"0.570399",
"0.5672355",
"0.56685054",
"0.5635925",
"0.5635925",
"0.5635925",
"0.5635925",
"0.5635925",
"0.5635925",
"0.5635925",
"0.5622919",
"0.5604673",
"0.5603395",
"0.5593218",
"0.55919546",
"0.5580614",
"0.5529251",
"0.55108595",
"0.549699",
"0.54780096",
"0.54712844",
"0.5469233",
"0.54665536",
"0.5455638",
"0.5449861",
"0.5446236",
"0.5441136",
"0.5437834",
"0.5437061",
"0.5424348",
"0.5423782",
"0.5416943",
"0.5413",
"0.54111606",
"0.54092455",
"0.5393496",
"0.5391315",
"0.5387788",
"0.5372144",
"0.53640676",
"0.5360404",
"0.5353103",
"0.53487605",
"0.53481966",
"0.5344615",
"0.533932",
"0.5338818",
"0.5338361",
"0.533578",
"0.5333028",
"0.53283113",
"0.5327054",
"0.53243273",
"0.5319503",
"0.5317158",
"0.53152275",
"0.53005034",
"0.5298974",
"0.5292251",
"0.52910674",
"0.52903575",
"0.5289989",
"0.5281027",
"0.52805614",
"0.52772456",
"0.5276411",
"0.5273738",
"0.5273298",
"0.5272687",
"0.5272193",
"0.5268264",
"0.52643",
"0.52607137",
"0.52598095",
"0.52543",
"0.5253959",
"0.5250194",
"0.52468926",
"0.5234731",
"0.5233779",
"0.5230179",
"0.5226782",
"0.52187365",
"0.52132607",
"0.5210746",
"0.5210058",
"0.5207701"
]
| 0.0 | -1 |
/ renamed from: a | C15430g mo56154a(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
/ renamed from: a | void mo56155a(float f); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
/ renamed from: a | void mo56156a(int i, int i2); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
/ renamed from: b | float mo56157b(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"@Override\n\tpublic void b() {\n\n\t}",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public bb b() {\n return a(this.a);\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public void b() {\r\n }",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public abstract void b(StringBuilder sb);",
"public void b() {\n }",
"public void b() {\n }",
"protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public void b() {\n ((a) this.a).b();\n }",
"public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }",
"b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public t b() {\n return a(this.a);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }",
"private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"public abstract T zzm(B b);",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public abstract void zzc(B b, int i, int i2);",
"public interface b {\n}",
"public interface b {\n}",
"private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }",
"BSubstitution createBSubstitution();",
"public void b(ahd paramahd) {}",
"void b();",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"B database(S database);",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public abstract C0631bt mo9227aB();",
"public an b() {\n return a(this.a);\n }",
"protected abstract void a(bru parambru);",
"static void go(Base b) {\n\t\tb.add(8);\n\t}",
"void mo46242a(bmc bmc);",
"public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }",
"public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public abstract BoundType b();",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"@Override\n\tpublic void visit(PartB partB) {\n\n\t}",
"public abstract void zzb(B b, int i, long j);",
"public abstract void zza(B b, int i, zzeh zzeh);",
"int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}",
"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 int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }",
"public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }",
"public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }",
"public abstract void a(StringBuilder sb);",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public abstract void zzf(Object obj, B b);",
"public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }",
"void mo83703a(C32456b<T> bVar);",
"public void a(String str) {\n ((b.b) this.b).d(str);\n }",
"public void selectB() { }",
"BOperation createBOperation();",
"void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}",
"private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }",
"public void b(String str) {\n ((b.b) this.b).e(str);\n }",
"public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }",
"public abstract void zza(B b, int i, T t);",
"public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }",
"public abstract void zza(B b, int i, long j);",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public abstract void mo9798a(byte b);",
"public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }",
"private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.5886636",
"0.58828026",
"0.5855491",
"0.584618",
"0.5842517",
"0.5824137",
"0.5824071",
"0.58097327",
"0.5802052",
"0.58012927",
"0.579443",
"0.5792392",
"0.57902914",
"0.5785124",
"0.57718205",
"0.57589084",
"0.5735892",
"0.5735892",
"0.5734873",
"0.5727929",
"0.5720821",
"0.5712531",
"0.5706813",
"0.56896514",
"0.56543154",
"0.5651059",
"0.5649904",
"0.56496733",
"0.5647035",
"0.5640965",
"0.5640109",
"0.563993",
"0.5631903",
"0.5597427",
"0.55843794",
"0.5583287",
"0.557783",
"0.55734867",
"0.55733293",
"0.5572254",
"0.55683887",
"0.55624336",
"0.55540246",
"0.5553985",
"0.55480546",
"0.554261",
"0.5535739",
"0.5529958",
"0.5519634",
"0.5517503",
"0.55160624",
"0.5511545",
"0.5505353",
"0.5500533",
"0.5491741",
"0.5486198",
"0.5481978",
"0.547701",
"0.54725856",
"0.5471632",
"0.5463497",
"0.5460805",
"0.5454913",
"0.5454885",
"0.54519916",
"0.5441594",
"0.5436747",
"0.5432453",
"0.5425923",
"0.5424724",
"0.54189867",
"0.54162544",
"0.54051477",
"0.53998184",
"0.53945845",
"0.53887725",
"0.5388146",
"0.5387678",
"0.53858143",
"0.53850687",
"0.5384439"
]
| 0.0 | -1 |
/ renamed from: b | boolean mo56158b(int i, int i2); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"@Override\n\tpublic void b() {\n\n\t}",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public bb b() {\n return a(this.a);\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public void b() {\r\n }",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public abstract void b(StringBuilder sb);",
"public void b() {\n }",
"public void b() {\n }",
"protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public void b() {\n ((a) this.a).b();\n }",
"public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }",
"b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public t b() {\n return a(this.a);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }",
"private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"public abstract T zzm(B b);",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public abstract void zzc(B b, int i, int i2);",
"public interface b {\n}",
"public interface b {\n}",
"private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }",
"BSubstitution createBSubstitution();",
"public void b(ahd paramahd) {}",
"void b();",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"B database(S database);",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public abstract C0631bt mo9227aB();",
"public an b() {\n return a(this.a);\n }",
"protected abstract void a(bru parambru);",
"static void go(Base b) {\n\t\tb.add(8);\n\t}",
"void mo46242a(bmc bmc);",
"public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }",
"public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public abstract BoundType b();",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"@Override\n\tpublic void visit(PartB partB) {\n\n\t}",
"public abstract void zzb(B b, int i, long j);",
"public abstract void zza(B b, int i, zzeh zzeh);",
"int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}",
"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 int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }",
"public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }",
"public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }",
"public abstract void a(StringBuilder sb);",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public abstract void zzf(Object obj, B b);",
"public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }",
"void mo83703a(C32456b<T> bVar);",
"public void a(String str) {\n ((b.b) this.b).d(str);\n }",
"public void selectB() { }",
"BOperation createBOperation();",
"void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}",
"private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }",
"public void b(String str) {\n ((b.b) this.b).e(str);\n }",
"public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }",
"public abstract void zza(B b, int i, T t);",
"public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }",
"public abstract void zza(B b, int i, long j);",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public abstract void mo9798a(byte b);",
"public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }",
"private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.5886636",
"0.58828026",
"0.5855491",
"0.584618",
"0.5842517",
"0.5824137",
"0.5824071",
"0.58097327",
"0.5802052",
"0.58012927",
"0.579443",
"0.5792392",
"0.57902914",
"0.5785124",
"0.57718205",
"0.57589084",
"0.5735892",
"0.5735892",
"0.5734873",
"0.5727929",
"0.5720821",
"0.5712531",
"0.5706813",
"0.56896514",
"0.56543154",
"0.5651059",
"0.5649904",
"0.56496733",
"0.5647035",
"0.5640965",
"0.5640109",
"0.563993",
"0.5631903",
"0.5597427",
"0.55843794",
"0.5583287",
"0.557783",
"0.55734867",
"0.55733293",
"0.5572254",
"0.55683887",
"0.55624336",
"0.55540246",
"0.5553985",
"0.55480546",
"0.554261",
"0.5535739",
"0.5529958",
"0.5519634",
"0.5517503",
"0.55160624",
"0.5511545",
"0.5505353",
"0.5500533",
"0.5491741",
"0.5486198",
"0.5481978",
"0.547701",
"0.54725856",
"0.5471632",
"0.5463497",
"0.5460805",
"0.5454913",
"0.5454885",
"0.54519916",
"0.5441594",
"0.5436747",
"0.5432453",
"0.5425923",
"0.5424724",
"0.54189867",
"0.54162544",
"0.54051477",
"0.53998184",
"0.53945845",
"0.53887725",
"0.5388146",
"0.5387678",
"0.53858143",
"0.53850687",
"0.5384439"
]
| 0.0 | -1 |
/ renamed from: c | int[] mo56159c(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo5289a(C5102c c5102c);",
"public static void c0() {\n\t}",
"void mo57278c();",
"private static void cajas() {\n\t\t\n\t}",
"void mo5290b(C5102c c5102c);",
"void mo80457c();",
"void mo12638c();",
"void mo28717a(zzc zzc);",
"void mo21072c();",
"@Override\n\tpublic void ccc() {\n\t\t\n\t}",
"public void c() {\n }",
"void mo17012c();",
"C2451d mo3408a(C2457e c2457e);",
"void mo88524c();",
"void mo86a(C0163d c0163d);",
"void mo17021c();",
"public abstract void mo53562a(C18796a c18796a);",
"void mo4874b(C4718l c4718l);",
"void mo4873a(C4718l c4718l);",
"C12017a mo41088c();",
"public abstract void mo70702a(C30989b c30989b);",
"void mo72114c();",
"public void mo12628c() {\n }",
"C2841w mo7234g();",
"public interface C0335c {\n }",
"public void mo1403c() {\n }",
"public static void c3() {\n\t}",
"public static void c1() {\n\t}",
"void mo8712a(C9714a c9714a);",
"void mo67924c();",
"public void mo97906c() {\n }",
"public abstract void mo27385c();",
"String mo20731c();",
"public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }",
"public interface C0939c {\n }",
"void mo1582a(String str, C1329do c1329do);",
"void mo304a(C0366h c0366h);",
"void mo1493c();",
"private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}",
"java.lang.String getC3();",
"C45321i mo90380a();",
"public interface C11910c {\n}",
"void mo57277b();",
"String mo38972c();",
"static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}",
"public static void CC2_1() {\n\t}",
"static int type_of_cc(String passed){\n\t\treturn 1;\n\t}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public void mo56167c() {\n }",
"public interface C0136c {\n }",
"private void kk12() {\n\n\t}",
"abstract String mo1748c();",
"public abstract void mo70710a(String str, C24343db c24343db);",
"public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}",
"C3577c mo19678C();",
"public abstract int c();",
"public abstract int c();",
"public final void mo11687c() {\n }",
"byte mo30283c();",
"private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}",
"public static void mmcc() {\n\t}",
"java.lang.String getCit();",
"public abstract C mo29734a();",
"C15430g mo56154a();",
"void mo41086b();",
"@Override\n public void func_104112_b() {\n \n }",
"public interface C9223b {\n }",
"public abstract String mo11611b();",
"void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);",
"String getCmt();",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"interface C2578d {\n}",
"public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}",
"double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }",
"void mo72113b();",
"void mo1749a(C0288c cVar);",
"public interface C0764b {\n}",
"void mo41083a();",
"String[] mo1153c();",
"C1458cs mo7613iS();",
"public interface C0333a {\n }",
"public abstract int mo41077c();",
"public interface C8843g {\n}",
"public abstract void mo70709a(String str, C41018cm c41018cm);",
"void mo28307a(zzgd zzgd);",
"public static void mcdc() {\n\t}",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"C1435c mo1754a(C1433a c1433a, C1434b c1434b);",
"public interface C0389gj extends C0388gi {\n}",
"C5727e mo33224a();",
"C12000e mo41087c(String str);",
"public abstract String mo118046b();",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C0938b {\n }",
"void mo80455b();",
"public interface C0385a {\n }",
"public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}",
"public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}",
"public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}"
]
| [
"0.64592767",
"0.644052",
"0.6431582",
"0.6418656",
"0.64118475",
"0.6397491",
"0.6250796",
"0.62470585",
"0.6244832",
"0.6232792",
"0.618864",
"0.61662376",
"0.6152657",
"0.61496663",
"0.6138441",
"0.6137171",
"0.6131197",
"0.6103783",
"0.60983956",
"0.6077118",
"0.6061723",
"0.60513836",
"0.6049069",
"0.6030368",
"0.60263443",
"0.60089093",
"0.59970635",
"0.59756917",
"0.5956231",
"0.5949343",
"0.5937446",
"0.5911776",
"0.59034705",
"0.5901311",
"0.5883238",
"0.5871533",
"0.5865361",
"0.5851141",
"0.581793",
"0.5815705",
"0.58012",
"0.578891",
"0.57870495",
"0.5775621",
"0.57608724",
"0.5734331",
"0.5731584",
"0.5728505",
"0.57239383",
"0.57130504",
"0.57094604",
"0.570793",
"0.5697671",
"0.56975955",
"0.56911296",
"0.5684489",
"0.5684489",
"0.56768984",
"0.56749034",
"0.5659463",
"0.56589085",
"0.56573",
"0.56537443",
"0.5651912",
"0.5648272",
"0.5641736",
"0.5639226",
"0.5638583",
"0.56299245",
"0.56297386",
"0.56186295",
"0.5615729",
"0.56117755",
"0.5596015",
"0.55905765",
"0.55816257",
"0.55813104",
"0.55723965",
"0.5572061",
"0.55696625",
"0.5566985",
"0.55633485",
"0.555888",
"0.5555646",
"0.55525774",
"0.5549722",
"0.5548184",
"0.55460495",
"0.5539394",
"0.5535825",
"0.55300397",
"0.5527975",
"0.55183905",
"0.5517322",
"0.5517183",
"0.55152744",
"0.5514932",
"0.55128884",
"0.5509501",
"0.55044043",
"0.54984957"
]
| 0.0 | -1 |
/ renamed from: d | int[] mo56160d(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void d() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }",
"public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }",
"public abstract int d();",
"private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }",
"public int d()\n {\n return 1;\n }",
"public interface C19512d {\n /* renamed from: dd */\n void mo34676dd(int i, int i2);\n }",
"void mo21073d();",
"@Override\n public boolean d() {\n return false;\n }",
"int getD();",
"public void dor(){\n }",
"public int getD() {\n\t\treturn d;\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public String getD() {\n return d;\n }",
"@Override\n\tpublic void dibuja() {\n\t\t\n\t}",
"public final void mo91715d() {\n }",
"public D() {}",
"void mo17013d();",
"public int getD() {\n return d_;\n }",
"void mo83705a(C32458d<T> dVar);",
"public void d() {\n\t\tSystem.out.println(\"d method\");\n\t}",
"double d();",
"public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }",
"protected DNA(Population pop, DNA d) {\n\t\t// TODO: implement this\n\t}",
"public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }",
"public abstract C17954dh<E> mo45842a();",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}",
"public abstract void mo56925d();",
"void mo54435d();",
"public void mo21779D() {\n }",
"public void d() {\n this.f20599d.a(this.f20598c);\n this.f20598c.a(this);\n this.f20601f = new a(new d());\n d.a(this.f20596a, this.f20597b, this.f20601f);\n this.f20596a.setLayoutManager(new NPALinearLayoutManager(getContext()));\n ((s) this.f20596a.getItemAnimator()).setSupportsChangeAnimations(false);\n this.f20596a.setAdapter(this.f20601f);\n this.f20598c.a(this.f20602g);\n }",
"@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }",
"void mo28307a(zzgd zzgd);",
"List<String> d();",
"d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }",
"public int getD() {\n return d_;\n }",
"public void addDField(String d){\n\t\tdfield.add(d);\n\t}",
"public void mo3749d() {\n }",
"public a dD() {\n return new a(this.HG);\n }",
"public String amd_to_dma(java.sql.Date d)\n {\n String resp = \"\";\n if (d!=null)\n {\n String sdat = d.toString();\n String sano = sdat.substring(0,4);\n String smes = sdat.substring(5,7);\n String sdia = sdat.substring(8,10);\n resp = sdia+\"/\"+smes+\"/\"+sano;\n }\n return resp;\n }",
"public void mo130970a(double d) {\n SinkDefaults.m149818a(this, d);\n }",
"public abstract int getDx();",
"public void mo97908d() {\n }",
"public com.c.a.d.d d() {\n return this.k;\n }",
"public boolean d() {\n return false;\n }",
"private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }",
"void mo17023d();",
"String dibujar();",
"@Override\n\tpublic void setDurchmesser(int d) {\n\n\t}",
"public void mo2470d() {\n }",
"public abstract VH mo102583a(ViewGroup viewGroup, D d);",
"public abstract String mo41079d();",
"public void setD ( boolean d ) {\n\n\tthis.d = d;\n }",
"public Dx getDx() {\n/* 32 */ return this.dx;\n/* */ }",
"DoubleNode(int d) {\n\t data = d; }",
"DD createDD();",
"@java.lang.Override\n public float getD() {\n return d_;\n }",
"public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }",
"public int d()\r\n {\r\n return 20;\r\n }",
"float getD();",
"public static int m22546b(double d) {\n return 8;\n }",
"void mo12650d();",
"String mo20732d();",
"static void feladat4() {\n\t}",
"void mo130799a(double d);",
"public void mo2198g(C0317d dVar) {\n }",
"@Override\n public void d(String TAG, String msg) {\n }",
"private double convert(double d){\n\t\tDecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\",symbols); \n\t\treturn Double.valueOf(df.format(d));\n\t}",
"public void d(String str) {\n ((b.b) this.b).g(str);\n }",
"public abstract void mo42329d();",
"public abstract long mo9229aD();",
"public abstract String getDnForPerson(String inum);",
"public interface ddd {\n public String dan();\n\n}",
"@Override\n public void func_104112_b() {\n \n }",
"public Nodo (String d){\n\t\tthis.dato = d;\n\t\tthis.siguiente = null; //para que apunte el nodo creado a nulo\n\t}",
"public void mo5117a(C0371d c0371d, double d) {\n new C0369b(this, c0371d, d).start();\n }",
"public interface C27442s {\n /* renamed from: d */\n List<EffectPointModel> mo70331d();\n}",
"public final void m22595a(double d) {\n mo4383c(Double.doubleToRawLongBits(d));\n }",
"public void d() {\n this.f23522d.a(this.f23521c);\n this.f23521c.a(this);\n this.i = new a();\n this.i.a(new ae(this.f23519a));\n this.f23519a.setAdapter(this.i);\n this.f23519a.setOnItemClickListener(this);\n this.f23521c.e();\n this.h.a(hashCode(), this.f23520b);\n }",
"public Vector2d(double d) {\n\t\tthis.x = d;\n\t\tthis.y = d;\n\t}",
"DomainHelper dh();",
"private Pares(PLoc p, PLoc s, int d){\n\t\t\tprimero=p;\n\t\t\tsegundo=s;\n\t\t\tdistancia=d;\n\t\t}",
"static double DEG_to_RAD(double d) {\n return d * Math.PI / 180.0;\n }",
"@java.lang.Override\n public float getD() {\n return d_;\n }",
"public Double getDx();",
"private final VH m112826b(ViewGroup viewGroup, D d) {\n return mo102583a(viewGroup, d);\n }",
"public void m25658a(double d) {\n if (d <= 0.0d) {\n d = 1.0d;\n }\n this.f19276f = (float) (50.0d / d);\n this.f19277g = new C4658a(this, this.f19273c);\n }",
"boolean hasD();",
"public abstract void mo27386d();",
"MergedMDD() {\n }",
"@ReflectiveMethod(name = \"d\", types = {})\n public void d(){\n NMSWrapper.getInstance().exec(nmsObject);\n }",
"@Override\n public Chunk d(int i0, int i1) {\n return null;\n }",
"public void d(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 47: */ {\r\n/* 48: 68 */ BlockPosition localdt = paramdt.offset(((EnumDirection)parambec.getData(a)).opposite());\r\n/* 49: 69 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 50: 70 */ if (((localbec.getType() instanceof bdq)) && (((Boolean)localbec.getData(bdq.b)).booleanValue())) {\r\n/* 51: 71 */ paramaqu.g(localdt);\r\n/* 52: */ }\r\n/* 53: */ }",
"double defendre();",
"public static int setDimension( int d ) {\n int temp = DPoint.d;\n DPoint.d = d;\n return temp;\n }",
"public Datum(Datum d) {\n this.dan = d.dan;\n this.mesec = d.mesec;\n this.godina = d.godina;\n }",
"public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}"
]
| [
"0.638065",
"0.6162135",
"0.60721403",
"0.59957254",
"0.58775103",
"0.5871899",
"0.5825093",
"0.57583314",
"0.57016605",
"0.56614745",
"0.56515896",
"0.56363046",
"0.5624395",
"0.56153005",
"0.56115246",
"0.56115246",
"0.5605619",
"0.5600186",
"0.5589427",
"0.5571477",
"0.5559535",
"0.5541343",
"0.5534",
"0.5532148",
"0.55044186",
"0.5504279",
"0.5500738",
"0.54944867",
"0.5476091",
"0.54671377",
"0.54500264",
"0.54492646",
"0.5446609",
"0.5439864",
"0.54354095",
"0.5431075",
"0.5429007",
"0.54238176",
"0.54226834",
"0.5416983",
"0.54168093",
"0.5409512",
"0.53927475",
"0.53905463",
"0.53789866",
"0.5373463",
"0.53696936",
"0.53666687",
"0.5352946",
"0.53528136",
"0.5341164",
"0.53339404",
"0.5326453",
"0.53252333",
"0.53213936",
"0.5321132",
"0.5316005",
"0.53122705",
"0.5297829",
"0.5276323",
"0.5270703",
"0.5260068",
"0.52471673",
"0.5244647",
"0.52427423",
"0.5241966",
"0.5241403",
"0.5234233",
"0.5232479",
"0.52312213",
"0.52306885",
"0.52192634",
"0.52144676",
"0.5214394",
"0.5209537",
"0.5206114",
"0.5195249",
"0.5193851",
"0.51870924",
"0.51791155",
"0.5179002",
"0.51696295",
"0.5164201",
"0.5159372",
"0.51584184",
"0.5157153",
"0.51566947",
"0.5155955",
"0.51547897",
"0.5154662",
"0.51537615",
"0.5153206",
"0.5151757",
"0.51435614",
"0.51418424",
"0.51400906",
"0.5137587",
"0.51344764",
"0.5128405",
"0.5125488",
"0.5121291"
]
| 0.0 | -1 |
/ renamed from: e | void mo56161e(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void e() {\n\n\t}",
"public void e() {\n }",
"@Override\n\tpublic void processEvent(Event e) {\n\n\t}",
"@Override\n public void e(String TAG, String msg) {\n }",
"public String toString()\r\n {\r\n return e.toString();\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public Object element() { return e; }",
"@Override\n public void e(int i0, int i1) {\n\n }",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"private static Throwable handle(final Throwable e) {\r\n\t\te.printStackTrace();\r\n\r\n\t\tif (e.getCause() != null) {\r\n\t\t\te.getCause().printStackTrace();\r\n\t\t}\r\n\t\tif (e instanceof SAXException) {\r\n\t\t\t((SAXException) e).getException().printStackTrace();\r\n\t\t}\r\n\t\treturn e;\r\n\t}",
"void event(Event e) throws Exception;",
"Event getE();",
"public int getE() {\n return e_;\n }",
"@Override\n\tpublic void onException(Exception e) {\n\n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(2));\r\n\t\t\t}",
"public byte e()\r\n/* 84: */ {\r\n/* 85:86 */ return this.e;\r\n/* 86: */ }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(1));\r\n\t\t\t}",
"public void toss(Exception e);",
"private void log(IndexObjectException e) {\n\t\t\r\n\t}",
"public int getE() {\n return e_;\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private String getStacktraceFromException(Exception e) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(baos);\n\t\te.printStackTrace(ps);\n\t\tps.close();\n\t\treturn baos.toString();\n\t}",
"protected void processEdge(Edge e) {\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"E \" + super.toString();\n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, et.get(0));\r\n\t\t\t}",
"public Element getElement() {\n/* 78 */ return this.e;\n/* */ }",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }",
"void mo57276a(Exception exc);",
"@Override\r\n\tpublic void onEvent(Object e) {\n\t}",
"public Throwable getOriginalException()\n/* 28: */ {\n/* 29:56 */ return this.originalE;\n/* 30: */ }",
"@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}",
"private void sendOldError(Exception e) {\n }",
"private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n protected void processMouseEvent(MouseEvent e) {\n super.processMouseEvent(e);\n }",
"private void printInfo(SAXParseException e) {\n\t}",
"@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}",
"String exceptionToStackTrace( Exception e ) {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter);\n e.printStackTrace( printWriter );\n return stringWriter.toString();\n }",
"public <E> E getE(E e){\n return e;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@PortedFrom(file = \"tSignatureUpdater.h\", name = \"vE\")\n private void vE(NamedEntity e) {\n sig.add(e);\n }",
"@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}",
"void showResultMoError(String e);",
"public int E() {\n \treturn E;\n }",
"@Override\r\n public void processEvent(IAEvent e) {\n\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"static public String getStackTrace(Exception e) {\n java.io.StringWriter s = new java.io.StringWriter(); \n e.printStackTrace(new java.io.PrintWriter(s));\n String trace = s.toString();\n \n if(trace==null || trace.length()==0 || trace.equals(\"null\"))\n return e.toString();\n else\n return trace;\n }",
"@Override\n public String toString() {\n return \"[E]\" + super.toString() + \"(at: \" + details + \")\";\n }",
"public static void error(boolean e) {\n E = e;\n }",
"public void out_ep(Edge e) {\r\n\r\n\t\tif (triangulate == 0 & plot == 1) {\r\n\t\t\tclip_line(e);\r\n\t\t}\r\n\r\n\t\tif (triangulate == 0 & plot == 0) {\r\n\t\t\tSystem.err.printf(\"e %d\", e.edgenbr);\r\n\t\t\tSystem.err.printf(\" %d \", e.ep[le] != null ? e.ep[le].sitenbr : -1);\r\n\t\t\tSystem.err.printf(\"%d\\n\", e.ep[re] != null ? e.ep[re].sitenbr : -1);\r\n\t\t}\r\n\r\n\t}",
"public void m58944a(E e) {\n this.f48622a = e;\n }",
"void mo43357a(C16726e eVar) throws RemoteException;",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"@Override\n\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t}",
"static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }",
"public RuntimeException processException(RuntimeException e)\n\n {\n\treturn new RuntimeException(e);\n }",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t}",
"@java.lang.Override\n public java.lang.String getE() {\n java.lang.Object ref = e_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n e_ = s;\n return s;\n }\n }",
"protected void onEvent(DivRepEvent e) {\n\t\t}",
"protected void onEvent(DivRepEvent e) {\n\t\t}",
"protected void logException(Exception e) {\r\n if (log.isErrorEnabled()) {\r\n log.logError(LogCodes.WPH2004E, e, e.getClass().getName() + \" processing field \");\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}",
"com.walgreens.rxit.ch.cda.EIVLEvent getEvent();",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"public e o() {\r\n return k();\r\n }",
"@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\n\t\t\t}"
]
| [
"0.72328156",
"0.66032064",
"0.6412127",
"0.6362734",
"0.633999",
"0.62543726",
"0.6232265",
"0.6159535",
"0.61226326",
"0.61226326",
"0.60798717",
"0.6049423",
"0.60396963",
"0.60011584",
"0.5998842",
"0.59709895",
"0.59551716",
"0.5937381",
"0.58854383",
"0.5870234",
"0.5863486",
"0.58606255",
"0.58570576",
"0.5832809",
"0.57954526",
"0.5784194",
"0.57723534",
"0.576802",
"0.57466",
"0.57258075",
"0.5722709",
"0.5722404",
"0.57134414",
"0.56987166",
"0.5683048",
"0.5671214",
"0.5650087",
"0.56173986",
"0.56142104",
"0.56100404",
"0.5604611",
"0.55978096",
"0.5597681",
"0.55941516",
"0.55941516",
"0.55941516",
"0.5578516",
"0.55689955",
"0.5568649",
"0.5564652",
"0.5561944",
"0.5561737",
"0.5560318",
"0.555748",
"0.5550611",
"0.5550611",
"0.5550611",
"0.5550611",
"0.5547971",
"0.55252135",
"0.5523029",
"0.55208814",
"0.5516037",
"0.5512",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118424",
"0.55118227",
"0.5509796",
"0.5509671",
"0.5503605",
"0.55015326",
"0.5499632",
"0.54921895",
"0.54892236",
"0.5483562",
"0.5483562",
"0.5482999",
"0.54812574",
"0.5479943",
"0.54787004",
"0.54778624",
"0.5472073",
"0.54695076",
"0.54695076",
"0.54695076",
"0.54695076",
"0.54695076",
"0.54695076",
"0.54695076",
"0.54695076",
"0.5468417",
"0.54673034",
"0.54645115"
]
| 0.0 | -1 |
/ renamed from: f | ReactionWindowInfo mo56162f(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void func_70305_f() {}",
"public static Forca get_f(){\n\t\treturn f;\n\t}",
"void mo84656a(float f);",
"public final void mo8765a(float f) {\n }",
"@Override\n public int f() {\n return 0;\n }",
"public void f() {\n }",
"void mo9704b(float f, float f2, int i);",
"void mo56155a(float f);",
"public void f() {\n }",
"void mo9696a(float f, float f2, int i);",
"@Override\n\tpublic void f2() {\n\t\t\n\t}",
"public void f() {\n Message q_ = q_();\n e.c().a(new f(255, a(q_.toByteArray())), getClass().getSimpleName(), i().a(), q_);\n }",
"void mo72112a(float f);",
"void mo9694a(float f, float f2);",
"void f1() {\r\n\t}",
"public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }",
"double cFromF(double f) {\n return (f-32) * 5 / 9;\n }",
"void mo34547J(float f, float f2);",
"@Override\n\tpublic void f1() {\n\n\t}",
"public void f() {\n this.f25459e.J();\n }",
"public abstract void mo70718c(String str, float f);",
"public byte f()\r\n/* 89: */ {\r\n/* 90:90 */ return this.f;\r\n/* 91: */ }",
"C3579d mo19694a(C3581f fVar) throws IOException;",
"public abstract void mo70714b(String str, float f);",
"void mo9705c(float f, float f2);",
"FunctionCall getFc();",
"@Override\n\tpublic void af(String t) {\n\n\t}",
"void mo9695a(float f, float f2, float f3, float f4, float f5);",
"public abstract void mo70705a(String str, float f);",
"void mo21075f();",
"static double transform(int f) {\n return (5.0 / 9.0 * (f - 32));\n\n }",
"private int m216e(float f) {\n int i = (int) (f + 0.5f);\n return i % 2 == 1 ? i - 1 : i;\n }",
"void mo9703b(float f, float f2);",
"public abstract int mo123247f();",
"void mo6072a(float f) {\n this.f2347q = this.f2342e.mo6054a(f);\n }",
"public float mo12718a(float f) {\n return f;\n }",
"public abstract void mo70706a(String str, float f, float f2);",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }",
"public int getF() {\n\t\treturn f;\n\t}",
"public void f()\r\n {\r\n float var1 = 0.5F;\r\n float var2 = 0.125F;\r\n float var3 = 0.5F;\r\n this.a(0.5F - var1, 0.5F - var2, 0.5F - var3, 0.5F + var1, 0.5F + var2, 0.5F + var3);\r\n }",
"void mo9698a(String str, float f);",
"private static float m82748a(float f) {\n if (f == 0.0f) {\n return 1.0f;\n }\n return 0.0f;\n }",
"static void feladat4() {\n\t}",
"public int getf(){\r\n return f;\r\n}",
"private static double FToC(double f) {\n\t\treturn (f-32)*5/9;\n\t}",
"public void a(Float f) {\n ((b.b) this.b).a(f);\n }",
"public Flt(float f) {this.f = new Float(f);}",
"static double f(double x){\n \treturn Math.sin(x);\r\n }",
"private float m23258a(float f, float f2, float f3) {\n return f + ((f2 - f) * f3);\n }",
"public double getF();",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"final void mo6072a(float f) {\n this.f2349i = this.f2348h.mo6057b(f);\n }",
"private float m87322b(float f) {\n return (float) Math.sin((double) ((float) (((double) (f - 0.5f)) * 0.4712389167638204d)));\n }",
"public void colores(int f) {\n this.f = f;\n }",
"static float m51586b(float f, float f2, float f3) {\n return ((f2 - f) * f3) + f;\n }",
"void mo3193f();",
"public void mo3777a(float f) {\n this.f1443S = f;\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"static void feladat9() {\n\t}",
"private double f2c(double f)\n {\n return (f-32)*5/9;\n }",
"public void e(Float f) {\n ((b.b) this.b).e(f);\n }",
"int mo9691a(String str, String str2, float f);",
"void mo196b(float f) throws RemoteException;",
"public void d(Float f) {\n ((b.b) this.b).d(f);\n }",
"static void feladat7() {\n\t}",
"public void b(Float f) {\n ((b.b) this.b).b(f);\n }",
"long mo54439f(int i);",
"public void c(Float f) {\n ((b.b) this.b).c(f);\n }",
"@java.lang.Override\n public java.lang.String getF() {\n java.lang.Object ref = f_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n f_ = s;\n return s;\n }\n }",
"public static void detectComponents(String f) {\n\t\t\n\t}",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"public void f() {\n if (this instanceof b) {\n b bVar = (b) this;\n Message q_ = bVar.q_();\n e.c().a(new f(bVar.b(), q_.toByteArray()), getClass().getSimpleName(), i().a(), q_);\n return;\n }\n f a2 = a();\n if (a2 != null) {\n e.c().a(a2, getClass().getSimpleName(), i().a(), (Message) null);\n }\n }",
"void mo54440f();",
"public int F()\r\n/* 24: */ {\r\n/* 25: 39 */ return aqt.a(0.5D, 1.0D);\r\n/* 26: */ }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public abstract int mo9741f();",
"void testMethod() {\n f();\n }",
"public static int m22547b(float f) {\n return 4;\n }",
"public float mo12728b(float f) {\n return f;\n }",
"public void mo1963f() throws cf {\r\n }",
"public abstract File mo41087j();",
"@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}",
"public abstract int f(int i2);",
"static void feladat6() {\n\t}",
"public void furyo ()\t{\n }",
"long mo30295f();",
"public void a(zf zfVar, Canvas canvas, float f, float f2) {\n }",
"public T fjern();",
"public static void feec() {\n\t}",
"@Override\n\tdouble f(double x) {\n\t\treturn x;\n\t}",
"static void feladat3() {\n\t}",
"static void feladat8() {\n\t}",
"public void mo3797c(float f) {\n this.f1455ad[0] = f;\n }",
"public abstract double fct(double x);",
"public interface b {\n boolean f(@NonNull File file);\n }",
"public void setF(){\n\t\tf=calculateF();\n\t}",
"public FI_() {\n }",
"static void feladat5() {\n\t}",
"private final void m57544f(int i) {\n this.f47568d.m63092a(new C15335a(i, true));\n }",
"public abstract long f();"
]
| [
"0.7323683",
"0.65213245",
"0.649907",
"0.64541733",
"0.6415534",
"0.63602704",
"0.6325114",
"0.63194084",
"0.630473",
"0.62578535",
"0.62211406",
"0.6209556",
"0.6173324",
"0.61725706",
"0.61682224",
"0.6135272",
"0.6130462",
"0.6092916",
"0.6089471",
"0.6073019",
"0.6069227",
"0.6045645",
"0.60285485",
"0.6017334",
"0.60073197",
"0.59810024",
"0.59757596",
"0.5967885",
"0.5942414",
"0.59418225",
"0.5939683",
"0.59241796",
"0.58987755",
"0.5894165",
"0.58801377",
"0.5879881",
"0.5830818",
"0.57981277",
"0.5790314",
"0.578613",
"0.5775656",
"0.5772591",
"0.57630384",
"0.5752546",
"0.5752283",
"0.5735288",
"0.5733957",
"0.57191586",
"0.57179475",
"0.57131994",
"0.57131445",
"0.5706053",
"0.5689441",
"0.56773764",
"0.5667179",
"0.56332076",
"0.5623908",
"0.56229013",
"0.5620846",
"0.5620233",
"0.5616687",
"0.5610022",
"0.5601161",
"0.55959773",
"0.5594083",
"0.55762523",
"0.5570697",
"0.5569185",
"0.5552703",
"0.55498457",
"0.5549487",
"0.5540512",
"0.55403346",
"0.5538902",
"0.5538738",
"0.55373883",
"0.55234814",
"0.55215186",
"0.551298",
"0.5508332",
"0.5507449",
"0.55046654",
"0.550407",
"0.55029416",
"0.5494386",
"0.5493873",
"0.54900146",
"0.5487203",
"0.54866016",
"0.54843825",
"0.5478175",
"0.547722",
"0.54764897",
"0.5472811",
"0.54662675",
"0.5460087",
"0.5458977",
"0.54567033",
"0.54565614",
"0.5454854",
"0.5442333"
]
| 0.0 | -1 |
/ renamed from: g | void mo56163g(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void g() {\n }",
"public void gored() {\n\t\t\n\t}",
"public boolean g()\r\n/* 94: */ {\r\n/* 95:94 */ return this.g;\r\n/* 96: */ }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"public void stg() {\n\n\t}",
"public xm n()\r\n/* 274: */ {\r\n/* 275:287 */ if ((this.g == null) && (this.h != null) && (this.h.length() > 0)) {\r\n/* 276:288 */ this.g = this.o.a(this.h);\r\n/* 277: */ }\r\n/* 278:290 */ return this.g;\r\n/* 279: */ }",
"int getG();",
"private final zzgy zzgb() {\n }",
"public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }",
"private static void g() {\n h h10 = q;\n synchronized (h10) {\n h10.f();\n Object object = h10.e();\n object = object.iterator();\n boolean bl2;\n while (bl2 = object.hasNext()) {\n Object object2 = object.next();\n object2 = (g)object2;\n Object object3 = ((g)object2).getName();\n object3 = i.h.d.j((String)object3);\n ((g)object2).h((i.h.c)object3);\n }\n return;\n }\n }",
"public int g()\r\n {\r\n return 1;\r\n }",
"void mo28307a(zzgd zzgd);",
"void mo21076g();",
"void mo98971a(C29296g gVar, int i);",
"public int getG();",
"void mo98970a(C29296g gVar);",
"public abstract long g();",
"public com.amap.api.col.n3.al g(java.lang.String r6) {\n /*\n r5 = this;\n r0 = 0\n if (r6 == 0) goto L_0x003a\n int r1 = r6.length()\n if (r1 > 0) goto L_0x000a\n goto L_0x003a\n L_0x000a:\n java.util.List<com.amap.api.col.n3.al> r1 = r5.c\n monitor-enter(r1)\n java.util.List<com.amap.api.col.n3.al> r2 = r5.c // Catch:{ all -> 0x0037 }\n java.util.Iterator r2 = r2.iterator() // Catch:{ all -> 0x0037 }\n L_0x0013:\n boolean r3 = r2.hasNext() // Catch:{ all -> 0x0037 }\n if (r3 == 0) goto L_0x0035\n java.lang.Object r3 = r2.next() // Catch:{ all -> 0x0037 }\n com.amap.api.col.n3.al r3 = (com.amap.api.col.n3.al) r3 // Catch:{ all -> 0x0037 }\n java.lang.String r4 = r3.getCity() // Catch:{ all -> 0x0037 }\n boolean r4 = r6.equals(r4) // Catch:{ all -> 0x0037 }\n if (r4 != 0) goto L_0x0033\n java.lang.String r4 = r3.getPinyin() // Catch:{ all -> 0x0037 }\n boolean r4 = r6.equals(r4) // Catch:{ all -> 0x0037 }\n if (r4 == 0) goto L_0x0013\n L_0x0033:\n monitor-exit(r1) // Catch:{ all -> 0x0037 }\n return r3\n L_0x0035:\n monitor-exit(r1)\n return r0\n L_0x0037:\n r6 = move-exception\n monitor-exit(r1)\n throw r6\n L_0x003a:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.am.g(java.lang.String):com.amap.api.col.n3.al\");\n }",
"public int getG() {\r\n\t\treturn g;\r\n\t}",
"private Gng() {\n }",
"void mo57277b();",
"int mo98967b(C29296g gVar);",
"public void mo21782G() {\n }",
"public final void mo74763d(C29296g gVar) {\n }",
"private final java.lang.String m14284g() {\n /*\n r3 = this;\n b.h.b.a.b.b.ah r0 = r3.f8347b\n b.h.b.a.b.b.m r0 = r0.mo7065b()\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5339d\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x0056\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e\n if (r1 == 0) goto L_0x0056\n b.h.b.a.b.j.a.a.e r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e) r0\n b.h.b.a.b.e.a$c r0 = r0.mo9643H()\n b.h.b.a.b.g.i$c r0 = (p073b.p085h.p087b.p088a.p090b.p117g.C2383i.C2387c) r0\n b.h.b.a.b.g.i$f<b.h.b.a.b.e.a$c, java.lang.Integer> r1 = p073b.p085h.p087b.p088a.p090b.p112e.p114b.C2330b.f7137i\n java.lang.String r2 = \"JvmProtoBuf.classModuleName\"\n p073b.p079e.p081b.C1489j.m6969a(r1, r2)\n java.lang.Object r0 = p073b.p085h.p087b.p088a.p090b.p112e.p113a.C2288f.m11197a(r0, r1)\n java.lang.Integer r0 = (java.lang.Integer) r0\n if (r0 == 0) goto L_0x003e\n b.h.b.a.b.e.a.c r1 = r3.f8350e\n java.lang.Number r0 = (java.lang.Number) r0\n int r0 = r0.intValue()\n java.lang.String r0 = r1.mo8811a(r0)\n if (r0 == 0) goto L_0x003e\n goto L_0x0040\n L_0x003e:\n java.lang.String r0 = \"main\"\n L_0x0040:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n java.lang.String r0 = p073b.p085h.p087b.p088a.p090b.p116f.C2361g.m11709a(r0)\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0056:\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5336a\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x00a0\n boolean r0 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p094b.C1680ab\n if (r0 == 0) goto L_0x00a0\n b.h.b.a.b.b.ah r0 = r3.f8347b\n if (r0 == 0) goto L_0x0098\n b.h.b.a.b.j.a.a.j r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2638j) r0\n b.h.b.a.b.j.a.a.f r0 = r0.mo9635N()\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i\n if (r1 == 0) goto L_0x00a0\n b.h.b.a.b.d.b.i r0 = (p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i) r0\n b.h.b.a.b.i.d.b r1 = r0.mo8045e()\n if (r1 == 0) goto L_0x00a0\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n b.h.b.a.b.f.f r0 = r0.mo8042b()\n java.lang.String r0 = r0.mo9039a()\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0098:\n b.u r0 = new b.u\n java.lang.String r1 = \"null cannot be cast to non-null type org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPropertyDescriptor\"\n r0.<init>(r1)\n throw r0\n L_0x00a0:\n java.lang.String r0 = \"\"\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p073b.p085h.p087b.p088a.C3008g.C3011c.m14284g():java.lang.String\");\n }",
"void mo16687a(T t, C4621gg ggVar) throws IOException;",
"public final void mo74759a(C29296g gVar) {\n }",
"int mo98966a(C29296g gVar);",
"void mo57278c();",
"public double getG();",
"public boolean h()\r\n/* 189: */ {\r\n/* 190:187 */ return this.g;\r\n/* 191: */ }",
"private void kk12() {\n\n\t}",
"gp(go goVar, String str) {\n super(str);\n this.f82115a = goVar;\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"C2841w mo7234g();",
"public abstract long g(int i2);",
"public final h.c.b<java.lang.Object> g() {\n /*\n r2 = this;\n h.c.b<java.lang.Object> r0 = r2.f15786a\n if (r0 == 0) goto L_0x0005\n goto L_0x001d\n L_0x0005:\n h.c.e r0 = r2.b()\n h.c.c$b r1 = h.c.c.f14536c\n h.c.e$b r0 = r0.get(r1)\n h.c.c r0 = (h.c.c) r0\n if (r0 == 0) goto L_0x001a\n h.c.b r0 = r0.c(r2)\n if (r0 == 0) goto L_0x001a\n goto L_0x001b\n L_0x001a:\n r0 = r2\n L_0x001b:\n r2.f15786a = r0\n L_0x001d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.coroutines.jvm.internal.ContinuationImpl.g():h.c.b\");\n }",
"void mo41086b();",
"public abstract int mo123248g();",
"public void getK_Gelisir(){\n K_Gelistir();\r\n }",
"int mo54441g(int i);",
"private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);",
"public String getGg() {\n return gg;\n }",
"public void g() {\n this.f25459e.Q();\n }",
"void mo1761g(int i);",
"public abstract void bepaalGrootte();",
"public void referToGP(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"public final i g() {\n return new i();\n }",
"public abstract void mo42331g();",
"@Override\n public void func_104112_b() {\n \n }",
"public int g2dsg(int v) { return g2dsg[v]; }",
"void NhapGT(int thang, int nam) {\n }",
"Gruppo getGruppo();",
"public void method_4270() {}",
"public abstract String mo41079d();",
"public abstract String mo118046b();",
"public void setGg(String gg) {\n this.gg = gg;\n }",
"public abstract CharSequence mo2161g();",
"void mo119582b();",
"private void strin() {\n\n\t}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public String BFS(int g) {\n\t\t//TODO\n\t}",
"void mo21073d();",
"private stendhal() {\n\t}",
"public void golpearJugador(Jugador j) {\n\t\t\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"public static Object gvRender(Object... arg) {\r\nUNSUPPORTED(\"e2g1sf67k7u629a0lf4qtd4w8\"); // int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"1bh3yj957he6yv2dkeg4pzwdk\"); // int rc;\r\nUNSUPPORTED(\"1ag9dz4apxn0w3cz8w2bfm6se\"); // GVJ_t *job;\r\nUNSUPPORTED(\"8msotrfl0cngiua3j57ylm26b\"); // g = g->root;\r\nUNSUPPORTED(\"exts51afuertju5ed5v7pdpg7\"); // /* create a job for the required format */\r\nUNSUPPORTED(\"dn6z1r1bbrtmr58m8dnfgfnm0\"); // rc = gvjobs_output_langname(gvc, format);\r\nUNSUPPORTED(\"5apijrijm2r8b1g2l4x7iee7s\"); // job = gvc->job;\r\nUNSUPPORTED(\"5wvj0ph8uqfgg8jl3g39jsf51\"); // if (rc == 999) {\r\nUNSUPPORTED(\"4lkoedjryn54aff3fyrsewwu5\"); // agerr (AGERR, \"Format: \\\"%s\\\" not recognized. Use one of:%s\\n\",\r\nUNSUPPORTED(\"2pjgp86rkudo6mihbako5yps2\"); // format, gvplugin_list(gvc, API_device, format));\r\nUNSUPPORTED(\"f3a98gxettwtewduvje9y3524\"); // return -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ect62lxc3zm51lhzifift55m\"); // job->output_lang = gvrender_select(job, job->output_langname);\r\nUNSUPPORTED(\"ewlceg1k4gs2e6syq4ear5kzo\"); // if (!(agbindrec(g, \"Agraphinfo_t\", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) {\r\nUNSUPPORTED(\"3yo4xyapbp7osp8uyz4kff98s\"); // \tagerrorf( \"Layout was not done\\n\");\r\nUNSUPPORTED(\"8d9xfgejx5vgd6shva5wk5k06\"); // \treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"2ai20uylya195fbdqwjy9bz0n\"); // job->output_file = out;\r\nUNSUPPORTED(\"10kpqi6pvibjsxjyg0g76lix3\"); // if (out == NULL)\r\nUNSUPPORTED(\"d47ukby9krmz2k8ycmzzynnfr\"); // \tjob->flags |= (1<<27);\r\nUNSUPPORTED(\"9szsye4q9jykqvtk0bc1r91d0\"); // rc = gvRenderJobs(gvc, g);\r\nUNSUPPORTED(\"7l8ugws8ptgtlxc1ymmh3cf18\"); // gvrender_end_job(job);\r\nUNSUPPORTED(\"a9p7yonln7g91ge7xab3xf9dr\"); // gvjobs_delete(gvc);\r\nUNSUPPORTED(\"5bc9k4vsl6g7wejc5xefc5964\"); // return rc;\r\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\r\n\r\nthrow new UnsupportedOperationException();\r\n}",
"void mo41083a();",
"@VisibleForTesting\n public final long g(long j) {\n long j2 = j - this.f10062b;\n this.f10062b = j;\n return j2;\n }",
"void mo72113b();",
"@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}",
"public void b(gy ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public void a(gy ☃) {}",
"Gtr createGtr();",
"TGG createTGG();",
"public abstract String mo9239aw();",
"public void setG(boolean g) {\n\tthis.g = g;\n }",
"private static C8504ba m25889b(C2272g gVar) throws Exception {\n return m25888a(gVar);\n }",
"void mo21074e();",
"private String pcString(String g, String d) {\n return g+\"^part_of(\"+d+\")\";\n }",
"public abstract String mo13682d();",
"public void mo38117a() {\n }",
"public abstract void mo70713b();",
"public Gitlet(int a) {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}",
"public abstract T zzg(T t, T t2);",
"public int mo9232aG() {\n return 0;\n }",
"public void mo3286a(C0813g gVar) {\n this.f2574g = gVar;\n }",
"public void mo21787L() {\n }",
"@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }",
"public String DFS(int g) {\n\t\t//TODO\n\t}",
"public static Object gvRenderContext(Object... arg) {\r\nUNSUPPORTED(\"6bxfu9f9cshxn0i97berfl9bw\"); // int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context)\r\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\r\nUNSUPPORTED(\"1bh3yj957he6yv2dkeg4pzwdk\"); // int rc;\r\nUNSUPPORTED(\"1ag9dz4apxn0w3cz8w2bfm6se\"); // GVJ_t *job;\r\nUNSUPPORTED(\"8msotrfl0cngiua3j57ylm26b\"); // g = g->root;\r\nUNSUPPORTED(\"exts51afuertju5ed5v7pdpg7\"); // /* create a job for the required format */\r\nUNSUPPORTED(\"dn6z1r1bbrtmr58m8dnfgfnm0\"); // rc = gvjobs_output_langname(gvc, format);\r\nUNSUPPORTED(\"5apijrijm2r8b1g2l4x7iee7s\"); // job = gvc->job;\r\nUNSUPPORTED(\"5wvj0ph8uqfgg8jl3g39jsf51\"); // if (rc == 999) {\r\nUNSUPPORTED(\"8r1a6szpsnku0jhatqkh0qo75\"); // \t\tagerr(AGERR, \"Format: \\\"%s\\\" not recognized. Use one of:%s\\n\",\r\nUNSUPPORTED(\"2pj79j8toe6bactkaedt54xcv\"); // \t\t\t format, gvplugin_list(gvc, API_device, format));\r\nUNSUPPORTED(\"b0epxudfxjm8kichhaautm2qi\"); // \t\treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ect62lxc3zm51lhzifift55m\"); // job->output_lang = gvrender_select(job, job->output_langname);\r\nUNSUPPORTED(\"ewlceg1k4gs2e6syq4ear5kzo\"); // if (!(agbindrec(g, \"Agraphinfo_t\", 0, NOT(0)) && GD_drawing(g)) && !(job->flags & (1<<26))) {\r\nUNSUPPORTED(\"3yo4xyapbp7osp8uyz4kff98s\"); // \tagerrorf( \"Layout was not done\\n\");\r\nUNSUPPORTED(\"b0epxudfxjm8kichhaautm2qi\"); // \t\treturn -1;\r\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\r\nUNSUPPORTED(\"ex1rhur9nlj950oe8r621uxxk\"); // job->context = context;\r\nUNSUPPORTED(\"3hvm1mza6yapsb3hi7bkw03cs\"); // job->external_context = NOT(0);\r\nUNSUPPORTED(\"9szsye4q9jykqvtk0bc1r91d0\"); // rc = gvRenderJobs(gvc, g);\r\nUNSUPPORTED(\"7l8ugws8ptgtlxc1ymmh3cf18\"); // gvrender_end_job(job);\r\nUNSUPPORTED(\"dql0bth0nzsrpiu9vnffonrhf\"); // gvdevice_finalize(job);\r\nUNSUPPORTED(\"a9p7yonln7g91ge7xab3xf9dr\"); // gvjobs_delete(gvc);\r\nUNSUPPORTED(\"5bc9k4vsl6g7wejc5xefc5964\"); // return rc;\r\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\r\n\r\nthrow new UnsupportedOperationException();\r\n}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"void mo54435d();"
]
| [
"0.678414",
"0.67709124",
"0.6522526",
"0.64709187",
"0.6450875",
"0.62853396",
"0.6246107",
"0.6244691",
"0.6212993",
"0.61974055",
"0.61380696",
"0.6138033",
"0.6105423",
"0.60355175",
"0.60195917",
"0.59741",
"0.596904",
"0.59063077",
"0.58127505",
"0.58101356",
"0.57886875",
"0.5771653",
"0.57483286",
"0.57415104",
"0.5739937",
"0.5737405",
"0.5734033",
"0.5716611",
"0.5702987",
"0.5702633",
"0.568752",
"0.5673585",
"0.5656889",
"0.5654594",
"0.56383264",
"0.56383264",
"0.5633443",
"0.5619376",
"0.56107736",
"0.55950445",
"0.55687404",
"0.5560633",
"0.5544451",
"0.553233",
"0.55284953",
"0.5526995",
"0.5523609",
"0.5522537",
"0.5520261",
"0.5508765",
"0.54931",
"0.5475987",
"0.5471256",
"0.5469798",
"0.54696023",
"0.5466119",
"0.5450189",
"0.5445573",
"0.54424983",
"0.54304206",
"0.5423924",
"0.54234356",
"0.5420949",
"0.54093313",
"0.53971386",
"0.53892636",
"0.53887594",
"0.5388692",
"0.53799766",
"0.5377014",
"0.5375743",
"0.53676707",
"0.53666615",
"0.53654546",
"0.536411",
"0.536411",
"0.5361922",
"0.53584075",
"0.5357915",
"0.53526837",
"0.53503513",
"0.534265",
"0.5342214",
"0.53399533",
"0.533597",
"0.5332819",
"0.5331027",
"0.5329743",
"0.5329616",
"0.5325393",
"0.53252953",
"0.5323291",
"0.53207254",
"0.5314264",
"0.53122807",
"0.53109974",
"0.5310432",
"0.53044266",
"0.5304416",
"0.5302328"
]
| 0.6057178 | 13 |
Se recogen los valores de la entrega y se validan | public void entregarAsignacionClick(ActionEvent actionEvent) {
String comentario;
String ruta = lbl_urlEjemplo.getText();
// Si existe un comentario
if (txt_comentario.getText() != null) {
if (txt_comentario.getText().length() > 255) {
mostrarDialogoDatoNoValido("Comentario demasiado largo.", "El tamaño del comentario supera los 255 caracteres.");
return;
} else {
comentario = txt_comentario.getText();
}
} else {
comentario = "";
}
ObservableList<Node> listaCriteriosNode = vbox_criteriosEvaluacion.getChildren();
for (int i = 0; i < listaCriteriosNode.size(); i++) {
Node criterioNode = listaCriteriosNode.get(i);
int notaAuto;
try {
notaAuto = Integer.parseInt(((TextField) criterioNode.lookup("#txt_notaCriterioAuto")).getText());
} catch (NumberFormatException nfe) {
mostrarDialogoDatoNoValido("Nota criterio incorrecta.", "La nota de los criterios ha de ser un número entre 0 y 10.");
return;
}
if (notaAuto < 0 || notaAuto > 10) {
mostrarDialogoDatoNoValido("Nota criterio incorrecta.", "La nota de los criterios ha de ser un número entre 0 y 10.");
return;
}
listaCriterios.get(i).setNotaAuto(notaAuto);
}
// Primero, por cuestiones de como se calcula la nota total en el servidor, debemos insertar los criterios
contador = 0;
for (CriterioEvaluacionAlumno criterio : listaCriterios) {
AlumnoApiService.entregarCriterio(codigoAsignacion, criterio.getCriterio().getCodCriterio(), criterio.getNotaAuto()).subscribe(() -> {
if (contador < listaCriterios.size() - 1) {
contador++;
} else {
AlumnoApiService.entregarAsignacion(codigoAsignacion, ruta, comentario)
.subscribe(() -> {
callBack.setCenterAsignacion(codigoAsignacion);
});
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void validaDatos() {\n\t\t\n\t}",
"private void validarCampos() {\n }",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}",
"@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }",
"public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}",
"public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\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\r\n\tpublic void validarSaldo() {\n\t\tSystem.out.println(\"Transaccion exitosa\");\r\n\t}",
"@Override\n protected void validaCampos(ArquivoLoteVO entity) {\n\n }",
"public void actualizar() {\n\t\testado = EstadoValidacion.SIN_VALIDAR;\n\t}",
"private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"private String validarEntradas()\n { \n return Utilitarios.validarEntradas(campoNomeAC, campoEnderecoAC, campoBairroAC, campoCidadeAC, campoUfAC, campoCepAC, campoTelefoneAC, campoEmailAC);\n }",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"private boolean validarDatos() {\r\n\t\tboolean _esValido = true;\r\n\r\n\t\tif (txField_lugar.getText() == null || txField_lugar.getText().isEmpty())\r\n\t\t\t_esValido = false;\r\n\t\treturn _esValido;\r\n\t}",
"private void validarhorarioconotroshorariosactivos(HorarioAsignado horarioasignado, List<HorarioAsignado> horarios) throws LogicaException, ParseException, DatoException {\nGregorianCalendar startasignado=new GregorianCalendar();\nDate startdateasignado= new Date(horarioasignado.getValidezinicio().getTime());\nstartasignado.setTime(startdateasignado);\nGregorianCalendar endasignado=new GregorianCalendar();\nDate enddateasignado= new Date(horarioasignado.getValidezfin().getTime());\nendasignado.setTime(enddateasignado);\n\nint tempfrecasignado = horarioasignado.getHorario().getIdfrecuenciaasignacion().intValue();\nList<Integer> diadelasemanaasignado = diadelasemana(tempfrecasignado);\nList<HashMap<String, Object>> dataasignado = Util.diferenciaEnDiasconFrecuencia(startasignado, endasignado,diadelasemanaasignado,tempfrecasignado);\n\n\n\n\nfor(HorarioAsignado ho:horarios){\n\t\t\tif(ho.getIdhorarioasignado().equals(horarioasignado.getIdhorarioasignado())){\n\t\t\t\n\t\t\t}else{\n\t\t\tif(ho.getIdhorario()==horarioasignado.getIdhorario()){\n\t\t\t\n\t\t\t/*//cedulasconhorarios.add(em);\n\t\t\tif (horarioasignado.getValidezinicio().after(ho.getValidezinicio()) && horarioasignado.getValidezinicio().before(ho.getValidezfin())){\n\t\t\tthrow new LogicaException(\"este contrato ya tiene asociado ese horario\"\n\t\t\t+ \" entre las fechas \"+ho.getValidezinicio()+\" y \"+ ho.getValidezfin());\n\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t}\n\n\t\tContrato contrato = contratoEJB.getContratosporId(ho.getIdcontrato());\n\t\tEmpleadoBean empleado = empleadoEJB.buscarEmpleadosporId(contrato.getIdempleado());\t\n\tGregorianCalendar start=new GregorianCalendar();\n\tDate startdate= new Date(ho.getValidezinicio().getTime());\n\tstart.setTime(startdate);\n\tGregorianCalendar end=new GregorianCalendar();\n\tDate enddate= new Date(ho.getValidezfin().getTime());\n\tend.setTime(enddate);\n\t\n\tint tempfrec = ho.getHorario().getIdfrecuenciaasignacion().intValue();\n\tList<Integer> diadelasemana = diadelasemana(tempfrec);\n\tList<HashMap<String, Object>> data = Util.diferenciaEnDiasconFrecuencia(start, end,diadelasemana,tempfrec);\n\t\n\t\t\t\t\tfor(HashMap<String, Object> diadehorario:data){\n\t\t\t\tHashMap<String, Object> horariofechas=new HashMap<String, Object>();\n\t\t\t\tGregorianCalendar fecha = (GregorianCalendar)diadehorario.get(\"fecha\");\n\t\t\t\tDate fechadat =fecha.getTime();\n\t\t\t\tGregorianCalendar fechafin = (GregorianCalendar)diadehorario.get(\"fechafin\");\n\t\t\t\tDate fechafindat = fechafin.getTime();\n\t\t\t\tfor(HashMap<String, Object> diaasignado:dataasignado){\n\t\t\t\t\t\tHashMap<String, Object> horariofechasasignadas=new HashMap<String, Object>();\n\t\t\t\t\t\tGregorianCalendar fechaasignada = (GregorianCalendar)diaasignado.get(\"fecha\");\n\t\t\t\t\t\tDate fechaasignadadat =fechaasignada.getTime();\n\t\t\t\t\t\tGregorianCalendar fechafinasignada = (GregorianCalendar)diaasignado.get(\"fechafin\");\n\t\t\t\t\t\tDate fechafinasignadadat = fechafinasignada.getTime();\n\t\t\t\t\t\t\t\t\tif(fechaasignada.after(fechafin)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fechaasignada.getTime().after(fecha.getTime())||fechaasignada.getTime().equals(fecha.getTime())) && fechaasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\tif((fechaasignada.getTime().after(fecha.getTime()) && fechaasignada.getTime().before(fechafin.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\") +\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\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\tif((fechafinasignada.getTime().after(fecha.getTime())||fechafinasignada.getTime().equals(fecha.getTime())) && fechafinasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\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\t\n\t\t\t\t\t\t\t\t\t\t\tif((fecha.getTime().after(fechaasignada.getTime() ) && fecha.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\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\tif((fechafin.getTime().after(fechaasignada.getTime() ) && fechafin.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\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\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\n}\n\n\n}\n\n\n/////////////////////////fin validacion/\n}",
"private boolean validarDatos() {\n boolean result = true; // variable para saber si los datos son validos para su envio a la DAL de Rol y despues a la base de datos \n // verificar si la caja de texto txtNombre esta vacia \n if (this.txtNombre.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtApellido.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtDui.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtNumero.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (result == false) {\n // mostrar un mensaje al usuario de la pantalla que los campos son obligatorios en el caso que la variable result sea false\n JOptionPane.showMessageDialog(this, \"Los campos con * son obligatorios\");\n }\n return result; // retorna la variable result con el valor true o false para saber si los datos son validos o no\n }",
"public boolean validarCampos() {\n\t\tboolean valid = true;\n\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getNome())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataCadastro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getSexo())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getRG())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isObjectNotNull(this.getPaciente().getRG()) && this.getPaciente().getRG() < 0) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG015\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isCPFValido(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG006\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isCPFValido(this.getPaciente().getCPF()) && isPacienteCadastrado(this.getPaciente())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG017\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getEndereco())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getBairro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getCidade())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getUF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataNascimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isTelefoneValido(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\treturn valid;\n\t}",
"private void validarDadosUsuarios(View v) {\n String nome = edtName1.getText().toString();\n edtName1.setError(\"Digite o nome do produto\");\n String descricao = descricaoProduto.getText().toString();\n descricaoProduto.setError(\"Descriçao produto\");\n String preco = precoProduto.getText().toString();\n precoProduto.setError(\"Digite Preço\");\n String data = DataOferta.getText().toString();\n DataOferta.setError(\"Digite a data da Oferta\");\n ImageView imagePerfil = null;\n\n\n if (!nome.isEmpty()) {\n if (!descricao.isEmpty()) {\n if (!preco.isEmpty()) {\n if (!data.isEmpty()) {\n\n\n Anuncio anuncio = new Anuncio();\n\n anuncio.setNome(nome);\n\n anuncio.setDescricao(descricao);\n anuncio.setPreco(preco);\n anuncio.setDate(data);\n anuncio.setUrlImage(urlImagemSelecionada);\n anuncio.salvar();\n finish();\n\n\n } else {\n\n exibirMensagem(\"Digite o nome do produto \");\n }\n } else {\n exibirMensagem(\"Descriçao produto \");\n }\n } else {\n exibirMensagem(\"Digite Preço\");\n }\n } else {\n exibirMensagem(\"Digite a data da Oferta \");\n }\n\n finish();\n }",
"private boolean validarFormulario() {\n boolean cumple=true;\n boolean mosntrarMensajeGeneral=true;\n if(!ValidacionUtil.tieneTexto(txtNombreMedicamento)){\n cumple=false;\n };\n if(!ValidacionUtil.tieneTexto(txtCantidad)){\n cumple=false;\n };\n if(cmbTipoMedicamento.getSelectedItem()==null|| cmbTipoMedicamento.getSelectedItem().equals(\"Seleccione\")){\n setSpinnerError(cmbTipoMedicamento,\"Campo Obligatorio\");\n cumple=false;\n\n }\n if(getSucursalesSeleccionadas().isEmpty()){\n\n cumple=false;\n mosntrarMensajeGeneral=false;\n Utilitario.mostrarMensaje(getApplicationContext(),\"Seleccione una sucursal para continuar.\");\n }\n if(!cumple){\n if(mosntrarMensajeGeneral) {\n Utilitario.mostrarMensaje(getApplicationContext(), \"Error, ingrese todos los campos obligatorios.\");\n }\n }\n return cumple;\n }",
"private void validateData() {\n }",
"private void validateAndSave() {\n try {\n binder.writeBean(user);\n fireEvent(new SaveEvent(this, user));\n } catch (ValidationException e) {\n e.printStackTrace();\n }catch (DataIntegrityViolationException e){\n e.printStackTrace();\n Notification.show(\" Användarnamn används redan, försök med en ny.\",\n 2000, Notification.Position.MIDDLE ).addThemeVariants(NotificationVariant.LUMO_ERROR);\n }\n }",
"public boolean validarCampos() {\n\t\tboolean valid = true;\n\t\t\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getData())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioInicioAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioFimAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\tif(valid) {\n\t\t\tif(this.getAgendaMedicoDAO().verificaAgendamentoHorario(this.getMedicoSessao(), this.getAgendaMedico())) {\n\t\t\t\tthis.tratarMensagemErro(null, \"MSG014\");\n\t\t\t\tvalid = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn valid;\n\t}",
"private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}",
"private boolean validarCampos() {\n\t\t// TODO Auto-generated method stub\n\t\tif (txtCedula.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un numero de cedula\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtNombre.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un nombre\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtApellidos.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese los apellidos\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtCorreo.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el correo\");\n\t\t\treturn false;\n\t\t}\n\t\tif (!Utilidades.validarEmailFuerte(txtCorreo.getText().trim())) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un correo valido\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtDireccion.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese la direccion\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtTelefono.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el numero de telefono\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtUsuario.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el nombre de usuario\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtContrasenia.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese una contraseña\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}",
"private boolean validarEntradaDeDados() {\n\t\tString errorMessage = \"\";\n\n\t\tif (textFieldProdutoNome.getText() == null || textFieldProdutoNome.getText().length() == 0) {\n\t\t\terrorMessage += \"Nome invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoPreco.getText() == null || textFieldProdutoPreco.getText().length() == 0) {\n\t\t\terrorMessage += \"Preço invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoQuantidade.getText() == null || textFieldProdutoQuantidade.getText().length() == 0) {\n\t\t\terrorMessage += \"Quantidade invalido!\\n\";\n\t\t}\n\t\tif (comboBoxProdutoCategoria.getSelectionModel().getSelectedItem() == null) {\n\t\t\terrorMessage += \"Categoria invalido!\\n\";\n\t\t}\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t/** Mostrar a mensagem de erro. */\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Erro no registo\");\n\t\t\talert.setHeaderText(\"Campos invalidos, corrija...\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.show();\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean validarCampos(){\n String nome = campoNome.getText().toString();\n String descricao = campoDescricao.getText().toString();\n String valor = String.valueOf(campoValor.getRawValue());\n\n\n if(!nome.isEmpty()){\n if(!descricao.isEmpty()){\n if(!valor.isEmpty() && !valor.equals(\"0\")){\n return true;\n }else{\n exibirToast(\"Preencha o valor do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha a descrição do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha o nome do seu serviço\");\n return false;\n }\n }",
"public void validar(View v) {\r\n //Compruebo que se hayan insertado todos los datos\r\n SimpleDateFormat formatoFecha = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n if(!nombre.getText().toString().equals(\"\")\r\n &&!mail.getText().toString().equals(\"\")\r\n &&!fecha.getText().toString().equals(\"\")) {\r\n //Si se han introducido todos los datos compruebo la edad\r\n fNac = null;\r\n fActual = null;\r\n\r\n try {\r\n fNac = formatoFecha.parse(fecha.getText().toString());\r\n fActual = new Date();\r\n edad = (int) ((fActual.getTime() - fNac.getTime()) / 1000 / 60 / 60 / 24 / 360);//Calculo la edad\r\n //Compruebo si es mayor de edad\r\n if (edad < 18)\r\n //Error si es menor de edad\r\n Toast.makeText(getApplicationContext(), R.string.menorDeEdad, Toast.LENGTH_LONG).show();\r\n else {//Si todo es correcto devuelve los datos introcucidos a la pantalla principal.\r\n Toast.makeText(getApplicationContext(), R.string.registroCompletado, Toast.LENGTH_LONG).show();\r\n Intent i = new Intent();\r\n i.putExtra(\"REGISTRADO\", true);\r\n i.putExtra(\"NOMBRE\", nombre.getText().toString());\r\n i.putExtra(\"MAIL\", mail.getText().toString());\r\n i.putExtra(\"FECHA\", fecha.getText().toString());\r\n setResult(RESULT_OK,i);\r\n finish();\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"Error\", Toast.LENGTH_LONG).show();//Si no se ha introducido ninguna fecha\r\n }\r\n }else\r\n Toast.makeText(getApplicationContext(), R.string.toastFaltanDatos, Toast.LENGTH_LONG).show();\r\n }",
"private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }",
"public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }",
"void validateActivoUpdate(Activo activo);",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private boolean validacionesSolicitarReserva(int indice, int CodEmp, int CodLoc, int CodCot, boolean isSol){\n boolean blnRes=true;\n try{\n if(!validaItemsServicio(CodEmp, CodLoc, CodCot)){\n blnRes=false;\n MensajeInf(\"La cotizacion contiene Items de Servicio o Transporte, los cuales no deben ser reservados.\");\n }\n\n if(!validaFechasMAX(indice, tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString(),isSol)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada es mayor a la permitida, revise la Fecha y vuelva a intentarlo\");\n }\n \n if(!validaTerminalesLSSegunEmpresaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar reserva de codigos L/S en este local, debe reservarlo por el local que puede ser facturado\");\n }\n \n if(!validaFechasPrimerDiaLaboral(indice,isSol,CodEmp,CodLoc)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada, no corresponde al primer dia laboral registrado\");\n } \n \n if(tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString().equals(\"R\")){\n if(!validaTerminalesLReservaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar Reserva en Empresa de Codigos L \");\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }",
"@Override\n\tpublic void procesar() throws WrongValuesException, ExcEntradaInconsistente {\n\n\t}",
"public void validate() {\n\t\tthis.invalidated = false;\n\t}",
"private boolean camposValidos() {\n boolean valido = false;\n\n if (txtInfectados.getText().equals(\"\")\n || txtFecha.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Rellene todos los campos\");\n } else {\n valido = true;\n }\n\n return valido;\n }",
"private void validarForm(AtualizarTramiteEspecificacaoActionForm form){\n\n\t\tString idLocalidade = form.getIdLocalidade();\n\t\tString codigoSetorComercial = form.getCodigoSetorComercial();\n\t\tString idMunicipio = form.getIdMunicipio();\n\t\tString codigoBairro = form.getCodigoBairro();\n\t\tString idSistemaAbastecimento = form.getIdSistemaAbastecimento();\n\t\tString idDistritoOperacional = form.getIdDistritoOperacional();\n\t\tString idZonaAbastecimento = form.getIdZonaAbastecimento();\n\t\tString idSetorAbastecimento = form.getIdSetorAbastecimento();\n\t\tString idSistemaEsgoto = form.getIdSistemaEsgoto();\n\t\tString idSubsistemaEsgoto = form.getIdSubsistemaEsgoto();\n\t\tString idBacia = form.getIdBacia();\n\t\tString idSubBacia = form.getIdSubBacia();\n\t\tString idUnidadeOrganizacionalOrigem = form.getIdUnidadeOrganizacionalOrigem();\n\t\tString idUnidadeOrganizacionalDestino = form.getIdUnidadeOrganizacionalDestino();\n\t\tString indicadorUso = form.getIndicadorUso();\n\n\t\tString numeroNaoInformadoStr = Integer.toString(ConstantesSistema.NUMERO_NAO_INFORMADO);\n\n\t\tFachada fachada = Fachada.getInstancia();\n\n\t\t// Localidade\n\t\tif(!Util.isVazioOuBranco(idLocalidade)){\n\t\t\tFiltroLocalidade filtro = new FiltroLocalidade();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroLocalidade.ID, idLocalidade));\n\n\t\t\tCollection<Localidade> colecao = fachada.pesquisar(filtro, Localidade.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Localidade\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor Comercial\n\t\tif(Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Localidade\");\n\t\t}else if(!Util.isVazioOuBranco(idLocalidade) && !Util.isVazioOuBranco(codigoSetorComercial)){\n\t\t\tFiltroSetorComercial filtro = new FiltroSetorComercial();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.ID_LOCALIDADE, idLocalidade));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorComercial.CODIGO_SETOR_COMERCIAL, codigoSetorComercial));\n\n\t\t\tCollection<SetorComercial> colecao = fachada.pesquisar(filtro, SetorComercial.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor Comercial\");\n\t\t\t}\n\t\t}\n\n\t\t// Bairro\n\t\tif(Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Município\");\n\t\t}else if(!Util.isVazioOuBranco(idMunicipio) && !Util.isVazioOuBranco(codigoBairro)){\n\t\t\tFiltroBairro filtro = new FiltroBairro();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.MUNICIPIO_ID, idMunicipio));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBairro.CODIGO, codigoBairro));\n\n\t\t\tCollection<Bairro> colecao = fachada.pesquisar(filtro, Bairro.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bairro\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSistemaAbastecimento) && !idSistemaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaAbastecimento filtro = new FiltroSistemaAbastecimento();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaAbastecimento.ID, idSistemaAbastecimento));\n\n\t\t\tCollection<SistemaAbastecimento> colecao = fachada.pesquisar(filtro, SistemaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Operacional\n\t\tif(!Util.isVazioOuBranco(idDistritoOperacional) && !idDistritoOperacional.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroDistritoOperacional filtro = new FiltroDistritoOperacional();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroDistritoOperacional.ID, idDistritoOperacional));\n\n\t\t\tCollection<DistritoOperacional> colecao = fachada.pesquisar(filtro, DistritoOperacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Operacional\");\n\t\t\t}\n\t\t}\n\n\t\t// Zona de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idZonaAbastecimento) && !idZonaAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroZonaAbastecimento filtro = new FiltroZonaAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroZonaAbastecimento.ID, idZonaAbastecimento));\n\n\t\t\tCollection<ZonaAbastecimento> colecao = fachada.pesquisar(filtro, ZonaAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Zona de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Setor de Abastecimento\n\t\tif(!Util.isVazioOuBranco(idSetorAbastecimento) && !idSetorAbastecimento.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSetorAbastecimento filtro = new FiltroSetorAbastecimento();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSetorAbastecimento.ID, idSetorAbastecimento));\n\n\t\t\tCollection<SetorAbastecimento> colecao = fachada.pesquisar(filtro, SetorAbastecimento.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Setor de Abastecimento\");\n\t\t\t}\n\t\t}\n\n\t\t// Sistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSistemaEsgoto) && !idSistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSistemaEsgoto filtro = new FiltroSistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSistemaEsgoto.ID, idSistemaEsgoto));\n\n\t\t\tCollection<SistemaEsgoto> colecao = fachada.pesquisar(filtro, SistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Sistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Subsistema de Esgoto\n\t\tif(!Util.isVazioOuBranco(idSubsistemaEsgoto) && !idSubsistemaEsgoto.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubsistemaEsgoto filtro = new FiltroSubsistemaEsgoto();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubsistemaEsgoto.ID, idSubsistemaEsgoto));\n\n\t\t\tCollection<SubsistemaEsgoto> colecao = fachada.pesquisar(filtro, SubsistemaEsgoto.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subsistema de Esgoto\");\n\t\t\t}\n\t\t}\n\n\t\t// Bacia\n\t\tif(!Util.isVazioOuBranco(idBacia) && !idBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroBacia filtro = new FiltroBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.INDICADORUSO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroBacia.ID, idBacia));\n\n\t\t\tCollection<Bacia> colecao = fachada.pesquisar(filtro, Bacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Bacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Subbacia\n\t\tif(!Util.isVazioOuBranco(idSubBacia) && !idSubBacia.equals(numeroNaoInformadoStr)){\n\t\t\tFiltroSubBacia filtro = new FiltroSubBacia();\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.INDICADOR_USO, ConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroSubBacia.ID, idSubBacia));\n\n\t\t\tCollection<SubBacia> colecao = fachada.pesquisar(filtro, SubBacia.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Subbacia\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Origem\n\t\tif(!Util.isVazioOuBranco(idUnidadeOrganizacionalOrigem)){\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalOrigem));\n\n\t\t\tCollection<UnidadeOrganizacional> colecao = fachada.pesquisar(filtro, UnidadeOrganizacional.class.getName());\n\t\t\tif(colecao == null || colecao.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Origem\");\n\t\t\t}\n\t\t}\n\n\t\t// Unidade Destino\n\t\tif(Util.isVazioOuBranco(idUnidadeOrganizacionalDestino)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Unidade Destino\");\n\t\t}else{\n\t\t\tFiltroUnidadeOrganizacional filtro = new FiltroUnidadeOrganizacional();\n\t\t\tfiltro\n\t\t\t\t\t\t\t.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.INDICADOR_USO,\n\t\t\t\t\t\t\t\t\t\t\tConstantesSistema.INDICADOR_USO_ATIVO));\n\t\t\tfiltro.adicionarParametro(new ParametroSimples(FiltroUnidadeOrganizacional.ID, idUnidadeOrganizacionalDestino));\n\n\t\t\tCollection<UnidadeOrganizacional> colecaoUnidadeOrganizacional = fachada.pesquisar(filtro, UnidadeOrganizacional.class\n\t\t\t\t\t\t\t.getName());\n\t\t\tif(colecaoUnidadeOrganizacional == null || colecaoUnidadeOrganizacional.isEmpty()){\n\t\t\t\tthrow new ActionServletException(\"atencao.pesquisa_inexistente\", null, \"Unidade Destino\");\n\t\t\t}\n\t\t}\n\n\t\t// Indicador de Uso\n\t\tif(Util.isVazioOuBranco(indicadorUso)){\n\t\t\tthrow new ActionServletException(\"atencao.required\", null, \"Indicador de Uso\");\n\t\t}\n\t}",
"@Test\n\tpublic void validaRegras1() {\n\t // Selecionar Perfil de Investimento\n\t //#####################################\n\t\t\n\t\t\n\t\tsimipage.selecionaPerfil(tipoperfilvoce);\n\t\t\n\t\t//#####################################\n\t // Informar quanto será aplicado\n\t //#####################################\n\t\t \t\n\t\tsimipage.qualValorAplicar(idvaloraplicacao,valoraplicacao);\n\t\t\n\t\t//#####################################\n\t // Que valor poupar todo mês\n\t //#####################################\n\t\tsimipage.quantopoupartodomes(idvalorpoupar,valorpoupar,opcao);\n\t\t\t\t\n\t \t//#####################################\n\t \t//Por quanto tempo poupar\n\t \t//#####################################\n\t \t\n\t\t//Informar o total de Meses ou Anos\n\t \tsimipage.quantotempopoupar(idperiodopoupar,periodopoupar); \n\t \t\n\t\t//Selecionar Combobox Se Meses ou Anos \n\t \tsimipage.selecionamesano(mesano, idmesano);\n\t \t\n\t \t//#####################################\n\t \t//Clica em Simular\n\t \t//#####################################\n\t \t\n\t \tsimipage.clicaremsimular(); \n\t\t\n\t\t\t\t\n\t}",
"public boolean validarForm() throws Exception {\r\n\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxNro_ingreso.setStyle(\"background-color:white\");\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxEstado_salida.setStyle(\"background-color:white\");\r\n dtbxFecha_ingreso.setStyle(\"background-color:white\");\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso.getSelectedItem()\r\n .getValue());\r\n\r\n boolean valida = true;\r\n\r\n String mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n if (tbxNro_identificacion.getText().trim().equals(\"\")) {\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_prestador.getText().trim().equals(\"\")) {\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (admision == null) {\r\n lbxNro_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_diagnostico_principal.getText().trim().equals(\"\")) {\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (lbxCausa_externa.getSelectedIndex() == 0) {\r\n lbxCausa_externa\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (valida) {\r\n if (lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono el estado de la salida como muerto(a) \\npor lo tanto debe seleccionar la causa de muerte\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (!lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && !tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n lbxEstado_salida.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono una casua de muerte \\npor lo tanto debe seleccionar el estado a la salida como muerto (a)\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (dtbxFecha_ingreso.getValue().compareTo(\r\n dtbxFecha_egreso.getValue()) > 0) {\r\n dtbxFecha_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"La fecha de ingreso no puede ser mayor a la fecha de egreso\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (!valida) {\r\n Messagebox.show(mensaje,\r\n usuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n Messagebox.EXCLAMATION);\r\n }\r\n\r\n return valida;\r\n }",
"public void validar() \r\n\t{\r\n\t\tString imagen = sudoku.validar();\r\n\t\tactualizarInformacion();\r\n\t\tactualizarImagen(imagen);\r\n\t}",
"private void batchValidate() {\n lblIdError.setText(CustomValidator.validateLong(fieldId));\n lblNameError.setText(CustomValidator.validateString(fieldName));\n lblAgeError.setText(CustomValidator.validateInt(fieldAge));\n lblWageError.setText(CustomValidator.validateDouble(fieldWage));\n lblActiveError.setText(CustomValidator.validateBoolean(fieldActive));\n }",
"private void actualizaUsuario() {\n\t\t\n\t\tInteger edad=miCoordinador.validarEdad(campoEdad.getText().trim());\n\t\t\n\t\tif (edad!=null) {\n\t\t\t\n\t\t\tUsuarioVo miUsuarioVo=new UsuarioVo();\n\t\t\t//se asigna cada dato... el metodo trim() del final, permite eliminar espacios al inicio y al final, en caso de que se ingresen datos con espacio\n\t\t\tmiUsuarioVo.setDocumento(campoDocumento.getText().trim());\n\t\t\tmiUsuarioVo.setNombre(campoNombre.getText().trim());\n\t\t\tmiUsuarioVo.setEdad(Integer.parseInt(campoEdad.getText().trim()));\n\t\t\tmiUsuarioVo.setProfesion(campoProfesion.getText().trim());\n\t\t\tmiUsuarioVo.setTelefono(campoTelefono.getText().trim());\n\t\t\tmiUsuarioVo.setDireccion(campoDireccion.getText().trim());\n\t\t\t\n\t\t\tString actualiza=\"\";\n\t\t\t//se llama al metodo validarCampos(), este retorna true o false, dependiendo de eso ingresa a una de las opciones\n\t\t\tif (miCoordinador.validarCampos(miUsuarioVo)) {\n\t\t\t\t//si se retornó true es porque todo está correcto y se llama a actualizar\n\t\t\t\tactualiza=miCoordinador.actualizaUsuario(miUsuarioVo);//en registro se almacena ok o error, dependiendo de lo que retorne el metodo\n\t\t\t}else{\n\t\t\t\tactualiza=\"mas_datos\";//si validarCampos() retorna false, entonces se guarda la palabra mas_datos para indicar que hace falta diligenciar los campos obligatorios\n\t\t\t}\n\t\t\t\n\t\t\t//si el registro es exitoso muestra un mensaje en pantalla, sino, se valida si necesita mas datos o hay algun error\n\t\t\tif (actualiza.equals(\"ok\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Se ha Modificado Correctamente \",\"Confirmación\",JOptionPane.INFORMATION_MESSAGE);\t\t\t\n\t\t\t}else{\n\t\t\t\tif (actualiza.equals(\"mas_datos\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Debe Ingresar los campos obligatorios\",\"Faltan Datos\",JOptionPane.WARNING_MESSAGE);\t\t\t\n\t\t\t\t}else{\n\t\t JOptionPane.showMessageDialog(null, \"Error al Modificar\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(null, \"Debe ingresar una edad Valida!!!\",\"Advertencia\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\t\t\t\n\t}",
"public boolean validarForm() throws Exception {\r\n\r\n\t\ttbxIdentificacion\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxTipo_disnostico\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\r\n\t\tString mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n\t\tboolean valida = true;\r\n\r\n\t\tif (tbxIdentificacion.getText().trim().equals(\"\")) {\r\n\t\t\ttbxIdentificacion\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (lbxTipo_disnostico.getSelectedIndex() == 0) {\r\n\t\t\tlbxTipo_disnostico\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!lbxFinalidad_cons.getSelectedItem().getValue().toString()\r\n\t\t\t\t.equalsIgnoreCase(\"10\")\r\n\t\t\t\t&& lbxCodigo_consulta_pyp.getSelectedIndex() == 0) {\r\n\t\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (tbxTipo_principal.getText().trim().equals(\"\")) {\r\n\t\t\tmensaje = \"Debe digitar la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t} else if (vaidarIgualdad(tbxTipo_principal.getText(),\r\n\t\t\t\ttbxTipo_relacionado_1.getText(),\r\n\t\t\t\ttbxTipo_relacionado_2.getText(),\r\n\t\t\t\ttbxTipo_relacionado_3.getText())) {\r\n\t\t\tmensaje = \"no se puede repetir la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!valida) {\r\n\t\t\tMessagebox.show(mensaje,\r\n\t\t\t\t\tusuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n\t\t\t\t\tMessagebox.EXCLAMATION);\r\n\t\t}\r\n\r\n\t\treturn valida;\r\n\t}",
"@Override\r\n public void validate(FacesContext fc, UIComponent uic, Object o) throws ValidatorException {\n SimpleDateFormat sdft = new SimpleDateFormat(\"HH:mm:ss\");\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n HorarioDao horarioDao = new HorarioDao();\r\n Horario_TO horario = new Horario_TO();\r\n\r\n //Obtenemos los valores de cada variable desde el contexto de la vista\r\n horario.setHorario((String) o); \r\n try {//Formateamos las fechas segun lo necesitemos\r\n fechaRecogida = sdf.parse(sdf.format((Date) uic.getAttributes().get(\"fechaRecogida\")));\r\n horaRecogida = sdft.parse(horarioDao.consultarHorario(horario).getHoraInicio());\r\n fechaActual = sdf.parse(sdf.format(fechaHoraActual));\r\n horaActual = sdft.parse(sdft.format(fechaHoraActual));\r\n } catch (ParseException e) {\r\n e.getMessage();\r\n }\r\n\r\n if (fechaRecogida.equals(fechaActual)) {\r\n if (horaRecogida.before(horaActual)) {\r\n FacesMessage fmsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Error\", \"La hora de recogida del pedido es menor a la hora actual\");\r\n throw new ValidatorException(fmsg);\r\n }\r\n }\r\n\r\n }",
"public boolean validar() {\n if (foto==null){\n Toast.makeText(this, getResources().getString(R.string.error_f), Toast.LENGTH_SHORT).show();\n foto.requestFocus();\n return false;\n }\n\n if (txtID.getText().toString().isEmpty()) {\n txtID.setError(getResources().getString(R.string.error_ID));\n txtID.requestFocus();\n return false;\n }\n\n if (txtNombre.getText().toString().isEmpty()) {\n txtNombre.setError(getResources().getString(R.string.error_nombre));\n txtNombre.requestFocus();\n return false;\n }\n\n if (txtTipo.getText().toString().isEmpty()) {\n txtTipo.setError(getResources().getString(R.string.error_tipo));\n txtTipo.requestFocus();\n return false;\n }\n\n /*if (o1 == 0) {\n Toast.makeText(this, getResources().getString(R.string.error_cantidad), Toast.LENGTH_SHORT).show();\n cmbSexo.requestFocus();\n return false;\n }*/\n\n if (txtCantidad.getText().toString().isEmpty()) {\n txtCantidad.setError(getResources().getString(R.string.error_cantidad));\n txtCantidad.requestFocus();\n return false;\n }\n\n return true;\n\n }",
"@Override\n\t\tprotected void revalidate() {\n\t\t\tvalid = true;\n\t\t}",
"private void guardarEstadoObjetosUsados() {\n }",
"void validateActivoCreate(Activo activo);",
"public void ValidarLetra() {\n\t\t\n\t\tString valorCampo = \"\";\n\t\t\n\t\tif (campo == 1) {\n\t\t\t\n\t\t\tvalorCampo = textCampo1.getText();\n\t\t}\n\t\telse if (campo == 2) {\n\t\t\t\n\t\t\t valorCampo = textCampo2.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 3) {\n\t\t\t\n\t\t\tvalorCampo = textCampo3.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 4) {\n\t\t\t\n\t\t\tvalorCampo = textCampo4.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 5) {\n\t\t\t\n\t\t\tvalorCampo = textCampo5.getText();\n\t\t}\n\n\t\telse if (campo == 6) {\n\t\t\t\n\t\t\tvalorCampo = textCampo6.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 7) {\n\t\t\t\n\t\t\tvalorCampo = textCampo7.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 8) {\n\t\t\t\n\t\t\tvalorCampo = textCampo8.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 9) {\n\t\t\t\n\t\t\tvalorCampo = textCampo9.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 10) {\n\t\t\t\n\t\t\tvalorCampo = textCampo10.getText();\n\t\t}\n\n\t\t \n\t\tboolean existe = palabra.contains(valorCampo);\n\t\t \n\t\t System.out.println(\" \"+existe);\n\n\n\t\t\n\t\t\n\t\tSystem.out.println(\"probando campo \"+campo);\n\t\t\n\t\t/*campo = 0;*/\n\t\t\n\t\t//System.out.println(\" inicializa \"+campo);\n\n\t}",
"public void iniciarValidacaoCorrespondencias(Dataset dataset);",
"public void validar(Date fechaDesde, Date fechaHasta, int idOrganizacion)\r\n/* 43: */ throws ExcepcionAS2Financiero\r\n/* 44: */ {\r\n/* 45: 86 */ this.periodoDao.validar(fechaDesde, fechaHasta, idOrganizacion);\r\n/* 46: */ }",
"public Validador() {\n this.msgGeral = \"\";\n }",
"protected boolean validarCampos() {\n boolean cancel = true;\n if (((Values) tipoViviendaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tipoVivienda));\n } else if (((Values) viaAccesoPrincipalSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.viaAccesoPrincipal));\n } else if (((Values) materialTechoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialTecho));\n } else if (((Values) materialPisoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialPiso));\n } else if (((Values) materialParedesSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialParedes));\n } else if (((Values) estadoTechoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoTecho));\n } else if (((Values) estadoPisoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoPiso));\n } else if (((Values) estadoParedSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoPared));\n } else if (((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tenenciaHogar));\n } else if ((((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(\"1\") ||\n ((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(\"2\")) &&\n ((Values) documentoHogarSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.documentoHogar));\n } else if (((Values) numCuartosSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.cuartos));\n } else if (((Values) numDormitoriosSpinner\n .getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.dormitorios));\n// focusView = numDormitoriosEditText;\n } else if (((Values) fuenteAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.fuenteAgua));\n } else if (((Values) ubicacionAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.ubicacionAgua));\n } else if (((Values) tratamientoAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tratamientoAgua));\n } else if (((Values) servicioSanitarioSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.servicioSanitario));\n } else if (((Values) ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE)) &&\n !((Values) servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"6\")\n ) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.ubicacionSanitario));\n } else if (((Values) servicioDuchaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.servicioDucha));\n } else if (((Values) eliminaBasuraSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.eliminaBasura));\n } else if (((Values) tipoAlumbradoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tipoAlumbrado));\n } else if (codigoElectricoEditText.getText().toString().trim().equals(\"\") &&\n ((Values) tipoAlumbradoSpinner.getSelectedItem()).getKey().equals(\"1\")) {\n codigoElectricoEditText.setError(null);\n codigoElectricoEditText.clearFocus();\n codigoElectricoEditText.setError(getString(R.string.errorCampoRequerido));\n codigoElectricoEditText.requestFocus();\n } else if (((Values) energeticoCocinaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.energeticoCocina));\n } else if (gasParaCalefonOpcion.getCheckedRadioButtonId() == -1) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.gasParaCalefon));\n } else if (terrenoAgropecuario.getCheckedRadioButtonId() == -1) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.terrenoAgropecuario));\n } else if (terrenoAgropecuarioSi.getCheckedRadioButtonId() == -1 &&\n terrenoAgropecuario.getCheckedRadioButtonId() == R.id.terrenoAgropecuarioOpcion1rb\n ) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.terrenoAgropecuarioSi));\n } else if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"6\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.seccion3MensajeNoCorrespondeDepartamento));\n\n }else {\n cancel = false;\n }\n if (!TextUtils.isEmpty(codigoElectricoEditText.getText().toString())) {\n\n if (codigoElectricoEditText.getText().toString().length() != 10) {\n codigoElectricoEditText.setError(getString(R.string.error_numero_medidor));\n codigoElectricoEditText.requestFocus();\n return true;\n }\n }\n return cancel;\n }",
"private boolean validarCampos() {\r\n\t\tif (cedula.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || telefono.equals(\"\")) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}",
"public void validate() throws ParameterValuesException {\n\t\tif (txtTenTaiSan.getText().isEmpty())\n\t\t\tthrow new ParameterValuesException(\"Bạn cần nhập tên tài sản\", null);\n\t}",
"public void guarda(DTOAcreditacionGafetes acreGafete) throws Exception ;",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }",
"private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}",
"public void reiniciarEstadoSalud(){\n EmpleadosPrioridadAlta.clear();\n EmpleadosPrioridadMediaAlta.clear();\n EmpleadosPrioridadMedia.clear();\n EmpleadosPrioridadBaja.clear();\n }",
"private void validaDados(int numeroDePacientes, double gastosEmCongressos) throws Exception{\n\t\tif(numeroDePacientes >= 0) {\n\t\t\tthis.numeroDePacientes = numeroDePacientes;\n\t\t}else {\n\t\t\tthrow new Exception(\"O numero de pacientes atendidos pelo medico nao pode ser negativo.\");\n\t\t}\n\t\tif(gastosEmCongressos >= 0) {\n\t\t\tthis.gastosEmCongressos = gastosEmCongressos;\n\t\t}else {\n\t\t\tthrow new Exception(\"O total de gastos em congressos do medico nao pode ser negativo.\");\n\t\t}\n\t}",
"@Override\n public void validate(StudentiEntity entity){\n List<String> errorMessages = new ArrayList<>();\n if(entity.getID() < 0) errorMessages.add(\"Invalid ID\");\n if(entity.getNume().equals(\"\")) errorMessages.add(\"Invalid name\");\n if(entity.getEmail().equals(\"\")) errorMessages.add(\"Invalid email\");\n if(entity.getGrupa() < 0) errorMessages.add(\"Invalid grupa\");\n\n if(errorMessages.size() > 0) throw new ValidationException(errorMessages);\n }",
"private static void registrarAuditoriaDetallesValorPorUnidad(Connexion connexion,ValorPorUnidad valorporunidad)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_empresa().equals(valorporunidad.getValorPorUnidadOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_unidad().equals(valorporunidad.getValorPorUnidadOriginal().getid_unidad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_unidad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_unidad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDUNIDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getvalor().equals(valorporunidad.getValorPorUnidadOriginal().getvalor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getvalor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getvalor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.VALOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}"
]
| [
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.7237909",
"0.6811798",
"0.6802812",
"0.6801587",
"0.66972816",
"0.65992725",
"0.65922666",
"0.65805686",
"0.65563905",
"0.65371615",
"0.65161026",
"0.6506398",
"0.6483997",
"0.648317",
"0.6462416",
"0.64609283",
"0.6459965",
"0.6418511",
"0.6389902",
"0.6355721",
"0.6352764",
"0.6347397",
"0.6341065",
"0.6324919",
"0.6315548",
"0.62792754",
"0.6266917",
"0.6256165",
"0.62498003",
"0.6244937",
"0.6227236",
"0.62239057",
"0.62102836",
"0.6205197",
"0.6182578",
"0.6171863",
"0.61680686",
"0.6159169",
"0.6124698",
"0.6102622",
"0.61018354",
"0.60877174",
"0.608727",
"0.6086989",
"0.60749984",
"0.6069809",
"0.60687065",
"0.60659194",
"0.6060862",
"0.6030526",
"0.6028281",
"0.60170805",
"0.60155404",
"0.60134614",
"0.6009798",
"0.6005044",
"0.6003146",
"0.5985926",
"0.59816253",
"0.59633905",
"0.59622544",
"0.59602094",
"0.5951095",
"0.59433234",
"0.59387565",
"0.59372675"
]
| 0.0 | -1 |
Marker Creation for OTOP Places | public boolean createMarker(ArrayList<LocationsData>datas) {
boolean isNotEmpty= true;
if (isNotEmpty) {
placesMarker= placesMap.addMarker(new MarkerOptions()
.position(new LatLng(datas.get(0).locationLatitude,datas.get(0).locationLongitude))
.title(datas.get(0).locationName));
placesMarker.showInfoWindow();
placesMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
Log.i("Places Marker",marker.getTitle()+"\n"+places.toString());
LocationsData data= new LocationsData();
data.set_id(places.get(0).get_id());
data.setImage_path(places.get(0).getImage_path());
data.setLocationName(places.get(0).getLocationName());
data.setLocationLatitude(places.get(0).getLocationLatitude());
data.setLocationLongitude(places.get(0).getLocationLongitude());
data.setLocationProducts(places.get(0).getLocationProducts());
Intent i= new Intent(MainActivity.this,PlaceDetailsActivity.class);
i.putExtra("places",data);
startActivity(i);
Log.i("Intent",i.toString());
Log.i("onMarkerClick","Successfull, Title: "+marker.getTitle());
Log.i("Getting Item Id",String.valueOf(places.get(0).get_id()));
return false;
}
});
}else {
isNotEmpty=false;
}
return isNotEmpty;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createMarker()\n {\n LocationMarker layoutLocationMarker = new LocationMarker(\n fLon.get(fLon.size()-1),\n fLat.get(fLat.size()-1),\n getExampleView()\n\n );\n\n finalLon = fLon.get(fLon.size()-1);\n finalLat = fLat.get(fLat.size()-1);\n\n View eView = exampleLayoutRenderable.getView();\n TextView finalDistance = findViewById(R.id.textView4);\n\n\n // An example \"onRender\" event, called every frame\n // Updates the layout with the markers distance\n layoutLocationMarker.setRenderEvent(new LocationNodeRender() {\n @Override\n public void render(LocationNode node) {\n View eView = exampleLayoutRenderable.getView();\n\n TextView distanceTextView = eView.findViewById(R.id.textView2);\n distanceTextView.setText(node.getDistance() + \"m\");\n }\n });\n // Adding the marker\n locationScene.mLocationMarkers.add(layoutLocationMarker);\n\n }",
"Marker getMarker();",
"private void createMarker(LatLng position) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(position);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.note_position));\n // set up marker\n locationMarker = googleMap.addMarker(markerOptions);\n locationMarker.setDraggable(true);\n locationMarker.showInfoWindow();\n }",
"private Marker createMarker(final int a, final String id1, String lat, String lng, final String title) {\n\n mMarkerMap.put(marker, a);\n mMarkerMap1.put(marker, title);\n\n Log.e(\"Data\", \"\" + lat + \"-->>>>\" + lng + \"--->>\" + title);\n\n if (a == 999999999) {\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title)\n .anchor(0.5f, 0.5f));\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Hospitals\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.hosp);\n\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Fire_stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.fire11515);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n\n } else if (getIntent().getStringExtra(\"placetype\").equalsIgnoreCase(\"Police Stations\")) {\n\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.police55);\n marker = googleMap.addMarker(new MarkerOptions()\n .position(new LatLng(Double.valueOf(lat), Double.valueOf(lng))).title(title).icon(icon)\n .anchor(0.5f, 0.5f));\n\n }\n\n marker.showInfoWindow();\n\n return marker;\n\n }",
"private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }",
"private Marker(MarkerType type, int position, int relPos, Code context) {\r\n \t\t\tthis(type, null, position, relPos, context);\r\n \t\t}",
"private static void createPlace(Place place) {\r\n\t\tint tempInt = -1;\r\n\t\tContainerNII placeNii = new ContainerNII();\r\n\t\tGeoCoordinate position = new GeoCoordinate();\r\n\t\tMedia media = new Media();\r\n\t\t\r\n\t\tinsertNIIValues(placeNii, \"place\");\r\n\t\tplace.setNii(placeNii);\r\n\t\t\t\t\r\n\t\tif ((tempInt = insertInteger(\"place radius: \")) != -1)\r\n\t\t\t\tplace.setRadius(tempInt);\r\n\t\t\r\n\t\tinsertPosition(position);\r\n\t\tplace.setPosition(position);\r\n\t\t\r\n\t\tinsertMedia(media);\r\n\t\tplace.setMedia(media);\r\n\t}",
"public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }",
"private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }",
"public Place(int x, int y, TYPE typeDiskHere){\n this.x=x;\n this.y=y;\n isFull=true;\n type=typeDiskHere;\n }",
"public Place() {\r\n\t\tthis.name = \"Unknown Place\";\r\n\t\tthis.data = new LinkedHashMap<Integer, Data>();\r\n\t\tthis.populateData();\r\n\t}",
"public void initMapMarkers() {\n\t\tmyMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder myLocMarkerBuilder = new MapMarkerBuilder();\n\t\tmyLocMarkerBuilder.setMarkerId(MARKER_ID_MY_LOCATION);\n\t\tmyLocMarkerBuilder.setIsAccuracyCircleSupported(true);\n\t\tmyLocMarkerBuilder.setAccuracyCircleBaseColor(new FColorRGB(32/255f, 173/255f, 229/255f));\n\t\tmyLocMarkerBuilder.setBaseOrder(-206000);\n\t\tmyLocMarkerBuilder.setIsHidden(true);\n\t\tBitmap myLocationBitmap = OsmandResources.getBitmap(\"map_pedestrian_location\");\n\t\tif (myLocationBitmap != null) {\n\t\t\tmyLocMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tmyLocationBitmap.getWidth(), myLocationBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(myLocationBitmap)));\n\t\t}\n\t\tmyLocationMarker = myLocMarkerBuilder.buildAndAddToCollection(myMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(myMarkersCollection);\n\n\t\t// Create context pin marker\n\t\tcontextPinMarkersCollection = new MapMarkersCollection();\n\t\tMapMarkerBuilder contextMarkerBuilder = new MapMarkerBuilder();\n\t\tcontextMarkerBuilder.setMarkerId(MARKER_ID_CONTEXT_PIN);\n\t\tcontextMarkerBuilder.setIsAccuracyCircleSupported(false);\n\t\tcontextMarkerBuilder.setBaseOrder(-210000);\n\t\tcontextMarkerBuilder.setIsHidden(true);\n\t\tBitmap pinBitmap = OsmandResources.getBitmap(\"map_pin_context_menu\");\n\t\tif (pinBitmap != null) {\n\t\t\tcontextMarkerBuilder.setPinIcon(SwigUtilities.createSkBitmapARGB888With(\n\t\t\t\t\tpinBitmap.getWidth(), pinBitmap.getHeight(),\n\t\t\t\t\tSampleUtils.getBitmapAsByteArray(pinBitmap)));\n\t\t\tcontextMarkerBuilder.setPinIconVerticalAlignment(MapMarker.PinIconVerticalAlignment.Top);\n\t\t\tcontextMarkerBuilder.setPinIconHorisontalAlignment(MapMarker.PinIconHorisontalAlignment.CenterHorizontal);\n\t\t}\n\t\tcontextPinMarker = contextMarkerBuilder.buildAndAddToCollection(contextPinMarkersCollection);\n\n\t\tmapView.addSymbolsProvider(contextPinMarkersCollection);\n\t}",
"public void placeMarker(String zone_name,String risk_level, String latitude, String longitude,String description,String markertime){\n double latitudeNumericVal = Double.valueOf(latitude);\n double longitudeNumericVal = Double.valueOf(longitude);\n\n String timePosted = markertime.substring(0,16);\n\n LatLng coordinates = new LatLng(latitudeNumericVal,longitudeNumericVal);\n System.out.println(\"RISK LEVELS ARE: \" + risk_level);\n if(risk_level.contains(\"Low\")){\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(250);\n circleOptions.strokeColor(Color.parseColor(\"#e0ee20\"));\n circleOptions.fillColor(Color.parseColor(\"#20e0ee20\"));\n circleOptions.strokeWidth(3f);\n // Adding the circle to the GoogleMap\n mMap.addCircle(circleOptions);\n final MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n // MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name).icon(BitmapDescriptorFactory.fromResource(R.drawable.yellowradius));\n dangerMarker.snippet(\"Low Danger:\\n\" + description + \"\\n\" + timePosted);\n mMap.addMarker(dangerMarker);\n }\n\n if (risk_level.contains(\"Medium\")) {\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(500);\n circleOptions.strokeColor(Color.parseColor(\"#FF9700\"));\n circleOptions.fillColor(Color.parseColor(\"#20FF9700\"));\n circleOptions.strokeWidth(3f);\n\n // Adding the circle to the GoogleMap\n mMap.addCircle(circleOptions);\n\n MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n\n dangerMarker.snippet(\"Medium Danger:\\n\" + description + \"\\n\" + timePosted);\n // dangerMarker.visible(false);\n mMap.addMarker(dangerMarker);\n }\n\n if(risk_level.contains(\"High\")) {\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(coordinates);\n circleOptions.radius(750);\n circleOptions.strokeColor(Color.parseColor(\"#cc0000\"));\n circleOptions.fillColor(Color.parseColor(\"#20cc0000\"));\n circleOptions.strokeWidth(3f);\n\n mMap.addCircle(circleOptions);\n\n MarkerOptions dangerMarker = new MarkerOptions().position(coordinates).title(zone_name);\n\n dangerMarker.snippet(\"High Danger:\\n\" + description + \"\\n\" + timePosted);\n\n mMap.addMarker(dangerMarker);\n\n /**\n * Check current Date and see if any of the high danger zones were posted within the hour\n */\n Date currentDate = new Date();\n String currentDateString = currentDate.toString();\n\n String markerHourComparator = markertime.substring(11,14);\n if(currentDateString.contains(markerHourComparator)) {\n displayHighDZDialog(markertime,latitudeNumericVal,longitudeNumericVal);\n }\n\n System.out.println(markerHourComparator);\n //Toast.makeText(MapsActivity.this, \"High Danger Zone Added!\", Toast.LENGTH_LONG).show();\n }\n\n }",
"private void ShowNearbyPlaces(List<HashMap<String, String>> nearbyPlacesList) {\n for (int i = 0; i < nearbyPlacesList.size(); i++) {\n Log.d(\"onPostExecute\",\"Entered into showing locations\");\n MarkerOptions markerOptions = new MarkerOptions();\n HashMap<String, String> googlePlace = nearbyPlacesList.get(i);\n double lat = Double.parseDouble(googlePlace.get(\"lat\"));\n double lng = Double.parseDouble(googlePlace.get(\"lng\"));\n String placeName = googlePlace.get(\"place_name\");\n String vicinity = googlePlace.get(\"vicinity\");\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.snippet(vicinity);\n\n if (this.mKind == \"police\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n else if (this.mKind == \"hospital\")\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE));\n\n mMap.addMarker(markerOptions);\n }\n mMap.animateCamera(CameraUpdateFactory.zoomTo(12));\n }",
"public FaithMarker(int position) {\r\n this.position = position;\r\n }",
"private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }",
"private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }",
"@Override\n public void newTweet(double lat, double lon, String title) {\n GoogleMaps.setMarker(browser, lat, lon, title, \"tweet\");\n }",
"private void showMarker() {\n\n if (myMarker == null) {\n MarkerOptions options = new MarkerOptions();//1 option co 2 thu k thieu vi tri ,hinh anh\n options.position(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));//vi tri kinh do vi do,no tra ve vi tri cuoi cung gps nhan dc ,neu\n options.title(\"dung123\");\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n //newu chua co thif sedc sinh ra bang cach add\n googleMap.addMarker(options);\n// myMarker.setTag(\"Hello\");//co the truyen doi tuig vao duoi window marker getTag\n } else {\n myMarker.setPosition(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));\n }\n }",
"private void setupMarkers() {\n \t\tGPSFilterPolygon polygon = this.area.getPolygon();\n \n \t\tif ( polygon != null ) {\n \t\t\tfinal LatLngBounds.Builder builder = LatLngBounds.builder();\n \n \t\t\t// Put markers for each edge.\n \t\t\tfor ( GPSLatLng pos : polygon.getPoints() ) {\n \t\t\t\tLatLng point = this.convertLatLng( pos );\n \n \t\t\t\tbuilder.include( point );\n \n \t\t\t\tthis.addMarker( point );\n \t\t\t}\n \n \t\t\t// Add listener that moves camera so that all markers are in users view.\n \t\t\tthis.googleMap.setOnCameraChangeListener( new OnCameraChangeListener() {\n \t\t\t\t@Override\n \t\t\t\tpublic void onCameraChange( CameraPosition arg0 ) {\n \t\t\t\t\t// Move camera.\n \t\t\t\t\tmoveCameraToPolygon( builder, false );\n \n \t\t\t\t\t// Remove listener to prevent position reset on camera move.\n \t\t\t\t\tgoogleMap.setOnCameraChangeListener( null );\n \t\t\t\t}\n \t\t\t} );\n \n \t\t\tthis.updateGuiPolygon();\n \t\t}\n \t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }",
"private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }",
"private void plottingMarkers(){\r\n if (nameList.size()==0) {\r\n }\r\n else {\r\n for (int i = 0; i < nameList.size(); i++) {\r\n Loc2LatLng = new LatLng(Double.parseDouble(latList.get(i)), Double.parseDouble(lngList.get(i)));\r\n MarkerOptions markerSavedLocations = new MarkerOptions();\r\n markerSavedLocations.title(nameList.get(i));\r\n markerSavedLocations.position(Loc2LatLng);\r\n map.addMarker(markerSavedLocations);\r\n }\r\n }\r\n }",
"private void addMarker() {\n /** Make sure that the map has been initialised **/\n LatLng lt = new LatLng(58.722599, -103.798828);\n float focus = 1f;\n if (null != mMap) {\n ArrayList<EarthQuake> earthQuakes = (ArrayList<EarthQuake>) getIntent().getSerializableExtra(\"quakeArrayList\");\n getIntent().removeExtra(\"quakeArrayList\");\n int position = getIntent().getIntExtra(\"position\", 0);\n if (earthQuakes != null) {\n if(position==0) {\n for (int i = 0; i < earthQuakes.size(); i++) {\n mMap.addMarker(\n new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(i).getDateTime() + \"\\n\" + earthQuakes.get(i).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(i).getLat(), earthQuakes.get(i).getLon()))\n );\n }\n }else if(position>0){\n lt=new LatLng(earthQuakes.get(position).getLat(),earthQuakes.get(position).getLon());\n mMap.addMarker( new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(position).getDateTime() + \"\\n\" + earthQuakes.get(position).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(position).getLat(), earthQuakes.get(position).getLon())));\n focus=4f;\n\n }\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lt, focus));\n\n }\n }",
"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 openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }",
"private void addPlaceLocationMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n mMap.clear();\n markerOptions.title(\"Current Position\");\n markerOptions.getPosition();\n markerOptions.title(locationName);\n mMap.addMarker(markerOptions);\n }",
"public void createMarker(DBMarker marker)\n\t{\n\t\t//Call get location function\n Location location = getLocation();\n \n //If location is not null, create a marker at the location and draw a line from that location to lat:0 long:0\n if (location != null)\n {\n \t//Get current location and create a LatLng object\n \tLatLng currentLocation = new LatLng(location.getLatitude(), location.getLongitude());\n \tMarker locationMarker = map.addMarker(new MarkerOptions().position(currentLocation));\n \t\n \t//Create a new GPS object to attach to the marker\n \tGPS gpsObject = new GPS();\n \tgpsObject.latitude = location.getLatitude();\n \tgpsObject.longitude = location.getLongitude();\n \tgpsObject.time = location.getTime();\n \tmarker.gps = gpsObject;\n \n \t//Add the marker to the list of markers and HashTable\n \tmarkerList.add(marker);\n \tmarkerHashTable.put(marker, locationMarker);\n }\n else\n {\n \t//Create alert when location fails\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Location not found.\");\n builder.setTitle(\"Error\");\n builder.setNeutralButton(\"Close\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n\t}",
"Builder addLocationCreated(Place value);",
"private void createMarkers(Bundle savedInstanceState) {\n List<MarkerDTO> markerDTOs = null;\n // add the OverlayItem to the ArrayItemizedOverlay\n ArrayList<DescribedMarker> markers = null;\n if (savedInstanceState != null) {\n markerDTOs = savedInstanceState.getParcelableArrayList(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n } else {\n markerDTOs = getIntent().getParcelableArrayListExtra(MapsActivity.PARAMETERS.MARKERS);\n markers = MarkerUtils.markerDTO2DescribedMarkers(this, markerDTOs);\n // retrieve geopoint if missing\n if (getIntent().getExtras() == null) {\n return;\n }\n featureIdField = getIntent().getExtras().getString(PARAMETERS.FEATURE_ID_FIELD);\n if (featureIdField == null) {\n featureIdField = FEATURE_DEFAULT_ID;\n }\n if (!MarkerUtils.assignFeaturesFromDb(markers, featureIdField)) {\n Toast.makeText(this, R.string.error_unable_getfeature_db, Toast.LENGTH_LONG).show();\n canConfirm = false;\n // TODO dialog : download features for this area?\n }\n }\n // create an ItemizedOverlay with the default marker\n overlayManager.getMarkerOverlay().getOverlayItems().addAll(markers);\n }",
"@Override\r\n protected void setUpMap() {\n mMap.addMarker(new MarkerOptions()\r\n .position(BRISBANE)\r\n .title(\"Brisbane\")\r\n .snippet(\"Population: 2,074,200\")\r\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\r\n\r\n // Uses a custom icon with the info window popping out of the center of the icon.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(SYDNEY)\r\n .title(\"Sydney\")\r\n .snippet(\"Population: 4,627,300\")\r\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))\r\n .infoWindowAnchor(0.5f, 0.5f));\r\n\r\n // Creates a draggable marker. Long press to drag.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(MELBOURNE)\r\n .title(\"Melbourne\")\r\n .snippet(\"Population: 4,137,400\")\r\n .draggable(true));\r\n\r\n // A few more markers for good measure.\r\n mMap.addMarker(new MarkerOptions()\r\n .position(PERTH)\r\n .title(\"Perth\")\r\n .snippet(\"Population: 1,738,800\"));\r\n mMap.addMarker(new MarkerOptions()\r\n .position(ADELAIDE)\r\n .title(\"Adelaide\")\r\n .snippet(\"Population: 1,213,000\"));\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(BRISBANE, 10));\r\n }",
"public void createMarkers() throws CoreException {\r\n if (resource != null && document != null) {\r\n for (LPEXTask tTask : parseDocument()) {\r\n Map<String, Object> tAttrs = new HashMap<String, Object>();\r\n tAttrs.put(\"userEditable\", false);\r\n tAttrs.put(\"priority\", new Integer(tTask.getPriority()));\r\n MarkerUtilities.setLineNumber(tAttrs, tTask.getLine());\r\n MarkerUtilities.setMessage(tAttrs, tTask.getMessage());\r\n MarkerUtilities.setCharStart(tAttrs, tTask.getCharStart());\r\n MarkerUtilities.setCharEnd(tAttrs, tTask.getCharEnd());\r\n MarkerUtilities.createMarker(resource, tAttrs, LPEXTask.ID);\r\n }\r\n }\r\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.getUiSettings().setZoomControlsEnabled(true);\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(sydney, 14.0f));\n mMap.addMarker(new MarkerOptions().position(center).title(title));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(center, 14.0f));\n//\n Log.i(\"tag\", otherPoints.size() + \"\");\n for (LatLng p : otherPoints) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.baseline_album_black_18);\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(p.latitude, p.longitude))\n .title(\"\")\n .icon(icon));\n }\n }",
"private void addCrimeMarker(Crime c){\n LatLng coor = new LatLng(c.Lat, c.Long);\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"weee gotta nulllll marker!!!!\");\n }\n c.setVisable(true);\n Log.i(TAG, \"MockCrime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }",
"private void makeKMLString(){\n kmlString = \"<Placemark><visibility>1</visibility>\";\n\n if(name != \"\" && name != null){\n\t\t kmlString +=\"<name>\"+name+\"</name>\";\n\t }\n\n //set time stamp\n //we may not always want this\n //TODO: need to add an UI option: animatePlacemark\n /*\n if(point_time != \"\" && point_time!=null){\n\t\t\tkmlString +=\"<TimeStamp><when>\"+point_time+\"</when></TimeStamp>\";\n\t }\n\t */\n\n\n if(description != \"\" && description != null){\n kmlString += description;\n }\n\n if(style != \"\" && style != null){\n kmlString += style;\n }\n\n if(region != \"\" && region != null){\n\t\t kmlString += region;\n\t\t}\n\n kmlString += \"<styleUrl>#style1_roll_over_labels_Earthwatch</styleUrl>\";\n kmlString += \"<Point>\"\n + \"<coordinates>\"+point_lon+\",\"+point_lat+\",\"+\"0</coordinates>\"\n + \"</Point>\"\n + \"</Placemark>\";\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }",
"public void addPlace(String key, Place place)\n {\n if(mMap!=null) {\n Double lon, lat;\n lat = Double.parseDouble(place.getLat());\n lon = Double.parseDouble(place.getLon());\n String name = place.getName();\n String type = place.getType();\n LatLng placeLatLng = new LatLng(lat, lon);\n\n if (placesMarkers.containsKey(key)) {\n //Already Marker is present,\n\n //Just update the marker\n placesMarkers.get(key).setPosition(placeLatLng);\n placesMarkers.get(key).setTitle(name);\n\n\n } else {\n //Adding marker first time\n\n //Create marker with necessary variables\n placesMarkers.put(key, mMap.addMarker(new MarkerOptions().position(placeLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))));\n }\n\n //Set the icon of marker based on type\n\n if (type.equals(\"home\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_home)\n );\n } else if (type.equals(\"date\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_dating)\n );\n } else if (type.equals(\"education\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_education)\n );\n }\n }\n }",
"public Marker createMarker(double latitude, double longitude, final String storeImg, String name, String description, String contact_number, String opening_time, String closing_time_store, ArrayList<Store_img_item> store_img_items, ArrayList<StoreItem> store_item) {\n this.name = name;\n this.contact_number = contact_number;\n this.opening_time_store = opening_time;\n this.closing_time_store = closing_time_store;\n this.store_img_item = store_img_items;\n\n //Log.e(\"store\", String.valueOf(store_item.size()));\n store_img_item = new ArrayList<>();\n mMarker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(latitude, longitude))\n .snippet(description)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.c_marker))\n .title(name));\n mMarker.setTag(store_img_items);\n //store_img_item = (ArrayList<Store_img_item>) mMarker.getTag();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 15));\n\n return mMarker;\n }",
"public\n BioterrainMarker() {\n\t\tmarker = new BioterrainMarkerDb();\n\t\tisNew = true;\n }",
"private void plotGoogleMap(List<Place> list)\n {\n googleMap.clear(); // clear the map\n for (int i = 0; i < list.size(); i++) {\n MarkerOptions markerOptions = new MarkerOptions();\n Place googlePlace = list.get(i);\n String placeName = googlePlace.getName();\n double lat = Double.parseDouble(googlePlace.getLat());\n double lng = Double.parseDouble(googlePlace.getLng());\n String type = googlePlace.getType();\n //Bitmap bmImg = getBitmapFromURL(icon);\n LatLng latLng = new LatLng(lat, lng);\n markerOptions.position(latLng);\n markerOptions.title(placeName);\n markerOptions.icon(BitmapDescriptorFactory.fromBitmap(getIconHelper.decodeSampledBitmapFromResource(getResources(),getIconHelper.getIconIDFromType(type),32,32)));\n //markerOptions.icon(BitmapDescriptorFactory.fromResource(getIconHelper.getIconIDFromType(type)));\n googleMap.addMarker(markerOptions);\n }\n }",
"public MapFactoryObject(Vector2 position) {\n this.position = position;\n }",
"private MarkerOptions makeMarkerAt( LatLng point ) {\n \t\treturn new MarkerOptions().flat( true ).draggable( true ).position( point );\n \t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n final LatLng latLng = new LatLng(latitude, longitude);\n mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(75)\n .strokeWidth(2f));\n CameraUpdate center=\n CameraUpdateFactory.newLatLng(latLng);\n CameraUpdate zoom=CameraUpdateFactory.zoomTo(21);\n\n mMap.moveCamera(center);\n mMap.animateCamera(zoom);\n Marker mark= mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .title(\"I'm here...\")\n .snippet(\"Its My Location\")\n .rotation((float) -15.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n Tmarker=mMap.addMarker(new MarkerOptions()\n .snippet(tuition_id)\n .rotation((float)12.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE))\n .position(new LatLng(lat,lan)));\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n if(marker!=null) {\n marker.remove();\n }\n marker=mMap.addMarker(new MarkerOptions()\n .snippet(\"My Home\")\n .rotation((float)0.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .position(latLng));\n }\n });\n\n//.fillColor(0x55ffff99));\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n List<Marker> markerList = new ArrayList<>();\n\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// This displays the different map type styles\n// mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n// mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n// mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n\n mBoston = mMap.addMarker(new MarkerOptions()\n .position(BOSTON).title(\"Boston\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mBoston.setTag(0);\n markerList.add(mBoston);\n\n mDallas = mMap.addMarker(new MarkerOptions()\n .position(DALLAS).title(\"Dallas\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));\n mBoston.setTag(0);\n markerList.add(mDallas);\n\n mNYC = mMap.addMarker(new MarkerOptions()\n .position(NYC).title(\"NYC\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mBoston.setTag(0);\n markerList.add(mNYC);\n\n mMap.setOnMarkerClickListener(this);\n\n for(Marker m : markerList){\n LatLng latLng = new LatLng(m.getPosition().latitude, m.getPosition().longitude);\n mMap.addMarker(new MarkerOptions().position(latLng));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n }\n\n\n\n // Add a marker in Sydney and move the camera\n LatLng boston = new LatLng(42.3140089, -71.2504676);\n mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\"));\n// To change the marker color\n// mMap.addMarker(new MarkerOptions().position(boston).title(\"Marker in Boston\")\n// .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(boston));\n// To enter the Zoom on the map\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(boston, 20));\n }",
"Coordinate createCoordinate();",
"private void triggerPOI() {\n double distanceThreshold = 0.01;// unit is km\n // the distance to the target // the unit is km\n double distanceToPOI_1 = GetDistance(POI_1.latitude, POI_1.longitude, latitude, longitude);\n double distanceToPOI_2 = GetDistance(POI_2.latitude, POI_2.longitude, latitude, longitude);\n double distanceToPOI_3 = GetDistance(POI_3.latitude, POI_3.longitude, latitude, longitude);\n //System.out.println(\"The distance to POI is \" + distanceToPOI);\n // 200km per degree\n if (distanceToPOI_1 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_1)\n .anchor(0.5f, 0.5f)\n .title(\"Alte Mensa\")\n .snippet(\"---1st Target---\"));\n }\n if (distanceToPOI_2 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_2)\n .anchor(0.5f, 0.5f)\n .title(\"Helmholtzstraße \")\n .snippet(\"---2nd Target---\"));\n }\n if (distanceToPOI_3 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_3)\n .anchor(0.5f, 0.5f)\n .title(\"SLUB\")\n .snippet(\"---3rd Target---\"));\n }\n }",
"@Override\n public View getInfoContents(Marker arg0) {\n\n // Getting view from the layout file info_window_layout\n View v = getLayoutInflater().inflate(R.layout.window_layout, null);\n\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.beacon_title1);\n\n // Getting reference to the TextView to set longitude\n ImageView img = (ImageView) v.findViewById(R.id.goat);\n\n // Setting the latitude\n tvLat.setText(arg0.getTitle());\n // Returning the view containing InfoWindow contents\n return v;\n\n }",
"@Override\n public void onPlaceSelected(Place place) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\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 }",
"public MapObject addMarker(EncodedImage icon, Coord location, String text, String longText, ActionListener onClick) {\n if(internalNative != null) {\n byte[] iconData = null;\n if(icon != null) {\n iconData = icon.getImageData();\n }\n long key = internalNative.addMarker(iconData, location.getLatitude(), location.getLongitude(), text, longText, onClick != null);\n MapObject o = new MapObject();\n o.mapKey = key;\n o.callback = onClick;\n markers.add(o);\n return o;\n } else {\n if(internalLightweightCmp != null) {\n PointLayer pl = new PointLayer(location, text, icon);\n if(points == null) {\n points = new PointsLayer();\n internalLightweightCmp.addLayer(points);\n points.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n PointLayer point = (PointLayer)evt.getSource();\n for(MapObject o : markers) {\n if(o.point == point) {\n if(o.callback != null) {\n o.callback.actionPerformed(new ActionEvent(o));\n }\n return;\n }\n }\n }\n });\n points.addPoint(pl);\n MapObject o = new MapObject();\n o.point = pl;\n o.callback = onClick;\n markers.add(o);\n return o;\n } \n } else {\n // TODO: Browser component\n }\n }\n return null;\n }",
"protected abstract void setMarkers();",
"private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }",
"private void addArchitectureMarkers() {\n try {\n // Get the text file\n InputStream file = getResources().openRawResource(R.raw.architecture);\n\n // Read the file to get contents\n BufferedReader reader = new BufferedReader(new InputStreamReader(file));\n String line;\n\n // Read every line of the file one line at a time\n while ((line = reader.readLine()) != null) {\n String[] architecture = line.split(\";\", 6);\n\n String architectureName = architecture[0];\n String placeID = architecture[1];\n String architectureDate = architecture[2];\n String architectureInfo = architecture[3];\n String architectureStyle = architecture[4];\n String architect = architecture[5];\n\n // Initialize Places.\n Places.initialize(getApplicationContext(), getString(R.string.google_directions_key));\n // Create a new Places client instance.\n PlacesClient placesClient = Places.createClient(this);\n // Specify the fields to return.\n List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.LAT_LNG,\n Place.Field.PHOTO_METADATAS);\n // Construct a request object, passing the place ID and fields array.\n FetchPlaceRequest request = FetchPlaceRequest.builder(placeID, placeFields).build();\n\n placesClient.fetchPlace(request).addOnSuccessListener((response) -> {\n Place place = response.getPlace();\n Log.i(\"TAG\", \"Place found: \" + place.getName());\n LatLng latlng = place.getLatLng();\n\n //Get the photo metadata.\n if (place.getPhotoMetadatas() == null) {\n Log.i(\"mylog\", \"no photo\");\n } else {\n //choose better default pictures for these buildings\n PhotoMetadata photoMetadata = place.getPhotoMetadatas().get(0);\n if (place.getName().equals(\"The Cube\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Millennium Point Car Park\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"School of Art\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Saint Martin in the Bull Ring\")) {\n photoMetadata = place.getPhotoMetadatas().get(2);\n }\n if (place.getName().equals(\"Bullring & Grand Central\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Mailbox Birmingham\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"The International Convention Centre\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n if (place.getName().equals(\"Birmingham Museum & Art Gallery\")) {\n photoMetadata = place.getPhotoMetadatas().get(1);\n }\n // Create a FetchPhotoRequest.\n FetchPhotoRequest photoRequest = FetchPhotoRequest.builder(photoMetadata)\n .setMaxWidth(200)\n .setMaxHeight(200)\n .build();\n\n placesClient.fetchPhoto(photoRequest).addOnSuccessListener((fetchPhotoResponse) -> {\n Bitmap bitmap = fetchPhotoResponse.getBitmap();\n // Add border to image\n Bitmap bitmapWithBorder = Bitmap.createBitmap(bitmap.getWidth() + 12, bitmap.getHeight()\n + 12, bitmap.getConfig());\n Canvas canvas = new Canvas(bitmapWithBorder);\n canvas.drawColor(Color.rgb(255, 128, 128));\n canvas.drawBitmap(bitmap, 6, 6, null);\n //Add marker onto map\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(latlng.latitude, latlng.longitude))\n .title(architectureName)\n .icon(BitmapDescriptorFactory.fromBitmap(bitmapWithBorder)));\n marker.setTag(placeID);\n String url = getUrl(currentPosition, marker.getPosition(), \"walking\");\n new FetchURL(MapsActivity.this).execute(url, \"walking\");\n //Store marker info\n markersList.add(marker);\n markerHashmap.put(marker.getTitle(), bitmap);\n architectureDateHashmap.put(marker.getTitle(), architectureDate);\n architectureInfoHashmap.put(marker.getTitle(), architectureInfo);\n architectureStyleHashmap.put(marker.getTitle(), architectureStyle);\n architectHashmap.put(marker.getTitle(), architect);\n if (markersList.size() == 34) {\n //Set camera position once all markers loaded in\n setCameraPosition(mMap, markersList);\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(TAG, \"Photo not found: \" + exception.getMessage());\n }\n });\n }\n }).addOnFailureListener((exception) -> {\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n int statusCode = apiException.getStatusCode();\n // Handle error with given status code.\n Log.e(\"TAG\", \"Place not found: \" + placeID + exception.getMessage());\n\n }\n });\n }\n reader.close();\n } catch (NullPointerException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }",
"Position createPosition();",
"public void markerCreator(List<Employee>employeeArray) {\n\n employeeArrayforData= employeeArray;\n List<MarkerOptions> markers = new ArrayList<MarkerOptions>();\n for (int i = 0; i < employeeArray.size(); i++) {\n if(employeeArray.get(i).lastLocation.isEmpty())\n continue;\n// markers.add((new MarkerOptions()\n// .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation.replace(\": (\",\":(\")),\n// LatLong.getLongt(employeeArray.get(i).lastLocation.replace(\": (\",\":(\"))))\n// .title(employeeArray.get(i).name)));\n// updateMyMarkers(markers);\n Log.i(\"****\",employeeArray.get(i).lastLocation);\n Log.i(\"****\",\"hi\");\n if (employeeArray.get(i).online)\n\n {\n markers.add((new MarkerOptions()\n .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation),\n LatLong.getLongt(employeeArray.get(i).lastLocation)))\n .title(i+\":\"+employeeArray.get(i).name))\n .snippet((\"Rate = \"+employeeArray.get(i).rate+\",\"+employeeArray.get(i).email\n )).alpha(0.9f).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_picker_green)));\n\n }\n else{\n markers.add((new MarkerOptions()\n .position(new LatLng(LatLong.getLat(employeeArray.get(i).lastLocation),\n LatLong.getLongt(employeeArray.get(i).lastLocation)))\n .title(i+\":\"+employeeArray.get(i).name))\n .snippet((\"Rate = \"+employeeArray.get(i).rate+\"\"+employeeArray.get(i).email\n )).alpha(0.1f).icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_picker_red)));\n }\n\n updateMyMarkers(markers);\n }\n }",
"public void onSuccess(Collection<Place> result) {\n\t\t\t\t\t\t\t\tfinal MapWidget map = (MapWidget) RootPanel\n\t\t\t\t\t\t\t\t\t\t.get(\"mapsTutorial\").getWidget(0);\n\t\t\t\t\t\t\t\tmap.clearOverlays();\n\n\t\t\t\t\t\t\t\tLatLng markerPos = null;\n\t\t\t\t\t\t\t\tfor (final Place place : result) {\n\t\t\t\t\t\t\t\t\tLocation coordinates = place.getCoordinates();\n\t\t\t\t\t\t\t\t\tmarkerPos = LatLng.newInstance(\n\t\t\t\t\t\t\t\t\t\t\tcoordinates.getLatitude(), coordinates.getLongitude());\n\n\t\t\t\t\t\t\t\t\t// Add a marker\n\t\t\t\t\t\t\t\t\tMarkerOptions options = MarkerOptions\n\t\t\t\t\t\t\t\t\t\t\t.newInstance();\n\t\t\t\t\t\t\t\t\toptions.setTitle(place.getAddress());\n\t\t\t\t\t\t\t\t\tMarker marker = new Marker(markerPos,\n\t\t\t\t\t\t\t\t\t\t\toptions);\n\t\t\t\t\t\t\t\t\tfinal LatLng currMarkerPos = markerPos;\n\t\t\t\t\t\t\t\t\tmarker.addMarkerClickHandler(new MarkerClickHandler() {\n\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\tMarkerClickEvent event) {\n\t\t\t\t\t\t\t\t\t\t\tPlaceFormatter places = new PlaceFormatter();\n\t\t\t\t\t\t\t\t\t\t\tInfoWindowContent wnd = new InfoWindowContent(places.format(place));\n\t\t\t\t\t\t\t\t\t\t\twnd.setMaxWidth(200);\n\t\t\t\t\t\t\t\t\t\t\tmap.getInfoWindow().open(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrMarkerPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\twnd);\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\tmap.addOverlay(marker);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (markerPos != null) {\n\t\t\t\t\t\t\t\t\tmap.setCenter(markerPos);\n\t\t\t\t\t\t\t\t\tmap.setZoomLevel(12);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(this.getApplicationContext(), R.raw.maps_night);\n mMap.setMapStyle(style);\n\n /*cmall=mMap.addMarker(new MarkerOptions()\n .position(CMALL)\n .title(\"CMALL\")\n .snippet(\"Population: 4,627,300\"));\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.lexicon)));\n cmall.setTag(0);*/\n\n\n /*//add a marker in Sydney and move the camera\n LatLng myfav = new LatLng(10.3395125, 123.9110532);//(-34, 151);\n mMap.addMarker(new MarkerOptions().position(myfav).title(\"My Favorite Mall\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(myfav));\n //Zooming mode\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n CameraUpdate update=CameraUpdateFactory.newLatLngZoom(myfav, 18);\n mMap.animateCamera(update);*/\n\n }",
"public interface PlaceInfo {\n\n\t\n\t/**\n\t * Return the place name\n\t * @return the place name\n\t */\n\tpublic String getName();\n\t\n\t\n\t/**\n\t * Return the place description\n\t * @return the place description\n\t */\n\tpublic String getDescription();\n\n\n\t/**\n\t * Is this place the space ship?\n\t * @return true if the place represents a space ship\n\t */\n\tpublic boolean isSpaceship();\n}",
"StockLossMarkerType createStockLossMarkerType();",
"private void prepareAnnotations() {\n\n // get the annotation object\n SKAnnotation annotation1 = new SKAnnotation();\n // set unique id used for rendering the annotation\n annotation1.setUniqueID(10);\n // set annotation location\n annotation1.setLocation(new SKCoordinate(-122.4200, 37.7765));\n // set minimum zoom level at which the annotation should be visible\n annotation1.setMininumZoomLevel(5);\n // set the annotation's type\n annotation1.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_RED);\n // render annotation on map\n mapView.addAnnotation(annotation1);\n\n SKAnnotation annotation2 = new SKAnnotation();\n annotation2.setUniqueID(11);\n annotation2.setLocation(new SKCoordinate(-122.410338, 37.769193));\n annotation2.setMininumZoomLevel(5);\n annotation2.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_GREEN);\n mapView.addAnnotation(annotation2);\n\n SKAnnotation annotation3 = new SKAnnotation();\n annotation3.setUniqueID(12);\n annotation3.setLocation(new SKCoordinate(-122.430337, 37.779776));\n annotation3.setMininumZoomLevel(5);\n annotation3.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_BLUE);\n mapView.addAnnotation(annotation3);\n\n selectedAnnotation = annotation1;\n // set map zoom level\n mapView.setZoom(14);\n // center map on a position\n mapView.centerMapOnPosition(new SKCoordinate(-122.4200, 37.7765));\n updatePopupPosition();\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n @Override\n public View getInfoWindow(Marker marker) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n View v = getLayoutInflater().inflate(R.layout.layout_marker, null);\n\n TextView info= (TextView) v.findViewById(R.id.info);\n TextView hotelname= (TextView) v.findViewById(R.id.info1);\n\n\n hotelname.setText(\"\"+HotelName+\"\");\n info.setText(\"\"+CurrencySymbol+\"\"+TotalFare);\n\n return v;\n }\n });\n int height = 180;\n int width = 200;\n BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.drawable.blu_pointer);\n Bitmap b=bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n\n\n\n\n\n mMap.getUiSettings().setMapToolbarEnabled(false);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(Lati,Longi);\n mMap.addMarker(new MarkerOptions().position(sydney).\n title(HotelName).\n snippet(\"\"+CurrencySymbol+\" \"+TotalFare).\n icon(BitmapDescriptorFactory.fromBitmap(smallMarker)));\n CameraPosition cameraPosition = new CameraPosition.Builder().target(sydney).zoom(18).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n //googleMap.moveCamera(cameraUpdate);\n mMap.animateCamera(cameraUpdate);\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onPlaceSelected(Place place) {\n latLng = place.getLatLng();\n locationName = place.getName().toString();\n locationAddress = place.getAddress().toString();\n Log.i(TAG, \"Location:latitude: \" + place.getLatLng().latitude);\n Log.i(TAG, \"Location:Address: \" + place.getAddress());\n Log.i(TAG, \"Location:Web: \" + place.getWebsiteUri());\n Log.i(TAG, \"Location:Place: \" + place.getName());\n mMap.addMarker(new MarkerOptions().position(latLng).title(locationName).snippet(locationAddress)).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }",
"public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }",
"public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng indiaLatitudeLongitude = new LatLng(20.5937, 78.9629);\n MarkerOptions indiaMarker = new MarkerOptions();\n indiaMarker.position(indiaLatitudeLongitude);\n indiaMarker.title(\"I Love My India...\");\n indiaMarker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher));\n mMap.addMarker(indiaMarker);\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(indiaLatitudeLongitude));\n CameraPosition newPosition = new CameraPosition.Builder()\n .target(indiaLatitudeLongitude)\n// .zoom(14)\n .build();\n\n\n MarkerOptions mumbai = new MarkerOptions();\n mumbai.position(new LatLng(20, 78));\n mumbai.title(\"Mumbai\");\n mMap.addMarker(mumbai);\n mMap.addCircle(new CircleOptions().center(new LatLng(20, 78)).radius(20000));\n\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(newPosition));\n\n\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n double lat = location.getLatitude();\n double lng = location.getLongitude();\n mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker at current Location\"));\n // mMap.addMarker(new MarkerOptions().position(new LatLng(lat, lng)).title(\"Marker in NYC\").icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher_round)));\n }\n }",
"@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 }",
"Location createLocation();",
"Location createLocation();",
"Location createLocation();",
"private void addMarker(MapboxMap mapboxMap) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n IconFactory iconFactory = IconFactory.getInstance(LocateDoctorActivity.this);\n Icon icon = iconFactory.fromResource(R.drawable.mapquest_icon);\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat), Double.parseDouble(selectedLong)));\n markerOptions.snippet(\"Selected Location\");\n markerOptions.setIcon(icon);\n mapboxMap.addMarker(markerOptions);\n }",
"public static void setMarker() {\n\t\tfor (Picture p : pictures) {\n\t\t\tif (p.getLon() < 200 && p.getLat() < 200) {\n\t\t\t\tMarker myMarker = mMap.addMarker(\n\t\t\t\t\t\tnew MarkerOptions()\n\t\t\t\t\t\t\t\t.position(new LatLng(p.getLat(), p.getLon()))\n\t\t\t\t\t\t\t\t.visible(true)\n\t\t\t\t\t\t//.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_brightness_1_black_24dp))\n\t\t\t\t);\n\t\t\t\tmarkers.put(myMarker, p);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t\n\t\t\t\tmLatitude = location.getLatitude();\n\t\t\t\tmLongitude = location.getLongitude();\n\t\t\t\t\n\t\t\t\t LatLng point = new LatLng(mLatitude, mLongitude);\n\t\t\t\t\n\t\t\t\t try {\n\t\t\t\t \taddresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\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 MarkerOptions maker= new MarkerOptions().position(point);\n\n\t\t\t\t address = addresses.get(0).getAddressLine(0);\n\t\t\t\t if(address==null)\n\t\t\t\t {\n\t\t\t\t\t maker.title(\"My Location\");\n\t\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\tmaker.title(\"\"+address);\n\t\t\t\t\tgoogleMap.addMarker(maker);\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t String type = mPlaceType;\n\t\t\t StringBuilder sb = new StringBuilder(\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?\");\n\t\t\t sb.append(\"location=\"+mLatitude+\",\"+mLongitude);\n\t\t\t sb.append(\"&radius=1500\");\n\t\t\t sb.append(\"&types=\"+type);\n\t\t\t sb.append(\"&sensor=true\");\n\t\t\t sb.append(\"&key=AIzaSyAwZSGS1kZG7_UuqxqHH3MdO1hbwB2cjag\"); \n\t\t\t PlacesTask placesTask = new PlacesTask(); \n\t\t\t placesTask.execute(sb.toString());\n\t\t\t \n\t\t\t \n\t\t\t if(zoomm)\n\t\t\t {\n\t\t\t \t googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(point, 15, 30, 0)));\n\t\t\t \t zoomm=false;\n\t\t\t }\n\t\t\t\t\n\t\t\t}",
"private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public interface RegionCategoryMapView {\n void init();\n\n void setToolbarLayout();\n\n void showToolbarTitle(String message);\n\n void setGoogleMap();\n\n void setGoogleMapPosition(Market market);\n\n void setMarkerLayout();\n\n LocationDto getCurrentLocation();\n\n void setLocationManager();\n\n void showProgressDialog();\n\n void goneProgressDialog();\n\n void showMarketInfo();\n\n void showMarketAvatar(String message);\n\n void showMarketName(String message);\n\n void showMarketAddress(String message);\n\n void showMarketPhone(String message);\n\n void showMarketDistance(String message);\n\n void goneMarketInfo();\n\n void goneMarketDistance();\n\n void goneMarketPhone();\n\n void onClickPosition();\n\n void onCameraFocusUpdate(LocationDto locationDto);\n\n void setLocationListener();\n\n void onClickBack();\n\n void showMessage(String message);\n\n Marker showMapMarker(Market market, boolean isSelected);\n\n Marker showMapCurrentPositionMarker(LocationDto locationDto);\n\n void onSnippetClick();\n\n void navigateToMarketActivity(Market market);\n}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n for(int i=0; i<coordinatesStringList.length; i+=2){\n pont = new LatLng(Double.parseDouble(coordinatesStringList[i]), Double.parseDouble(coordinatesStringList[i+1]));\n latLngList.add(pont);\n MarkerOptions markerOptions=new MarkerOptions();\n mMap.addMarker(new MarkerOptions().position(pont).title(\"Marker in Sydney\").icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)));\n\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n// Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n// ArrayList<String> addresses = geocoder.getFromLocation(marker.getPosition().latitude(), marker.getPosition().longitude(), 1); //1 num of possible location returned\n// String address = addresses.get(0).getAddressLine(0); //0 to obtain first possible address\n// String city = addresses.get(0).getLocality();\n// String state = addresses.get(0).getAdminArea();\n// String country = addresses.get(0).getCountryName();\n// String postalCode = addresses.get(0).getPostalCode();\n// //create your custom title\n// String title = address +\"-\"+city+\"-\"+state;\n// marker.setTitle(title);\n// marker.showInfoWindow();\n// return true;\n// }\n// });\n }\n\n\n PolylineOptions polylineOptions = new PolylineOptions();\n\n// Create polyline options with existing LatLng ArrayList\n polylineOptions.addAll(latLngList);\n polylineOptions\n .width(5)\n .color(Color.RED);\n\n// Adding multiple points in map using polyline and arraylist\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.addPolyline(polylineOptions);\n }",
"@Override\n\tpublic Marker addMarker() {\n\t\treturn null;\n\t}",
"public PlaceReserveInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n if(requestCode == LOCATION_REQUEST && resultCode == RESULT_OK){\n PlaceOfInterest fromAdd = (PlaceOfInterest) data.getSerializableExtra(\"Place\");\n LatLng newLatLong = new LatLng(fromAdd.getLatitude(), fromAdd.getLongitude());\n MarkerOptions placeMarker = new MarkerOptions().position(newLatLong).title(fromAdd.getName())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n if(fromAdd.getPicture() != null){\n Log.d(TAG, \"getPicture was not null\");\n int height = 100;\n int width = 100;\n Bitmap picture = ByteConvertor.convertToBitmap(fromAdd.getPicture());\n BitmapDrawable d = new BitmapDrawable(getResources(), picture);\n Bitmap smallMarker = Bitmap.createScaledBitmap(d.getBitmap(), width, height, false);\n\n placeMarker.icon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n }\n places.add(fromAdd);\n mMap.addMarker(placeMarker);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(newLatLong));\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Intent intent = getIntent();\n String title=intent.getStringExtra(\"title\");\n Double lat = intent.getExtras().getDouble(\"latitude\");\n Double lng = intent.getExtras().getDouble(\"longitude\");\n LatLng latLng= new LatLng(lat,lng);\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .title(title)\n .anchor((float) 0.5, (float) 0.5);\n //.snippet(\"Время: \" + MainActivity.time.get(MainActivity.position));\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker));\n mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }",
"private void createDefaultMarker(Point2D framePosition) {\n Point newPoint = activeTrajectory.copyLastPoint();\n newPoint.setX((int) Math.round(framePosition.getX()));\n newPoint.setY((int) Math.round(framePosition.getY()));\n\n activeTrajectory.set(getCurrentFrame(), newPoint);\n save(activeTrajectory);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n MapAddress durban= new MapAddress(\"Gordon Rajapogal: Durban Teen Challenge\",\"Afrique du Sud\",\"Durban\",\"Newlands East\",-29.777830,30.988298,\"5/7 Marlin Grov Newlands East Durban\",0,\"0833448430\");\n MapAddress nigeria= new MapAddress(\"BETLAADA ADULT & TEEN CHALLENGE\",\"Nigeria\",\"Ibadan\",\"\",7.323658, 3.898848,\"42A UNIQUE ESTATE, SANYO , IBADAN, NIGERIA\",0,\"+234-810-508-7705\");\n MapAddress ghana= new MapAddress(\"Teen Challenge, Ghana.\",\"Ghana\",\"Koforidua\",\"Eastern Region\",6.065691, -0.252336,\"Hse No. 193A, Adweso, Koforidua, Eastern Region, Ghana.\",0,\"+233243841230\");\n MapAddress nairo= new MapAddress(\"Teen Challenge Kenya\",\"Kenya\",\"Nairobi\",\"Kiambu\",-1.197566, 36.845074,\"Mushroom Rd, Kiambu, Kenya\",0,\"+254 722 410751\");\n MapAddress nigeria_jos= new MapAddress(\"Teen Challenge Jos, Nigeria\",\"Nigeria\",\"Jos\",\"Plateu State\",9.897248, 8.896680,\" No 74 Liberty Boulevard Gwarandok, Jos Plateau State, Nigeria\",0,\"\");\n mMap.addMarker(new MarkerOptions().position(new LatLng(durban.getLat(),durban.getLng())).title(durban.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nigeria.getLat(),nigeria.getLng())).title(nigeria.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(ghana.getLat(),ghana.getLng())).title(ghana.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nairo.getLat(),nairo.getLng())).title(nairo.getOrganisation()));\n mMap.addMarker(new MarkerOptions().position(new LatLng(nigeria_jos.getLat(),nigeria_jos.getLng())).title(nigeria_jos.getOrganisation()));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(durban.getLat(), durban.getLng())));\n }",
"private void drawMarkers () {\n // Danh dau chang chua di qua\n boolean danhDauChangChuaDiQua = false;\n // Ve tat ca cac vi tri chang tren ban do\n for (int i = 0; i < OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().size(); i++) {\n\n TourTimesheet timesheet = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet().get(i);\n // Khoi tao vi tri chang\n LatLng position = new LatLng(timesheet.getmBuildingLocation().latitude, timesheet.getmBuildingLocation().longitude);\n // Thay doi icon vi tri chang\n MapNumberMarkerLayoutBinding markerLayoutBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.map_number_marker_layout, null, false);\n // Thay doi so thu tu timesheet\n markerLayoutBinding.number.setText(String.valueOf(i + 1));\n // Thay doi trang thai markup\n // Lay ngay cua tour\n Date tourDate = OnlineManager.getInstance().mTourList.get(tourOrder).getmDate();\n // Kiem tra xem ngay dien ra tour la truoc hay sau hom nay. 0: hom nay, 1: sau, -1: truoc\n int dateEqual = Tour.afterToday(tourDate);\n // Kiem tra xem tour da dien ra chua\n if (dateEqual == -1) {\n // Tour da dien ra, thay doi mau sac markup thanh xam\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n } else if (dateEqual == 1) {\n // Tour chua dien ra, thay doi mau sac markup thanh vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Kiem tra xem chang hien tai la truoc hay sau gio nay. 0: gio nay, 1: gio sau, -1: gio truoc\n int srcStartEqual = Tour.afterCurrentHour(timesheet.getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheet.getmEndTime());\n if(srcStartEqual == 1){\n // Chang chua di qua\n if (danhDauChangChuaDiQua == true) {\n // Neu la chang sau chang sap toi thi chuyen thanh mau mau vang\n markerLayoutBinding.markerImage.setColorFilter(Color.YELLOW, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Neu la chang ke tiep thi giu nguyen mau do\n danhDauChangChuaDiQua = true;\n }\n } else if(srcStartEqual == -1 && srcEndEqual == 1){\n // Chang dang di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);\n } else{\n // Chang da di qua\n markerLayoutBinding.markerImage.setColorFilter(Color.GRAY, PorterDuff.Mode.SRC_ATOP);\n }\n }\n // Marker google map\n View markerView = markerLayoutBinding.getRoot();\n // Khoi tao marker\n MarkerOptions markerOptions = new MarkerOptions()\n .draggable(false)\n .title(timesheet.getmBuildingName() + '-' + timesheet.getmClassroomName())\n .position(position)\n .icon(BitmapDescriptorFactory.fromBitmap(getMarkerBitmapFromView(markerView)));\n if (timesheet.getmClassroomNote() != null && !timesheet.getmClassroomNote().equals(\"\") && !timesheet.getmClassroomNote().equals(\"null\")) {\n markerOptions.snippet(timesheet.getmClassroomNote());\n }\n mMap.addMarker(markerOptions);\n // add marker to the array list to display on AR Camera\n markerList.add(markerOptions);\n // Goi su kien khi nhan vao tieu de marker\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n // TODO: Chuyen sang man hinh thong tin chang khi nhan vao tieu de chang\n openTimesheetInfo(marker.getTitle());\n }\n });\n }\n }",
"public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.i(\"MapWorks\", \"The map works\");\n mMap = googleMap;\n //center camera at her stuff\n //add pins\n // Add a marker in Sydney and move the camera\n LatLng currentLoc = new LatLng(myLat, myLong);\n mMap.addMarker(new MarkerOptions().position(currentLoc).title(\"Your Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLoc));\n// locs[1] = new LatLng(34, 119);\n// locs[2] = new LatLng(20, 130);\n if(null != locs) {\n Log.i(\"size of message: \", \" \"+ size);\n for (int i = 0; i < size; i++) {\n LatLng l = locs[i];\n mMap.addMarker(new MarkerOptions().position(l).title(names[i] + \" is a meteor of mass \" +\n masses[i] + \" that landed here in \" + years[i]));\n }\n }\n\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.tramxe_detail);\r\n\t\t\r\n\t\tpos = getIntent().getIntExtra(\"POS_STATION_NAME\", 0);\r\n\t\t\r\n\t\tTextView txt_Huongve = (TextView) findViewById(R.id.TextView02);\r\n\t\tTextView txt_TuyenXe = (TextView) findViewById(R.id.TextTuyenXe);\r\n\t\t\r\n\t\tint iPos = getIntent().getIntExtra(\"POS_STATION_NAME\", 0);\r\n\t\tif (ParsedData.busStation.get(iPos).stationName != null) {\r\n\t\t\ttxt_TuyenXe.setText(getString(R.string.station)+\" \"+ParsedData.busStation.get(iPos).stationName);\r\n\t\t\tnameMarket = ParsedData.busStation.get(iPos).stationName;\r\n\t\t}\r\n\t\tif (ParsedData.busStation.get(iPos).StreetName != null) {\r\n\t\t\ttxt_Huongve.setText(getString(R.string.street)+\" \"+ParsedData.busStation.get(iPos).StreetName \r\n\t\t\t\t\t\t\t\t+\" - \"+getString(R.string.tuyen_qua)+\" \"+ParsedData.busStation.get(iPos).Routes);\r\n\t\t}\r\n\t\t\r\n//\t\tlat = Double.valueOf(ParsedData.busStation.get(iPos).Position_X);\r\n//\t\tlng = Double.valueOf(ParsedData.busStation.get(iPos).Position_Y);\r\n//\t\tint fromLatitude = (int)(lat * 1E6);\r\n//\t\tint fromLongitude = (int)(lng * 1E6);\r\n\t\t//Log.d(\"te\", \"la\"+fromLatitude+\"lo\"+fromLongitude);\r\n\t\tmapView = (MapView) findViewById(R.id.mapview);\r\n\t\tmapView.setBuiltInZoomControls(true);\r\n\t\t\r\n\t\tmapOverlays = mapView.getOverlays();\r\n drawable = this.getResources().getDrawable(R.drawable.pinmarker1);\r\n\r\n\t\tmPoint = new GeoPoint(lat,lng);\r\n\t\titemizedOverlay = new MyItemizedOverlay(drawable, mapView);\r\n \r\n mapView.setBuiltInZoomControls(true);\r\n\t\tmapController = mapView.getController();\r\n\t\tmapController.setZoom(16); // Zoon 1 is world view\t\t\r\n\r\n\t\tsetGPSPosition();\r\n\t\titemizedOverlay.onTap(0);\r\n\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n\n MarkerOptions markerOptions =new MarkerOptions().position(x).title(\"abane ramdane\");\n CircleOptions circleOptions = new CircleOptions().center(x).radius(1000).fillColor(0xffffff0).strokeColor(0xffff0000).strokeWidth(2);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.house));\n mMap.addMarker(markerOptions);\n mMap.addCircle(circleOptions);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(x, 13));\n }",
"private void drawMarker(LatLng point){\n \tMarkerOptions markerOptions = new MarkerOptions();\t\t\t\t\t\n \t\t\n \t// Setting latitude and longitude for the marker\n \tmarkerOptions.position(point);\n \tmarkerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n \t// Adding marker on the Google Map\n \tmap.addMarker(markerOptions); \t\t\n }",
"private void addRouteMArkers()\n {\n //routeMarker.add(new MarkerOptions().position(new LatLng(geo1Dub,geo2Dub)));\n\n }",
"Place getPlace();",
"Builder addLocationCreated(Place.Builder value);",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n Context ctx = getApplicationContext();\n Configuration.getInstance().load(ctx, PreferenceManager.getDefaultSharedPreferences(ctx));\n //setting this before the layout is inflated is a good idea\n //it 'should' ensure that the map has a writable location for the map cache, even without permissions\n //if no tiles are displayed, you can try overriding the cache path using Configuration.getInstance().setCachePath\n //see also StorageUtils\n //note, the load method also sets the HTTP User Agent to your application's package name, abusing osm's\n //tile servers will get you banned based on this string\n\n //inflate and create the map\n\n\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n //Introduction\n super.onCreate(savedInstanceState);\n Configuration.getInstance().setUserAgentValue(\"OBP_Tuto/1.0\");\n setContentView(R.layout.activity_main);\n map = (MapView) findViewById(R.id.map);\n map.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.SHOW_AND_FADEOUT);\n map.setMultiTouchControls(true);\n GeoPoint startPoint = new GeoPoint(48.13, -1.63);\n IMapController mapController = map.getController();\n mapController.setZoom(10.0);\n mapController.setCenter(startPoint);\n\n //0. Using the Marker overlay\n Marker startMarker = new Marker(map);\n startMarker.setPosition(startPoint);\n startMarker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);\n startMarker.setTitle(\"Start point\");\n //startMarker.setIcon(getResources().getDrawable(R.drawable.marker_kml_point).mutate());\n //startMarker.setImage(getResources().getDrawable(R.drawable.ic_launcher));\n //startMarker.setInfoWindow(new MarkerInfoWindow(R.layout.bonuspack_bubble_black, map));\n startMarker.setDraggable(true);\n startMarker.setOnMarkerDragListener(new OnMarkerDragListenerDrawer());\n map.getOverlays().add(startMarker);\n\n NominatimPOIProvider poiProvider = new NominatimPOIProvider(\"OSMBonusPackTutoUserAgent\");\n ArrayList<POI> pois = poiProvider.getPOICloseTo(startPoint,\"cinema\" , 50, 0.1);\n FolderOverlay poiMarkers = new FolderOverlay(this);\n map.getOverlays().add(poiMarkers);\n\n Drawable poiIcon = getResources().getDrawable(R.drawable.marker_poi_default);\n for (POI poi:pois){\n Marker poiMarker = new Marker(map);\n poiMarker.setTitle(poi.mType);\n poiMarker.setSnippet(poi.mDescription);\n poiMarker.setPosition(poi.mLocation);\n poiMarker.setIcon(poiIcon);\n if (poi.mThumbnail != null){\n poiMarker.setImage(new BitmapDrawable(poi.mThumbnail));\n }\n poiMarkers.add(poiMarker);\n }\n\n }",
"public OceanEarthQuakeMarker(PointFeature feature) {\n super(feature);\n this.setOnLand(false);\n }",
"private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }",
"void mo5802a(LatLng latLng);",
"private void addMarker(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .setIcon(icon)\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n }",
"@Override\n public void onMapClick(LatLng latLng) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MapsActivity.this);\n //Set the title of the dialog.\n builder.setTitle(\"Create a new Marker\");\n\n final LatLng markerPoint = latLng;\n\n // Set up the input\n final EditText input = new EditText(MapsActivity.this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(input);\n\n // Set up the buttons\n builder.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Create a new marker with the Latitude and Longitude of the click event.\n MarkerOptions marker = new MarkerOptions().position(\n new LatLng(markerPoint.latitude, markerPoint.longitude)).title(input.getText().toString());\n mMap.addMarker(marker);\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Cancel\n dialog.cancel();\n }\n });\n\n builder.show();\n\n }",
"@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }",
"private void drawMarker(LatLng point){\n\t\tgoogleMap.clear();\t\t\r\n\t\t\r\n // Creating an instance of MarkerOptions\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point); \r\n \r\n // Setting title for the InfoWindow\r\n markerOptions.title(\"Position\");\r\n \r\n // Setting InfoWindow contents\r\n markerOptions.snippet(\"Latitude:\"+point.latitude+\",Longitude\"+point.longitude);\r\n // markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.));\r\n\r\n // Adding marker on the Google Map\r\n googleMap.addMarker(markerOptions);\r\n \r\n // Moving CameraPosition to the user input coordinates\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(point));\r\n\r\n // Setting the zoom level\r\n //googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); \r\n \r\n }"
]
| [
"0.66206324",
"0.640999",
"0.64072514",
"0.61771274",
"0.6173315",
"0.6163162",
"0.61309475",
"0.6074453",
"0.5966061",
"0.59122694",
"0.59065837",
"0.5889992",
"0.58440894",
"0.5815161",
"0.58141494",
"0.5811403",
"0.57892436",
"0.57525915",
"0.5739219",
"0.5712763",
"0.56993586",
"0.56971306",
"0.5695321",
"0.5694017",
"0.5692744",
"0.568968",
"0.56882256",
"0.568452",
"0.56633687",
"0.5659447",
"0.5649588",
"0.56466615",
"0.5622861",
"0.5618241",
"0.5614465",
"0.5608609",
"0.5600159",
"0.55995643",
"0.55986625",
"0.5597698",
"0.5591066",
"0.5589224",
"0.55871487",
"0.5584494",
"0.5576097",
"0.55699134",
"0.55685455",
"0.55684817",
"0.5567963",
"0.5567388",
"0.5564737",
"0.55587447",
"0.55560327",
"0.5548496",
"0.5542799",
"0.553945",
"0.55204535",
"0.55144674",
"0.55138296",
"0.5505097",
"0.5499752",
"0.5489657",
"0.54864347",
"0.5482401",
"0.5477819",
"0.54760796",
"0.54719955",
"0.5466642",
"0.5464627",
"0.5464627",
"0.5464627",
"0.5451016",
"0.5450421",
"0.5445586",
"0.543887",
"0.54319346",
"0.5425926",
"0.5419025",
"0.54140264",
"0.5406685",
"0.5403287",
"0.5397714",
"0.5392415",
"0.53912693",
"0.53869885",
"0.5383827",
"0.53827",
"0.5375799",
"0.53654015",
"0.53651845",
"0.53650457",
"0.53604007",
"0.53593874",
"0.5357848",
"0.5353345",
"0.53529656",
"0.53476375",
"0.53469056",
"0.53440416",
"0.5339551"
]
| 0.58533096 | 12 |
Check if Google Play Services is Available | public boolean isGooglePlayAvailable() {
GoogleApiAvailability api= GoogleApiAvailability.getInstance();
int isAvailable= api.isGooglePlayServicesAvailable(this);
if (isAvailable == ConnectionResult.SUCCESS) {
return true;
}else if (api.isUserResolvableError(isAvailable)){
Dialog dialog= api.getErrorDialog(this, isAvailable, 0);
dialog.show();
}else {
Toast.makeText(this,"Can't connect to Play Services",Toast.LENGTH_LONG).show();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkGooglePlayServices() {\n\t\tint status = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (D) {\n\t\t\tif (status == ConnectionResult.SUCCESS) {\n\t\t\t\t// Success! Do what you want\n\t\t\t\tLog.i(TAG, \"Google Play Services all good\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_MISSING) {\n\t\t\t\tLog.e(TAG, \"Google Play Services not in place\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {\n\t\t\t\tLog.e(TAG, \"Google Play Serivices outdated\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_DISABLED) {\n\t\t\t\tLog.e(TAG, \"Google Plauy Services disabled\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"Google Play Serivices invalid but wtf does that mean?\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"No way this is gonna happen\");\n\t\t\t}\n\t\t}\n\t}",
"public static boolean hasGooglePlayServices() {\n\t\tboolean isAvailable = false;\n\t\tint statusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext);\n\t\tif (statusCode == ConnectionResult.SUCCESS) {\n\t\t\tisAvailable = true;\n\t\t} else {\n\t\t\tisAvailable = false;\n\t\t}\n\t\treturn isAvailable;\n\t}",
"private boolean isGooglePlayServicesAvailable() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == status) {\n return true;\n } else {\n GooglePlayServicesUtil.getErrorDialog(status, this, 0).show();\n return false;\n }\n }",
"private void checkGooglePlayServiceSDK() {\n //To change body of created methods use File | Settings | File Templates.\n final int googlePlayServicesAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n Log.i(TAG, \"googlePlayServicesAvailable:\" + googlePlayServicesAvailable);\n\n switch (googlePlayServicesAvailable) {\n case ConnectionResult.SERVICE_MISSING:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n break;\n case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_SERVICE_UPDATE_REQUIRED);\n break;\n case ConnectionResult.SERVICE_DISABLED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_DISABLED);\n break;\n case ConnectionResult.SERVICE_INVALID:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_INVALID);\n break;\n }\n }",
"private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n\n return connectionStatusCode == ConnectionResult.SUCCESS;\n\n }",
"private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }",
"private boolean servicesAvailable() {\n int resultCode = GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == resultCode) {\n log(\"Google Play services is available\");\n return true;\n } else {\n log(\"Google Play services is not available\");\n showErrorDialog(resultCode);\n return false;\n }\n }",
"private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }",
"private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }",
"private boolean isGooglePlayServicesAvailable() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n return connectionStatusCode == ConnectionResult.SUCCESS;\r\n }",
"public boolean checkPlayServices() {\n\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n\n int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context);\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(resultCode)) {\n googleApiAvailability.getErrorDialog(context, resultCode,\n PLAY_SERVICES_REQUEST).show();\n PrintLog.e(TAG, \"checkPlayServices yes hai\");\n } else {\n PrintLog.e(TAG, \"checkPlayServices No hai\");\n Toast.makeText(context, \"This device is not supported.\", Toast.LENGTH_LONG).show();\n }\n return false;\n }\n return true;\n }",
"private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }",
"public boolean googleServicesAvailable() {\n GoogleApiAvailability api = GoogleApiAvailability.getInstance();\n int isAvailable = api.isGooglePlayServicesAvailable(this);\n\n if (isAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (api.isUserResolvableError(isAvailable)) {\n Dialog dialog = api.getErrorDialog(this, isAvailable, 0);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to play services\", Toast.LENGTH_LONG).show();\n }\n return false;\n }",
"public boolean isGooglePlayServicesAvailable() {\n final int connectionStatusCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n return false;\n } else if (connectionStatusCode != ConnectionResult.SUCCESS ) {\n return false;\n }\n return true;\n }",
"public boolean checkGooglePlayServices() {\r\n // Retrieve an instance of the GoogleApiAvailability object\r\n GoogleApiAvailability api = GoogleApiAvailability.getInstance();\r\n\r\n // Check whether the device includes GooglePlayServices\r\n int resultCode = api.isGooglePlayServicesAvailable(this);\r\n if (resultCode == ConnectionResult.SUCCESS) {\r\n // If it does, return true\r\n return true;\r\n } else if (api.isUserResolvableError(resultCode)) {\r\n // If Google Play Services are available to download to the user, show the error Dialog\r\n api.showErrorDialogFragment(this, resultCode, 9000);\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }",
"private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(getActivity(), resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Toast.makeText(getActivity(), \"This device is not supported by Google Play Services.\", Toast.LENGTH_SHORT).show();\n getActivity().finish();\n }\n return false;\n }\n return true;\n }",
"private boolean isGooglePlayServicesAvailable() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\r\n // If Google Play services is available\r\n if (ConnectionResult.SUCCESS == resultCode) {\r\n // In debug mode, log the status\r\n Log.d(\"Location Updates\", \"Google Play services is available.\");\r\n return true;\r\n } else {\r\n // Get the error dialog from Google Play services\r\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog( resultCode,\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n\r\n // If Google Play services can provide an error dialog\r\n if (errorDialog != null) {\r\n // Create a new DialogFragment for the error dialog\r\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\r\n errorFragment.setDialog(errorDialog);\r\n errorFragment.show(getFragmentManager(), \"Location Updates\");\r\n }\r\n\r\n return false;\r\n }\r\n }",
"public boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int status = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if (status != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(status)) {\n googleApiAvailability.getErrorDialog(this, status, 2404).show();\n }\n return false;\n }\n return true;\n }",
"public boolean checkPlayServices() {\n\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n\n int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context);\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(resultCode)) {\n googleApiAvailability.getErrorDialog(map_actvity,resultCode,\n PLAY_SERVICES_REQUEST).show();\n } else {\n showToast(\"This device is not supported.\");\n }\n return false;\n }\n return true;\n }",
"private boolean CheckGooglePlayServices() {\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int available = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if (available != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(available)) {\n googleApiAvailability.getErrorDialog(this, available,0).show();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\r\n\t\tGoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n\t\tint resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\r\n\t\tif (resultCode != ConnectionResult.SUCCESS) {\r\n\t\t\tif (apiAvailability.isUserResolvableError(resultCode)) {\r\n\t\t\t\tapiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\r\n\t\t\t\t\t\t.show();\r\n\t\t\t} else {\r\n\t\t\t\tLog.i(TAG, \"This device is not supported.\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(getApplicationContext(), \"This device is not supported.\", Toast.LENGTH_LONG).show();\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean isGooglePlayServicesAvailable() {\n\t\tint resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(\"Location Updates\", \"Google Play services is available.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Get the error dialog from Google Play services\n\t\t\tDialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t// If Google Play services can provide an error dialog\n\t\t\tif (errorDialog != null) {\n\t\t\t\t// Create a new DialogFragment for the error dialog\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(errorDialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), \"Location Updates\");\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(getContext());\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, getActivity(),\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(getContext(),\n \"This device is not supported.\", Toast.LENGTH_LONG)\n .show();\n getActivity().finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n Log.i(TAG, \"checkPlayServices \" + resultCode);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n\t\tint resultCode = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(context);\n\t\tif (resultCode != ConnectionResult.SUCCESS) {\n\t\t\tif (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n\t\t\t\tGooglePlayServicesUtil.getErrorDialog(resultCode, context,\n\t\t\t\t\t\tPLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\"This device is not supported.\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean checkGooglePlayServices() {\n int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mActivity);\n if (code != ConnectionResult.SUCCESS) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(code, mActivity, Constants.RequestCode.HANDLE_GMS,\n new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialogInterface) {\n mActivity.finish();\n }\n });\n if (dialog != null) {\n dialog.show();\n }\n\n return false;\n }\n\n return true;\n }",
"private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(mContext);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, (Activity)mContext,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(mContext,\n \"This device is not supported.\", Toast.LENGTH_LONG)\n .show();\n }\n return false;\n }\n return true;\n }",
"int isPlayServicesAvailable() {\n if (mGoogleApiAvailability_class != null) {\n String errorMsg;\n Throwable throwable;\n try {\n Method getInstance_method = mGoogleApiAvailability_class.getDeclaredMethod(\"getInstance\");\n Object googleApiAvailabilityInstance = getInstance_method.invoke(null);\n\n Method isPlayServicesAvailable_method = mGoogleApiAvailability_class.getDeclaredMethod(\n \"isGooglePlayServicesAvailable\", Context.class);\n Integer result = (Integer) isPlayServicesAvailable_method.invoke(googleApiAvailabilityInstance, mContext);\n Log.d(TAG, \"isPlayServicesAvailable(): isGooglePlayServicesAvailable returned: \" + result);\n switch (result) {\n case 0:\n //success\n return PLAY_SERVICES_AVAILABLE;\n case 2:\n //version update required\n return PLAY_SERVICES_SERVICE_VERSION_UPDATE_REQUIRED;\n default:\n //everything else\n return PLAY_SERVICES_UNAVAILABLE;\n }\n } catch (NoSuchMethodException e) {\n // in this case,\n errorMsg = \"isPlayServicesAvailable(): Unable to find method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (InvocationTargetException e) {\n errorMsg = \"isPlayServicesAvailable(): Unable to invoke method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (IllegalAccessException e) {\n errorMsg = \"isPlayServicesAvailable(): Unable to access method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (Exception e) {\n errorMsg = \"isPlayServicesAvailable(): Unknown error occurred.\";\n throwable = e;\n }\n Log.e(TAG, errorMsg, throwable);\n return PLAY_SERVICES_MAGNET_VERSION_INCOMPATIBILITY;\n } else {\n return PLAY_SERVICES_UNAVAILABLE;\n }\n }",
"private boolean checkPlayServices()\n {\n\tint resultCode=-5000;\n\ttry {\n\t\tresultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\tif (resultCode != ConnectionResult.SUCCESS)\n\t{\n\t if (GooglePlayServicesUtil.isUserRecoverableError(resultCode))\n\t {\n\t \tLog.i(Globals.TAG, \"dialog gorunecek\");\n\t \tGooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t \tLog.i(Globals.TAG, \"dialog kapandi\");\n\t }\n\t else\n\t {\n\t\t\tLog.i(Globals.TAG, \"This device is not supported.\");\n\t\t\tint RQS_GooglePlayServices = 1;\n\t\t\t GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);\n\t\t\tfinish();\n\t }\n\t return false;\n\t}\n\treturn true;\n }",
"private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(\"LoginActivity\", \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }",
"private boolean supportsGooglePlayServices() {\n return GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) ==\n ConnectionResult.SUCCESS;\n }",
"private boolean supportsGooglePlayServices() {\n return GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) ==\n ConnectionResult.SUCCESS;\n }",
"public boolean checkPlayServices(Activity a) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(a);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, a,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n }\n return false;\n }\n return true;\n }",
"public static boolean checkPlayServices(Context context) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, (Activity) context, resultCode);\n } else {\n Log.i(TAG, \"This device is not supported.\");\n }\n return false;\n }\n return true;\n }",
"private boolean servicesOK() {\n GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();\n int result = googleAPI.isGooglePlayServicesAvailable(this);\n if (result != ConnectionResult.SUCCESS) {\n if (googleAPI.isUserResolvableError(result)) {\n }\n return false;\n }\n return true;\n }",
"public boolean googleServiceCheck() {\n int isServiceAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (isServiceAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (GooglePlayServicesUtil.isUserRecoverableError(isServiceAvailable)) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isServiceAvailable, this, GPS_ERROR_DIALOG_REQUEST);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to Google Play Service\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }",
"private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason\n } else {\n return false;\n }\n }",
"private boolean servicesConnected(Activity activity) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n // Get the error dialog from Google Play services\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, activity, LocationFailureHandler.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n // If Google Play services can provide an error dialog\n if (errorDialog != null) {\n \terrorDialog.show();\n } else {\n }\n return false;\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n Log.d(Util.TAG_GOOGLE, \"\" + connectionStatusCode);\n // showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(\"Location Updates\",\n \"Google Play services is available.\");\n // Continue\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n return false;\n }\n }",
"private void acquireGooglePlayServices() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\r\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\r\n }\r\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }",
"private boolean servicesConnected() {\n\t\tint resultCode =\n\t\t\t\tGooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(LocationUtils.APPTAG, getString(R.string.play_services_available));\n\n\t\t\t// Continue\n\t\t\treturn true;\n\t\t\t// Google Play services was not available for some reason\n\t\t} else {\n\t\t\t// Display an error dialog\n\t\t\tDialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n\t\t\tif (dialog != null) {\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(dialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n\n // In debug mode, log the status\n Log.d(GeofenceUtils.APPTAG, getString(R.string.play_services_available));\n\n // Continue\n return true;\n\n // Google Play services was not available for some reason\n } else {\n\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), GeofenceUtils.APPTAG);\n }\n return false;\n }\n }",
"public void checkGplayServices(){\n Log.d(TAG, \"checkGplayServices: To check for token!\");\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n Toast.makeText(getApplicationContext(), \"Google Play Service is not install/enabled in this device!\", Toast.LENGTH_LONG).show();\n GooglePlayServicesUtil.showErrorNotification(resultCode, getApplicationContext());\n\n } else {\n Toast.makeText(getApplicationContext(), \"This device does not support for Google Play Service!\", Toast.LENGTH_LONG).show();\n }\n } else {\n Intent intent1;\n if(SharedPreferencesManage.getInstance().getToken()==null) {\n intent1 = new Intent(this, GCMRegistrationIntentService.class);\n startService(intent1);\n Log.d(TAG, \"user to be registered start service\");\n }else\n Log.d(TAG, \"already registered user with token: \"+SharedPreferencesManage.getInstance().getToken());\n\n }\n }",
"private boolean servicesConnected() {\n\t\tint resultCode = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(this);\n\t\tif (resultCode == ConnectionResult.SUCCESS) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(TAG, \"Google Play services is available.\");\n\t\t\tmGooglePlayServicesAvailable = true;\n\t\t} else {\n\t\t\tLog.e(TAG, \"could not connect to Google Play services, error \"\n\t\t\t\t\t+ String.valueOf(resultCode));\n\t\t\tmGooglePlayServicesAvailable = false;\n\t\t}\n\t\treturn mGooglePlayServicesAvailable;\n\t}",
"private boolean isEnablePlayService() {\n GoogleApiAvailability mGoogleAPI = GoogleApiAvailability.getInstance();\n int mResultCodeAPI = mGoogleAPI.isGooglePlayServicesAvailable(this);\n if(mResultCodeAPI!= ConnectionResult.SUCCESS) {\n if (mGoogleAPI.isUserResolvableError(mResultCodeAPI)) {\n mGoogleAPI.getErrorDialog(this, mResultCodeAPI, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n // device not support Google Play Services\n finish();\n }\n return false;\n }\n\n return true;\n }",
"private boolean servicesConnected() {\n\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(ClientSideUtils.APPTAG, getString(R.string.play_services_available));\n return true;\n \n } else {\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), ClientSideUtils.APPTAG);\n }\n return false;\n }\n }",
"public boolean servicesConnected() {\n\t\t// Check that Google Play services is available\n\t\tint resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(LocationUtils.APPTAG, getString(R.string.play_services_available));\n\t\t\t// Continue\n\t\t\treturn true;\n\t\t\t// Google Play services was not available for some reason\n\t\t} else {\n\t\t\t// Display an error dialog\n\t\t\tDialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n\t\t\tif (dialog != null) {\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(dialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean servicesConnected() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n }\n else {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), Constants.APPTAG);\n }\n return false;\n }\n }",
"public boolean isGoogleServicesWorking() {\n int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this);\n if (available == ConnectionResult.SUCCESS) {\n return true;\n } else if (GoogleApiAvailability.getInstance().isUserResolvableError(available)) {\n Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(this, available, ERROR_DIALOG_REQ);\n dialog.show();\n } else {\n Toast.makeText(this, \"You can't make map requests\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }",
"int isGcmAvailable() {\n if (mGoogleCloudMessaging_class != null) {\n return PLAY_SERVICES_AVAILABLE;\n }\n return PLAY_SERVICES_UNAVAILABLE;\n }",
"boolean hasIsGoogleCn();",
"private boolean isServiceOk(){\n Log.d(TAG, \"isServiceOk: checking google service version\");\n\n int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(FormularioCurso.this);\n\n if (available == ConnectionResult.SUCCESS){\n //Everything is fine and the user can make map request\n return true;\n } else if(GoogleApiAvailability.getInstance().isUserResolvableError(available)){\n //an error ocured but we can resolt it\n Log.d(TAG, \"isServiceOk: an error occures but we can fix it\");\n Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(FormularioCurso.this, available, ERROR_DIALOG_REQUEST);\n dialog.show();\n }else{\n Toast.makeText(this, \"You can't make map request\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }",
"boolean hasGoogleAds();",
"@java.lang.Override\n public boolean hasGoogleService() {\n return stepInfoCase_ == 24;\n }",
"@java.lang.Override\n public boolean hasGoogleService() {\n return stepInfoCase_ == 24;\n }",
"public boolean isGoogleMapsInstalled()\n {\n try\n {\n ApplicationInfo info = getPackageManager().getApplicationInfo(\"com.google.android.apps.maps\", 0 );\n return true;\n }\n catch(PackageManager.NameNotFoundException e)\n {\n return false;\n }\n }",
"@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }",
"boolean getIsGoogleCn();",
"boolean hasThirdPartyAppAnalytics();",
"boolean isBillingAvailable(String packageName);",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"boolean hasService();",
"private boolean isServiceAvailable() {\n if (mComponentName == null) {\n mComponentName = resolveAttentionService(mContext);\n }\n return mComponentName != null;\n }",
"void checkForAccServices();",
"public void check() {\n String provider = Settings.Secure.getString(context.getContentResolver(),\n Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.equals(\"\")) {\n checkConnectivity();\n } else {\n showDialog();\n }\n }",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"boolean isAvailable();",
"@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }",
"Boolean isAvailable();",
"@RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE)\n public static boolean isNetworkAvailable(Context cxt) {\n NetworkInfo network = getActiveNetworkInfo(cxt);\n return network != null && network.isConnected();\n }",
"private void checkLocationConnection() {\n LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n String message = \"\";\n\n // prepare output message to indicate whether location services are enabled\n try {\n message = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) ?\n \"Location Services are enabled!\" :\n \"Location Services are not enabled!\";\n } catch(Exception e) { e.printStackTrace(); }\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }",
"private boolean checkServiceIsRunning(){\r\n if (CurrentLocationUtil.isRunning()){\r\n doBindService();\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"public static void openGooglePlayServicesInGooglePlay(final Context context) {\n\t Uri uri = Uri.parse(\"market://details?id=com.google.android.gms\");\n\t Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);\n\t try {\n\t \tcontext.startActivity(myAppLinkToMarket);\n\t } catch (ActivityNotFoundException e) {\n\t Toast.makeText(context, \"Unable to find app in Google Play\", Toast.LENGTH_SHORT).show();\n\t }\n\t}",
"boolean hasSoftware();",
"private boolean serviceIsAvailable(String urlStr) {\r\n\r\n\t\tint respCode = 0;\r\n\t\tURL url;\r\n\t\tint testingTimeout = 3000;\r\n\t\t\r\n\t\ttry {\r\n\t\t\turl = new URL(urlStr);\r\n\r\n\t\t\tHttpURLConnection huc = (HttpURLConnection) url.openConnection();\r\n\t\t\thuc.setRequestMethod(\"POST\");\r\n\r\n\t\t\t/*\r\n\t\t\t * Time out set to 3 seconds, checked at 4 seconds, response should\r\n\t\t\t * be almost instant so this can be hardcoded in this method.\r\n\t\t\t */\r\n\t\t\thuc.setConnectTimeout(testingTimeout);\r\n\t\t\thuc.setReadTimeout(testingTimeout + 1000);\r\n\t\t\thuc.connect();\r\n\t\t\t\r\n\t\t\trespCode = huc.getResponseCode();\r\n\r\n\t\t\tif (this.debug) {\r\n\t\t\t\tprintln(\"Response code from \" + urlStr + \" is \" + respCode);\r\n\t\t\t}\r\n\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tprintln(\"MalformedURLException from \" + urlStr\r\n\t\t\t\t\t+ \" : Response code is \" + respCode);\r\n\t\t\treturn false;\r\n\t\t} catch (SocketTimeoutException s) {\r\n\t\t\tprintln(\"Timeout occurred when checking availability of Speech Synthesis service at...\\n\"\r\n\t\t\t\t\t+ urlStr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tprintln(\"IOException (other than Connection Timeout) from \" + urlStr\r\n\t\t\t\t\t+ \" is \" + respCode);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (respCode == 200) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"boolean hasFindGamesRequest();",
"private boolean isNetworkAvailable() {\n // Create a connectivity manager and\n // get the service type currently in use (Wi-fi, 3g etc)\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n // Get network info from the service\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // return true or false based on connection\n return (networkInfo != null)\n && networkInfo.isConnected()\n && networkInfo.isAvailable();\n }",
"public static boolean isServiceAvailable(Context context, String intentAction) {\n return new EmailServiceProxy(context, intentAction, null).test();\n }",
"public static boolean hasGMS(Context context) {\n return false;\n }",
"private static boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null;\n }",
"private static boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }",
"private void startStep1() {\n\n //Check whether this user has installed Google play service which is being used by Location updates.\n if (isGooglePlayServicesAvailable()) {\n\n //Passing null to indicate that it is executing for the first time.\n startStep2(null);\n\n } else {\n Toast.makeText(getApplicationContext(), R.string.no_google_playservice_available, Toast.LENGTH_LONG).show();\n }\n }",
"private void checkForCarServiceConnection() {\r\n synchronized (mLock) {\r\n if (mCarService != null) {\r\n return;\r\n }\r\n }\r\n IBinder iBinder = ServiceManager.checkService(\"car_service\");\r\n if (iBinder != null) {\r\n if (DBG) {\r\n Slog.d(TAG, \"Car service found through ServiceManager:\" + iBinder);\r\n }\r\n handleCarServiceConnection(iBinder);\r\n }\r\n }",
"@GuardedBy(\"mLock\")\n @VisibleForTesting\n boolean isServiceAvailableLocked() {\n if (mComponentName == null) {\n mComponentName = updateServiceInfoLocked();\n }\n return mComponentName != null;\n }"
]
| [
"0.8478294",
"0.8432101",
"0.8425624",
"0.84053487",
"0.8346497",
"0.8339842",
"0.832472",
"0.8321911",
"0.8321911",
"0.8319848",
"0.82806826",
"0.82593167",
"0.81504595",
"0.81444365",
"0.8137284",
"0.8136649",
"0.8136491",
"0.8127348",
"0.80944705",
"0.8080711",
"0.8066168",
"0.80609614",
"0.80449796",
"0.8044394",
"0.8031357",
"0.80294603",
"0.8017847",
"0.8017847",
"0.8002956",
"0.79961246",
"0.79883176",
"0.79799336",
"0.7949452",
"0.79463047",
"0.78855693",
"0.7838597",
"0.7838597",
"0.7826304",
"0.78126496",
"0.7762475",
"0.7743055",
"0.76775205",
"0.76767665",
"0.7646976",
"0.76318175",
"0.7617071",
"0.75737095",
"0.75737095",
"0.75737095",
"0.7535688",
"0.75284696",
"0.7513901",
"0.7508202",
"0.75066864",
"0.74861544",
"0.7444477",
"0.74177235",
"0.7362869",
"0.72433573",
"0.70574313",
"0.6916457",
"0.69081855",
"0.6881692",
"0.6770394",
"0.671375",
"0.63045156",
"0.6297581",
"0.62943304",
"0.6236785",
"0.6138302",
"0.61023545",
"0.61023545",
"0.61023545",
"0.61023545",
"0.61023545",
"0.6025946",
"0.5962574",
"0.5958288",
"0.59486824",
"0.59237295",
"0.59237295",
"0.59237295",
"0.59237295",
"0.58621067",
"0.58613116",
"0.58452696",
"0.57887083",
"0.5776814",
"0.5755124",
"0.57356936",
"0.5679682",
"0.5674506",
"0.5638385",
"0.56066453",
"0.5604268",
"0.56023014",
"0.5599739",
"0.558238",
"0.5580264",
"0.557927"
]
| 0.8106171 | 18 |
Getting last known Location | private void getLastKnownLocation() {
loc=LocationServices.FusedLocationApi.getLastLocation(client);
if (loc != null) {
Log.i("LOCATION: ",loc.toString());
myCurrentLocationMarker= gMap.addMarker(new MarkerOptions()
.position(new LatLng(loc.getLatitude(),loc.getLongitude()))
.title("My Current Location"));
currentLocCircle= gMap.addCircle(new CircleOptions()
.center(new LatLng(loc.getLatitude(),loc.getLongitude()))
.radius(1000)
.strokeColor(Color.GREEN)
.fillColor(Color.LTGRAY));
}
else {
AlertDialog.Builder builder= new AlertDialog.Builder(this);
builder.setTitle("Location Service not Active");
builder.setMessage("Please enable location service (GPS)");
builder.setPositiveButton("Settings", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
}
});
Dialog dialog=builder.create();
dialog.setCancelable(false);
dialog.show();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location getLastKnownLocation(){\n \t \tLocation loc = LocationUtil.getBestLastKnowLocation(ctx);\t\n \t \tStatus.getCurrentStatus().setLocation(loc);\t\n \t \treturn loc;\n \t}",
"@SuppressLint(\"MissingPermission\")//Assumes that is checked before calling\n private Location getLastLocation (){\n List<String> providers = mLocationManager.getProviders(true);\n Location loc=null;\n for (int i=0; i<providers.size() && loc==null;i++){\n loc = mLocationManager.getLastKnownLocation(providers.get(i));\n }\n return loc;\n }",
"public abstract Location getLastLocation();",
"public String getLastLocation() {\n return lastLocation;\n }",
"private Location getLastLocation() {\n try {\n return LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public Location getLastLocation() {\n\t\tif (mLocationClient.isConnected()) {\n\t\t\treturn mLocationClient.getLastLocation();\n\t\t}\n\t\treturn null;\n\t}",
"@SuppressLint(\"MissingPermission\")\n public Location getLastLocation() {\n this.context=context;\n if (isPermissionGranted()) {\n PrintLog.d(TAG, \"getLastLocation ..............: \");\n fusedLocationProviderClient.getLastLocation()\n .addOnCompleteListener(context, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n mLastLocation = task.getResult();\n String result = \"Last known Location Latitude is \" +\n mLastLocation.getLatitude() + \"\\n\" +\n \"Last known longitude Longitude is \" + mLastLocation.getLongitude();\n PrintLog.d(TAG, \"getLastLocation ..............: \" + result);\n\n if (mLastLocation != null) {\n mLastLocation = mLastLocation;\n locationFetchedCallback.onLocationFetched(mLastLocation);\n }\n\n } else {\n callCurrentLocation();\n PrintLog.d(TAG, \"No Last known location found. Try current location..!\");\n }\n }\n });\n\n\n return mLastLocation;\n } else\n checkpermission();\n return null;\n }",
"public static Location getLatestLocation(){\n if(latestLocation!= null) {\n return latestLocation;\n }else{\n return null;\n }\n }",
"public Location getLocation() {\n\n if (isPermissionGranted()) {\n try\n {\n\n lastKnownLocation = LocationServices.FusedLocationApi\n .getLastLocation(googleApiClient);\n\n Log.e(TAG, \"getLocation: LAST KNOWN LOCATION\" + (lastKnownLocation==null));\n return lastKnownLocation;\n }\n catch (SecurityException e)\n {\n e.printStackTrace();\n }\n }\n\n return null;\n\n }",
"public Location getLastLocation() {\n return LocationServices.FusedLocationApi.getLastLocation(\n mGoogleApiClient);\n }",
"@SuppressWarnings(\"MissingPermission\")\n private void getLastLocation() {\n mFusedLocationClient.getLastLocation()\n .addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n mLastLocation = task.getResult();\n getWeather(mLastLocation);\n } else {\n Log.w(TAG, \"getLastLocation:exception\", task.getException());\n showSnackbar(getString(R.string.no_location_detected));\n }\n }\n });\n }",
"private void fetchLastLocation() {\n try {\n FusedLocationProviderClient fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n //get last known location of device\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n //store current location\n currentLocation = location;\n Toast.makeText(MapsActivity.this, currentLocation.getLatitude() + \" \" + currentLocation.getLongitude(), Toast.LENGTH_SHORT).show();\n // Obtain the SupportMapFragment\n supportMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_content);\n // Attach OnMapReadyCallback listener using getMapAsync(OnMapReadyCallback)\n // This listener notified when the map is ready by invoking onMapReady along with a GoogleMap object.\n supportMapFragment.getMapAsync(MapsActivity.this);\n } else {\n Toast.makeText(MapsActivity.this, \"No Location recorded\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"public void getLastLocation() {\n FusedLocationProviderClient locationClient = getFusedLocationProviderClient(this);\r\n\r\n locationClient.getLastLocation()\r\n .addOnSuccessListener(new OnSuccessListener<Location>() {\r\n @Override\r\n public void onSuccess(Location location) {\r\n // GPS location can be null if GPS is switched off\r\n if (location != null) {\r\n onLocationChanged(location);\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Log.d(\"MapDemoActivity\", \"Error trying to get last GPS location\");\r\n e.printStackTrace();\r\n }\r\n });\r\n }",
"public Location getLocation() {\n try {\n initLocation();\n Location location = locationManager.getLastKnownLocation(locationProviderName);\n if (location == null) {\n Logger.e(\"Cannot obtain location from provider \" + locationProviderName);\n return new Location(\"unknown\");\n }\n return location;\n } catch (IllegalArgumentException e) {\n Logger.e(\"Cannot obtain location\", e);\n return new Location(\"unknown\");\n }\n }",
"private void getLastKnownLocation()\n {\n Log.d(\"TAG\", \"getLastKnownLocation()\");\n if ( checkPermission() )\n {\n lastLocation = LocationServices.FusedLocationApi.getLastLocation(googleApiClient);\n if ( lastLocation != null )\n {\n Log.i(\"TAG\", \"LasKnown location. \" + \"Long: \" + lastLocation.getLongitude() + \" | Lat: \" + lastLocation.getLatitude());\n writeLastLocation();\n startLocationUpdates();\n }\n else\n {\n Log.w(\"TAG\", \"No location retrieved yet\");\n startLocationUpdates();\n }\n }\n else askPermission();\n }",
"public Location getCurrentLocation();",
"public void getLastLocation() {\n FusedLocationProviderClient locationClient = getFusedLocationProviderClient(this);\n\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // 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 Toast.makeText(this, \"Permissions Not Granted \", Toast.LENGTH_SHORT).show();\n // return;\n }\n locationClient.getLastLocation()\n .addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // GPS location can be null if GPS is switched off\n if (location != null) {\n onLocationChanged(location);\n findNearbyHospitals(location);\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"MapDemoActivity\", \"Error trying to get last GPS location\");\n e.printStackTrace();\n }\n });\n }",
"public Location getLocation() {\n return getLocation(null);\n }",
"public google.maps.fleetengine.v1.VehicleLocation getLastLocation() {\n if (lastLocationBuilder_ == null) {\n return lastLocation_ == null ? google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() : lastLocation_;\n } else {\n return lastLocationBuilder_.getMessage();\n }\n }",
"private Location getLastKnownLocation(LocationManager mLocationManager) {\n List<String> providers = mLocationManager.getProviders(true);\n Location bestLocation = null;\n for (String provider : providers) {\n Location l = mLocationManager.getLastKnownLocation(provider);\n if (l == null) {\n continue;\n }\n if (bestLocation == null || l.getAccuracy() < bestLocation.getAccuracy()) {\n // Found best last known location: %s\", l);\n bestLocation = l;\n }\n }\n return bestLocation;\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.VehicleLocation getLastLocation() {\n return lastLocation_ == null ? google.maps.fleetengine.v1.VehicleLocation.getDefaultInstance() : lastLocation_;\n }",
"private void getLastKnownLocation() {\n Log.d(TAG, \"getLastKnownLocation()\");\n if (checkPermission()) {\n if (lastLocation != null) {\n Log.i(TAG, \"LasKnown location. \" +\n \"Long: \" + lastLocation.getLongitude() +\n \" | Lat: \" + lastLocation.getLatitude());\n\n markerLocation(new LatLng(lastLocation.getLatitude(), lastLocation.getLongitude()));\n\n } else {\n Log.w(TAG, \"No location retrieved yet\");\n }\n } else askPermission();\n }",
"private void getLastKnownLocation(final OnResultListener callback) {\n try {\n getLocationProvider().getLastLocation()\n .addOnSuccessListener(location -> callback.onResult(location))\n .addOnCanceledListener(() -> callback.onResult(null))\n .addOnFailureListener(exception -> callback.onResult(null));\n } catch (SecurityException e) {\n callback.onResult(null);\n }\n }",
"@SuppressWarnings({\"MissingPermission\"})\n public void getLastLocation() {\n if (isLocationEnabled()) {\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // GPS location can be null if GPS is switched off\n if (location != null) {\n Toast.makeText(getContext(), \"location: \" + location, Toast.LENGTH_LONG).show();\n EventBus.getDefault().post(new LocationEvent(location));\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"MapDemoActivity\", \"Error trying to get last GPS location\");\n e.printStackTrace();\n }\n });\n }\n }",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"private void setLastLocation() {\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n // Permission has already been granted\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n lastLatitude = Double.toString(location.getLatitude());\n lastLongitude = Double.toString(location.getLongitude());\n //lastLocation = Double.toString(location.getLatitude()) + \",\" + Double.toString(location.getLongitude()) ;\n //String b = lastLocation;\n // Get into right format\n // Logic to handle location object\n }\n }\n });\n }\n }",
"@Nullable\n public Location getCurrentLocation() {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return null;\n }\n LocationManager mLocationManager = (LocationManager) getActivity().getApplicationContext().getSystemService(Context.LOCATION_SERVICE);\n List<String> providers = mLocationManager.getProviders(true);\n Location bestLocation = null;\n for (String provider : providers) {\n Location l = mLocationManager.getLastKnownLocation(provider);\n if (l == null) {\n continue;\n }\n if (bestLocation == null || l.getAccuracy() < bestLocation.getAccuracy()) {\n // Found best last known location: %s\", l);\n bestLocation = l;\n }\n }\n return bestLocation;\n }",
"@SuppressLint(\"MissingPermission\")\n private void getLastLocation() {\n if (checkPermissions()) {\n\n // check if location is enabled\n if (isLocationEnabled()) {\n\n // getting last\n // location from\n // FusedLocationClient\n // object\n mFusedLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n Location location = task.getResult();\n if (location == null) {\n requestNewLocationData();\n } else {\n setUserCurrentLocation(location);\n }\n }\n });\n } else {\n Toast.makeText(this, \"Please turn on\" + \" your location...\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n }\n } else {\n // if permissions aren't available,\n // request for permissions\n requestPermissions();\n }\n }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"java.lang.String getLocation();",
"public Location getLastKnownLocation(String provider){\n\t\tif(provider.equals(GPS_PROVIDER)){\n\t\t\treturn locyNavigator.getLocation();\n\t\t}else\n\t\t\treturn null;\n\n\t}",
"@SuppressWarnings(\"unused\")\n Location getCurrentLocation();",
"private void getLocation() { \n LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); \n Criteria criteria = new Criteria(); \n criteria.setAccuracy(Criteria.ACCURACY_FINE); \n criteria.setAltitudeRequired(false); \n criteria.setBearingRequired(false); \n criteria.setCostAllowed(true);\n criteria.setPowerRequirement(Criteria.POWER_LOW); \n String provider = locationManager.getBestProvider(criteria,true); \n \n //In order to make sure the device is getting location, request updates. locationManager.requestLocationUpdates(provider, 1, 0, this); \n mostRecentLocation = locationManager.getLastKnownLocation(provider); \n }",
"URI getLocation();",
"public URI getLocation()\r\n/* 293: */ {\r\n/* 294:441 */ String value = getFirst(\"Location\");\r\n/* 295:442 */ return value != null ? URI.create(value) : null;\r\n/* 296: */ }",
"@SuppressLint(\"MissingPermission\")\n private void getLastLocation() {\n if (checkPermissions()) {\n\n // check if location is enabled\n if (isLocationEnabled()) {\n\n // getting last\n // location from\n // FusedLocationClient\n // object\n mFusedLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull com.google.android.gms.tasks.Task<Location> task) {\n Location location = task.getResult();\n if (location == null) {\n requestNewLocationData();\n } else {\n// latitudeTextView.setText(location.getLatitude() + \"\");\n// longitTextView.setText(location.getLongitude() + \"\");\n\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n address=\"\"+latitude+\",\"+longitude;\n\n// googleMap.addMarker(new MarkerOptions()\n// .position(new LatLng(latitude, longitude))\n// .title(\"Marker\"));\n Log.i(TAG, \"onCreate: latitude => \"+ latitude);\n Log.i(TAG, \"onCreate: longitude => \"+ longitude);\n }\n }\n });\n } else {\n Toast.makeText(this, \"Please turn on\" + \" your location...\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n }\n } else {\n // if permissions aren't available,\n // request for permissions\n requestPermissions();\n }\n }",
"SiteLocation getLocatedAt();",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = location;\n Log.d(TAG, \"Latitude: \" + mLastKnownLocation.getLatitude());\n Log.d(TAG, \"Longitude: \" + mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n }\n\n getCurrentPlaceLikelihoods();\n }\n });\n }\n } catch (Exception e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n showCurrentPlace();\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public double getLastLatitude(){\n if(location != null){\n lastLatitude = location.getLatitude();\n }else{\n lastLatitude = longitude;\n }\n return lastLatitude;\n }",
"public final Location getLocation() {\n\t\treturn location.clone();\n\t}",
"public java.lang.String getLocation() {\n return location;\n }",
"public BwLocation getLocation() {\n if (location == null) {\n location = BwLocation.makeLocation();\n }\n\n return location;\n }",
"com.google.ads.googleads.v14.common.LocationInfo getLocation();",
"public java.lang.String getLocation() {\n return location;\n }",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = location;\n Log.d(TAG, \"Latitude: \" + mLastKnownLocation.getLatitude());\n Log.d(TAG, \"Longitude: \" + mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n }\n\n }\n });\n }\n } catch (Exception e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public Location checkLastLocationClicked()\n {\n Location loc = lastLocationClicked;\n lastLocationClicked = null;\n return loc;\n }",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n currLatLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n destinationPoint.set(0,currLatLng);\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n currLatLng = mDefaultLocation;\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public final String getLocation() {\n return location;\n }",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(mActivity, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public LocationObject getLocate() {\n LocationObject responseObject = new LocationObject();\n\n SdkObject sdkObject = checkPermission(API_LOCATION_PERMISSION);\n if (sdkObject != null) {\n responseObject.setMessage(sdkObject.getMessage());\n responseObject.setBusinessCode(sdkObject.getBusinessCode());\n return responseObject;\n }\n\n long lastSdkLocateTime = PreferencesUtils.getLong(context, CommonConstants.SP_LAST_GET_LOCATION_TIME, 0L);\n if (System.currentTimeMillis() - lastSdkLocateTime < 1000L) { //Ignore call within 60 second\n responseObject.setBusinessCode(QueryResult.GET_LOCATION_TOO_FAST.getCode());\n responseObject.setMessage(QueryResult.GET_LOCATION_TOO_FAST.getMsg());\n Log.w(TAG, QueryResult.GET_LOCATION_TOO_FAST.getMsg());\n return responseObject;\n }\n\n PreferencesUtils.putLong(context, CommonConstants.SP_LAST_GET_LOCATION_TIME, System.currentTimeMillis());\n\n responseObject = getLocationInfo();\n if (responseObject.getBusinessCode() == ResultCode.SUCCESS.getCode()) {\n responseObject.setLastLocateTime(System.currentTimeMillis());\n }\n return responseObject;\n }",
"private void getDeviceLocation() {\n /*\n * Get the best and most recent location of the device, which may be null in rare\n * cases when a location is not available.\n */\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public Location getLocation() {\n\t\treturn location.clone();\n\t}",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public static MapLocation myLocation() {\n return RC.getLocation();\n }",
"public String getLocation(){\r\n return Location;\r\n }",
"@java.lang.Override\n public google.maps.fleetengine.v1.VehicleLocationOrBuilder getLastLocationOrBuilder() {\n return getLastLocation();\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public int getCurrentLocation() {\n\t\treturn currentLocation;\n\t}",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"public int getLocation()\r\n {\n }",
"public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}",
"public String getLocation()\n {\n return location;\n }",
"public Location getLocation()\n\t{\n\t\treturn l;\n\t}",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public String getCurrentLocation() {\n return currentLocation;\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public String getLocation() {\n return location;\n }",
"public Location getCurrentLocation()\n\t{\n\t\treturn currentLocation;\n\t}",
"private void getDeviceLocation(){\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if (mLocationPermissionsGranted) {\n\n final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n\n Location currentLocation = (Location) task.getResult();\n\n if (currentLocation == null) {\n\n // Provide default current location\n\n currentLocation = new Location(\"\");\n currentLocation.setLatitude(51.454514);\n currentLocation.setLongitude(-2.587910);\n }\n\n } else {\n Helpers.showToast(getApplicationContext(), \"Could not get current location\");\n }\n }\n });\n }\n } catch (SecurityException e) {\n Helpers.showToast(getApplicationContext(), \"Could not get current location\");\n }\n }",
"private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task locationResult = fusedLocationClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(TAG,\"Current location is null. Using defaults.\");\n Log.e(TAG, task.getException().toString());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch(SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"public String getLocation() {\n\t\treturn location;\n\t}",
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }"
]
| [
"0.8755016",
"0.83392113",
"0.82366943",
"0.8056533",
"0.79321563",
"0.7913264",
"0.7795655",
"0.7768245",
"0.773269",
"0.76724017",
"0.7652249",
"0.76392454",
"0.7621704",
"0.7621704",
"0.7621704",
"0.7621704",
"0.7584933",
"0.75614756",
"0.75516367",
"0.7517914",
"0.74732375",
"0.74538964",
"0.7437745",
"0.7414346",
"0.73810285",
"0.7378166",
"0.7358324",
"0.73565274",
"0.7350712",
"0.7350712",
"0.7350712",
"0.7250832",
"0.7223074",
"0.7220749",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7182696",
"0.7147689",
"0.71305186",
"0.70715994",
"0.7071383",
"0.7069533",
"0.7065278",
"0.7064081",
"0.70133173",
"0.7006482",
"0.7004401",
"0.6981751",
"0.69793844",
"0.6960157",
"0.6959103",
"0.69576347",
"0.6955935",
"0.694598",
"0.69456345",
"0.6929286",
"0.69214326",
"0.69098955",
"0.6907702",
"0.68968105",
"0.68703043",
"0.68650097",
"0.68537897",
"0.68452305",
"0.68389785",
"0.68331504",
"0.6827462",
"0.682362",
"0.68193746",
"0.68172884",
"0.681547",
"0.68131393",
"0.6809546",
"0.68084687",
"0.6803952",
"0.67992413",
"0.67973036",
"0.6796115",
"0.67858046",
"0.6774318",
"0.67682",
"0.6767047",
"0.67622864",
"0.67622864",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003",
"0.6759003"
]
| 0.0 | -1 |
public static final String COL_8 = "LOCATION"; public static final String COL_8 = "DATEORDER"; | public DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}",
"private static String db2selectFields() {\n return \"ID, EXTERNAL_ID, CREATED, CLAIMED, COMPLETED, MODIFIED, PLANNED, RECEIVED, DUE, NAME, \"\n + \"CREATOR, DESCRIPTION, NOTE, PRIORITY, MANUAL_PRIORITY, STATE, CLASSIFICATION_CATEGORY, \"\n + \"TCLASSIFICATION_KEY, CLASSIFICATION_ID, \"\n + \"WORKBASKET_ID, WORKBASKET_KEY, DOMAIN, \"\n + \"BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, OWNER, POR_COMPANY, POR_SYSTEM, \"\n + \"POR_INSTANCE, POR_TYPE, POR_VALUE, IS_READ, IS_TRANSFERRED, CUSTOM_1, CUSTOM_2, \"\n + \"CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, CUSTOM_9, CUSTOM_10, \"\n + \"CUSTOM_11, CUSTOM_12, CUSTOM_13, CUSTOM_14, CUSTOM_15, CUSTOM_16, \"\n + \"CUSTOM_INT_1, CUSTOM_INT_2, CUSTOM_INT_3, CUSTOM_INT_4, CUSTOM_INT_5, \"\n + \"CUSTOM_INT_6, CUSTOM_INT_7, CUSTOM_INT_8\"\n + \"<if test=\\\"addClassificationNameToSelectClauseForOrdering\\\">, CNAME</if>\"\n + \"<if test=\\\"addAttachmentClassificationNameToSelectClauseForOrdering\\\">, ACNAME</if>\"\n + \"<if test=\\\"addAttachmentColumnsToSelectClauseForOrdering\\\">\"\n + \", ACLASSIFICATION_ID, ACLASSIFICATION_KEY, CHANNEL, REF_VALUE, ARECEIVED\"\n + \"</if>\"\n + \"<if test=\\\"addWorkbasketNameToSelectClauseForOrdering\\\">, WNAME</if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">, ULONG_NAME </if>\";\n }",
"private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),DBSAResourceBundle.res.getString(\"mark\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"duplicate\"), \"dlsName\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}",
"java.lang.String getField1308();",
"java.lang.String getField1833();",
"java.lang.String getField1208();",
"java.lang.String getField1209();",
"java.lang.String getField1309();",
"java.lang.String getField1231();",
"java.lang.String getField1883();",
"java.lang.String getField1809();",
"java.lang.String getField1808();",
"java.lang.String getField1508();",
"java.lang.String getField1708();",
"java.lang.String getField1206();",
"java.lang.String getField1313();",
"java.lang.String getField1409();",
"java.lang.String getField1221();",
"java.lang.String getField1709();",
"java.lang.String getField1312();",
"java.lang.String getField1509();",
"java.lang.String getField1207();",
"java.lang.String getField1230();",
"java.lang.String getField1306();",
"java.lang.String getField1303();",
"java.lang.String getField1812();",
"java.lang.String getField1311();",
"java.lang.String getField1282();",
"java.lang.String getField1871();",
"java.lang.String getField1315();",
"java.lang.String getField1382();",
"java.lang.String getField1216();",
"java.lang.String getField1830();",
"java.lang.String getField1318();",
"java.lang.String getField1302();",
"java.lang.String getField1813();",
"java.lang.String getField1218();",
"java.lang.String getField1272();",
"java.lang.String getField1362();",
"java.lang.String getField1050();",
"java.lang.String getField1381();",
"java.lang.String getField1383();",
"java.lang.String getField1260();",
"java.lang.String getField1203();",
"java.lang.String getField1821();",
"java.lang.String getField1706();",
"java.lang.String getField1202();",
"java.lang.String getField1772();",
"public String getFieldValueStringDate(int row, String colName) {\r\n // row = this.getActualRow(row);\r\n try {\r\n if (colName.equalsIgnoreCase(\"A_TIME\")) {\r\n colName = \"A_O_TIME\";\r\n }\r\n String date = (String) ((ArrayList) hMap.get(colName)).get(row);\r\n return date;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n\r\n }",
"@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder= new ArrayList<String>();\n FieldOrder.add(\"dsapiVersionNo\");\n FieldOrder.add(\"sessionId\");\n FieldOrder.add(\"valueMark\");\n FieldOrder.add(\"fieldMark\");\n return FieldOrder;\n }",
"java.lang.String getField1263();",
"java.lang.String getField1513();",
"java.lang.String getField1204();",
"public interface Columns {\r\n public static final String LOGIN_ID = \"login_id\";\r\n public static final String PASSWORD = \"password\";\r\n public static final String ADDRESS = \"address\";\r\n public static final String FEE = \"fee\";\r\n public static final String GRACE_PERIOD = \"grace_period\";\r\n public static final String USEREMAIL = \"user_email\";\r\n }",
"java.lang.String getField1852();",
"java.lang.String getField1233();",
"java.lang.String getField1213();",
"java.lang.String getField1372();",
"java.lang.String getField1317();",
"java.lang.String getField1803();",
"java.lang.String getField1831();",
"java.lang.String getField1224();",
"java.lang.String getField1392();",
"java.lang.String getField1259();",
"java.lang.String getField1284();",
"java.lang.String getField1892();",
"java.lang.String getField1730();",
"java.lang.String getField1261();",
"java.lang.String getField1882();",
"java.lang.String getField1430();",
"java.lang.String getField1572();",
"java.lang.String getField1872();",
"java.lang.String getField1801();",
"java.lang.String getField1811();",
"java.lang.String getField1890();",
"java.lang.String getField1112();",
"java.lang.String getField1851();",
"java.lang.String getField1512();",
"interface PlaceDetailsColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_ADDRESS = \"address\";\n\t\tString PLACE_PHONE = \"phone\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_RATING = \"rating\";\n\t\tString PLACE_URL = \"url\";\n\t\tString PLACE_WEBSITE = \"website\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}",
"java.lang.String getField1721();",
"java.lang.String getField1113();",
"java.lang.String getField1783();",
"java.lang.String getField1802();",
"java.lang.String getField1238();",
"java.lang.String getField1503();",
"java.lang.String getField1390();",
"java.lang.String getField1806();",
"private LocalDate get_DATE(int column) {\n // DATE column is always 10 chars long\n String dateString = dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n 10, charset_[column - 1]).toString();\n return LocalDate.parse(dateString, DRDAConstants.DB2_DATE_FORMAT);\n// return DateTime.dateBytesToDate(dataBuffer_,\n// columnDataPosition_[column - 1],\n// cal,\n// charset_[column - 1]);\n }",
"java.lang.String getField1130();",
"java.lang.String getField1365();",
"java.lang.String getField1521();",
"java.lang.String getField1713();",
"java.lang.String getField1064();",
"java.lang.String getField1403();",
"java.lang.String getField1782();",
"java.lang.String getField1371();",
"java.lang.String getField1292();",
"java.lang.String getField1881();",
"java.lang.String getField1991();",
"java.lang.String getField1310();",
"public interface Columns {\r\n public static final String USERNAME = \"username\";\r\n public static final String EMAIL = \"email\";\r\n public static final String PW = \"password\";\r\n public static final String TIME = \"create_time\";\r\n public static final String AUTHORITY = \"authority_id\";\r\n }"
]
| [
"0.5553979",
"0.54839283",
"0.544515",
"0.5442534",
"0.54409695",
"0.5417618",
"0.5389076",
"0.53787166",
"0.533437",
"0.53323394",
"0.53298783",
"0.53162223",
"0.5313954",
"0.53033984",
"0.52903324",
"0.5287484",
"0.52810025",
"0.52790016",
"0.5276485",
"0.5273599",
"0.52659565",
"0.52577305",
"0.5257723",
"0.52511996",
"0.5244891",
"0.52391785",
"0.5237279",
"0.5236258",
"0.5236164",
"0.52357036",
"0.5235339",
"0.52171147",
"0.5215687",
"0.5214066",
"0.521236",
"0.521093",
"0.5210307",
"0.52093405",
"0.52040905",
"0.51985985",
"0.51969117",
"0.5194932",
"0.5194276",
"0.519327",
"0.5190954",
"0.5185248",
"0.5184878",
"0.51817477",
"0.51799667",
"0.51797205",
"0.5178591",
"0.5173597",
"0.51698434",
"0.51691145",
"0.51668346",
"0.5166374",
"0.51652765",
"0.51648635",
"0.5162644",
"0.5162569",
"0.5160849",
"0.5159624",
"0.51593506",
"0.51585215",
"0.51583385",
"0.5157779",
"0.51574755",
"0.5155811",
"0.515554",
"0.51552075",
"0.515508",
"0.5154753",
"0.5153441",
"0.5152444",
"0.5152208",
"0.51521444",
"0.5151936",
"0.5150997",
"0.5149346",
"0.51482296",
"0.5146567",
"0.51462644",
"0.51460135",
"0.5145801",
"0.5145314",
"0.51452285",
"0.51451635",
"0.51446706",
"0.51441497",
"0.51441354",
"0.51441044",
"0.51440275",
"0.5142587",
"0.51409763",
"0.51405823",
"0.51403594",
"0.5139717",
"0.5139179",
"0.5139115",
"0.5137878",
"0.5136444"
]
| 0.0 | -1 |
The type of request. | @Property
public native MintRequestType getRequestType (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"public String getRequestType() { return this.requestType; }",
"public java.lang.String getRequestType() {\n return requestType;\n }",
"public static String getRequestType(){\n return requestType;\n }",
"public RequestType getRequestType(){\n\t\t\treturn this.type;\n\t\t}",
"public String getRequestType() {\r\n return (String) getAttributeInternal(REQUESTTYPE);\r\n }",
"public ZserioType getRequestType()\n {\n return requestType;\n }",
"public int getReqType()\r\n {\r\n return safeConvertInt(getAttribute(\"type\"));\r\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }",
"public teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType() {\n teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type result = teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.valueOf(type_);\n return result == null ? teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type.UNRECOGNIZED : result;\n }",
"@ApiModelProperty(example = \"PostAuthTransaction\", required = true, value = \"Object name of the secondary transaction request.\")\n\n public String getRequestType() {\n return requestType;\n }",
"@Override\n\tpublic String getRequestType() {\n\t\treturn null;\n\t}",
"public void setRequestType(java.lang.String requestType) {\n this.requestType = requestType;\n }",
"@Override public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"public SchemaType getRequestSchemaType()\n {\n return requestSchemaType;\n }",
"@Override\n public io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType getType() {\n @SuppressWarnings(\"deprecation\")\n io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType result = io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.valueOf(type_);\n return result == null ? io.emqx.exhook.ClientAuthorizeRequest.AuthorizeReqType.UNRECOGNIZED : result;\n }",
"public void setRequestType(RequestType requestType) {\n this.requestType = requestType;\n }",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"teledon.network.protobuffprotocol.TeledonProtobufs.TeledonRequest.Type getType();",
"public proto.MessagesProtos.ClientRequest.MessageType getType() {\n\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\tproto.MessagesProtos.ClientRequest.MessageType result = proto.MessagesProtos.ClientRequest.MessageType.valueOf(type_);\n\t\t\t\treturn result == null ? proto.MessagesProtos.ClientRequest.MessageType.UNRECOGNIZED : result;\n\t\t\t}",
"public proto.MessagesProtos.ClientRequest.MessageType getType() {\n\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\tproto.MessagesProtos.ClientRequest.MessageType result = proto.MessagesProtos.ClientRequest.MessageType.valueOf(type_);\n\t\t\treturn result == null ? proto.MessagesProtos.ClientRequest.MessageType.UNRECOGNIZED : result;\n\t\t}",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"proto.MessagesProtos.ClientRequest.MessageType getType();",
"public void Request_type()\n {\n\t boolean reqtypepresent =reqtype.size()>0;\n\t if(reqtypepresent)\n\t {\n\t\t //System.out.println(\"Request type report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request type report is not present\");\n\t }\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"protected String getType() {\n\t\treturn type;\n\t}",
"public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\r\n\t\treturn type;\r\r\n\t}",
"public final String type() {\n return type;\n }",
"public String getType()\n\t{\n\t\treturn type;\n\t}",
"public int getType()\n\t{\n\t\treturn type;\n\t}",
"public String type(){\n\t\treturn type;\n\t}",
"public int getType() {\n\t return type;\n\t }",
"public String getType() {\r\n\t\treturn type_;\r\n\t}",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n\t\treturn type;\r\n\t}",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType () {\n return type;\n }",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n\t\treturn type;\n\t}",
"public int getType()\r\n\t{\r\n\t\treturn type;\r\n\t}",
"public String getType() {\r\n return type;\r\n }",
"public String getType()\r\n {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public void setRequestType(String value) {\r\n setAttributeInternal(REQUESTTYPE, value);\r\n }",
"public static String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public String getType() {\r\n return type;\r\n }",
"public boolean hasRequestType() {\n return result.hasRequestType();\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n return type_;\n }",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType() {\n\t\treturn type;\n\t}",
"public int getType(){\r\n\t\treturn type;\r\n\t}",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType(){\n\t\treturn type;\n\t}",
"public String getType(){\n\t\treturn type;\n\t}",
"public int getType () {\n return type;\n }",
"public int getType () {\n return type;\n }",
"public int getType(){\n\t\treturn type;\n\t}",
"public int getType () {\r\n return type;\r\n }",
"public int type() {\n return type;\n }",
"public String getType() {\n return type; \n }",
"public int getType() {\r\n\t\treturn type;\r\n\t}",
"public int getType() {\r\n\t\treturn (type);\r\n\t}",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }",
"public String getType() {\n return type;\n }"
]
| [
"0.82906795",
"0.8287273",
"0.8237101",
"0.82215357",
"0.8198818",
"0.7929265",
"0.76403135",
"0.76335657",
"0.75475127",
"0.7532968",
"0.72635955",
"0.7120674",
"0.7054836",
"0.6882395",
"0.6874538",
"0.6861874",
"0.6861783",
"0.6837447",
"0.6829708",
"0.6723663",
"0.67146593",
"0.6709367",
"0.669328",
"0.66624117",
"0.6552416",
"0.6522781",
"0.6505039",
"0.6495533",
"0.6486068",
"0.6475969",
"0.6461119",
"0.64591724",
"0.6454225",
"0.644699",
"0.6444117",
"0.64402705",
"0.64382654",
"0.64382654",
"0.64382654",
"0.64352477",
"0.64352477",
"0.64352477",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6431439",
"0.6430067",
"0.6428548",
"0.6427297",
"0.64268786",
"0.64257",
"0.6423273",
"0.6419776",
"0.6419776",
"0.6419776",
"0.6419776",
"0.6419776",
"0.6408254",
"0.64076346",
"0.64076346",
"0.64076346",
"0.64076346",
"0.64076346",
"0.64072657",
"0.64072657",
"0.64071655",
"0.64071655",
"0.64071655",
"0.64071655",
"0.64071655",
"0.64071655",
"0.6404722",
"0.6399546",
"0.6399546",
"0.63979876",
"0.639489",
"0.639489",
"0.639301",
"0.639301",
"0.63900656",
"0.63890517",
"0.63873965",
"0.6386306",
"0.63847625",
"0.6380356",
"0.63770866",
"0.63770866",
"0.63770866",
"0.63770866",
"0.63770866",
"0.63770866",
"0.63770866",
"0.63770866"
]
| 0.0 | -1 |
A description with information about the request, such as a value when something has gone wrong or a notification. | @Property
public native String getDescriptionResult (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}",
"@ApiModelProperty(value = \"Purpose for which the token was requested.\")\n public String getDescription() {\n return description;\n }",
"@Override\n public String getDescription() {\n return \"Arbitrary message\";\n }",
"public String getDescription() { return description; }",
"public String requestMessage() {\n return this.requestMessage;\n }",
"@Override\n\t\tpublic String getTimeoutMessage() {\n\t\t\treturn \"req\";\n\t\t}",
"@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}",
"public String getRequestReason() {\r\n return (String) getAttributeInternal(REQUESTREASON);\r\n }",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"java.lang.String getDescription();",
"public String getEventDescription() {\n\t\treturn description;\n\t}",
"@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}",
"public String getDescription() {\n return desc;\n }",
"public String getDescription() {\r\n return DESCRIPTION;\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getRequestMessage()\r\n/* 34: */ {\r\n/* 35:26 */ return this.requestMessage;\r\n/* 36: */ }",
"public String getDescription()\r\n\t{\r\n\t\treturn description;\r\n\t}",
"@Override\n public String getDescription() {\n return description;\n }",
"@Override\r\n\tpublic String getDescription() {\n\t\treturn this.description;\r\n\t}",
"public String getDescription() {\n return desc;\n }",
"@Override\n public String getServletInfo\n \n () {\n return \"Short description\";\n }",
"public String getDescription() {\n return ACTION_DETAILS[id][DESC_DETAIL_INDEX];\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription()\n {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"public String getDescription() {\n return description;\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }"
]
| [
"0.6941665",
"0.671574",
"0.65196013",
"0.64583015",
"0.64504683",
"0.6423692",
"0.6419628",
"0.64152294",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.6361921",
"0.63530755",
"0.63371694",
"0.6314944",
"0.62995934",
"0.6293299",
"0.62918925",
"0.6272318",
"0.6272286",
"0.62660235",
"0.6259106",
"0.6253299",
"0.62465954",
"0.6241932",
"0.6237065",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6233661",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117",
"0.6226117"
]
| 0.0 | -1 |
The result of the request. | @Property
public native MintResultState getResultState (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Result getResult() {\n return result;\n }",
"public Result getResult() {\n return result;\n }",
"public Result getResult() {\n\t\treturn this._result;\n\t}",
"public String getResult()\n {\n return result;\n }",
"public String getResult()\r\n\t{\r\n\t\treturn result;\r\n\t}",
"public String getResult() {\n return result;\n }",
"public String getResult() {\n return result;\n }",
"public String getResult() {\n return result;\n }",
"@Override\n\tpublic Result getResult() {\n\t\treturn m_Result;\n\t}",
"Result getResult();",
"public String getResult() {\n return mResult;\n }",
"public T result() {\n return result;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"@Override\n\tpublic String getResult() {\n\t\treturn result;\n\t}",
"public ResultType getResult() {\r\n return result;\r\n }",
"protected R getResult() {\n\t\treturn result;\n\t}",
"public String getResult() \n\t{\n\t\treturn strResult;\n\t}",
"int getResult() {\n return result;\n }",
"public int getResult() {return resultCode;}",
"public int getResult() {\n return result;\n }",
"public int getResult() {\n return this.result;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getResult() {\n\t\treturn this.result;\r\n\r\n\t}",
"public int getResult() {\r\n\t\t\treturn result_;\r\n\t\t}",
"public Result getResults()\r\n {\r\n return result;\r\n }",
"public T getResult() {\n return result;\n }",
"public T getResult() {\n return result;\n }",
"public TResult getResult() {\n return result;\n }",
"public String getResult();",
"public String getResult();",
"public String getResult();",
"public int getResult() {\r\n\t\t\t\treturn result_;\r\n\t\t\t}",
"public int getResponse() {return response;}",
"public E getResult(){\r\n\t\treturn this.result;\r\n\t}",
"public int getResult() {\n\t\t\treturn this.result;\r\n\t\t}",
"public int getResponse() {\r\n return response;\r\n }",
"public IStatus getResult();",
"public JSONObject getResult()\n {\n return result;\n }",
"public Integer getResult() {\n return result;\n }",
"public download.Map getResult() {\n return result;\n }",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"public java.lang.String getResultPost() {\n return result_post;\n }",
"public java.lang.String getResultPost() {\n return result_post;\n }",
"public Object getResult() {\n if (result == null) {\n return defaultResult();\n } else {\n return result;\n }\n }",
"java.lang.String getResponse();",
"public int getResult(){\r\n\t\t return result;\r\n\t }",
"@Nullable public R result() {\n return res;\n }",
"public T getResponse() {\n return response;\n }",
"@Override\n public byte[] execute() {\n return buildResponse();\n }",
"public String getResponse()\r\n {\r\n return this.response;\r\n }",
"public String process() throws Exception\r\n\t{\r\n\t\treturn result;\r\n\t}",
"String getResponse();",
"private void retrieveResult() {\n if (result == null) {\n this.setResult(((DocumentBuilder)this.getHandler()).getResult());\n }\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public String getResponse() {\n return response;\n }",
"public int getresult(){\n return result;}",
"public int getResult(){\n return localResult;\n }",
"public VData getResult() {\n\t\treturn mResult;\n\t}",
"public boolean result () {\n return m_result;\n }",
"public String getOutput() {\n\t\treturn results.getOutput() ;\n\t}",
"public Object runAndGetResult() {\n run();\n return getResult();\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public String produceResponse() {\n processData();\n return response;\n }",
"public MatchResult getResult() {\n return result;\n }",
"public String getResponse() {\n\t\treturn value;\n\t}",
"public synchronized RestResponse getResponse() {\n\t\treturn getContext().getLocalSession().getOpSession().getResponse();\n\t}",
"public String response() {\n\t\treturn message;\n\t}",
"protected T retrieve() {\n return _result;\n }",
"public boolean getResult() {\r\n\treturn result;\r\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public int result() {\n return 0;\n }",
"int getResult();",
"@java.lang.Override public int getResultValue() {\n return result_;\n }",
"@Override\n public boolean getResult() {\n return result_;\n }",
"double getResult() {\r\n\t\treturn result;\r\n\t}",
"public Object getResult()\n\t{\n\t\treturn getResult( getSession().getSessionContext() );\n\t}",
"public int result() {\n\t\treturn total;\n\t}",
"public Boolean getResult() {\n return result;\n }",
"public SynchronizationResponse getResult() {\n return _response;\n }",
"public String getResponse() {\n return this.applicationState.getResponse();\n }",
"java.lang.String getResult();",
"@java.lang.Override public int getResultValue() {\n return result_;\n }",
"public String getTokenResult() {\n return tokenResult;\n }"
]
| [
"0.7513029",
"0.7485772",
"0.7408724",
"0.7289098",
"0.72864383",
"0.72377527",
"0.72377527",
"0.72377527",
"0.71571696",
"0.7082356",
"0.7042552",
"0.704241",
"0.7034276",
"0.70337266",
"0.70337266",
"0.70329666",
"0.70329666",
"0.70126873",
"0.7006192",
"0.7006192",
"0.7006192",
"0.70059294",
"0.70059294",
"0.70046365",
"0.6986836",
"0.6978585",
"0.696152",
"0.69559",
"0.6938022",
"0.6933958",
"0.69143736",
"0.69075906",
"0.689769",
"0.6887739",
"0.6885676",
"0.6885676",
"0.6884978",
"0.6859952",
"0.6859952",
"0.6859952",
"0.68560916",
"0.68386704",
"0.6810442",
"0.6801972",
"0.67326415",
"0.6714627",
"0.670456",
"0.6703707",
"0.6661962",
"0.66443425",
"0.6623563",
"0.6606886",
"0.6604774",
"0.6591002",
"0.656566",
"0.6545774",
"0.6536487",
"0.6514657",
"0.6512385",
"0.6502115",
"0.64878815",
"0.6487384",
"0.6466944",
"0.6466944",
"0.6466944",
"0.6466944",
"0.6466944",
"0.644534",
"0.64043057",
"0.6396515",
"0.63803154",
"0.6377501",
"0.6368536",
"0.6365511",
"0.6365511",
"0.6365511",
"0.6365511",
"0.6361909",
"0.6353472",
"0.63500947",
"0.6338856",
"0.63368964",
"0.63297516",
"0.6308118",
"0.63048345",
"0.63048345",
"0.63048345",
"0.63048345",
"0.62645143",
"0.6262022",
"0.62363034",
"0.6230176",
"0.62300307",
"0.6225952",
"0.62238",
"0.62202346",
"0.62178683",
"0.62138003",
"0.62125504",
"0.61956996",
"0.6191264"
]
| 0.0 | -1 |
A NSException instance that provides you with information when a request fails. | @Property
public native MintMessageException getExceptionError (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public NSException() {\n\t\tsuper();\n\t\tthis.exception = new Exception();\n\t}",
"String getException();",
"String getException();",
"public ApiException exception() {\n return this.exception;\n }",
"public HTTPErrorException(String message) {\n super(message);\n }",
"public void onRequestFailure(Request request, IOException e) { }",
"@Override\n\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\n\t\t\t}",
"public HttpException() {\n }",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();",
"public NetworkException() {\n\t\tsuper();\n\t}",
"public ResourceException(Exception exception) {\r\n super(exception);\r\n }",
"public String networkFailureMessage();",
"public void onError(Request request, Throwable exception) {\n com.google.gwt.user.client.Window.alert(\"error 1002\");\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }",
"public static RestTestException getRestTestException(HttpMethodBase method) {\n return new RestTestException(\"\", 0);\n\n }",
"@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}",
"@Test\n void testGivenFaultyRequestWithExceptionString_thenFail() throws Exception {\n URL u = new URL(\"http://localhost:8080/sentry-servlet/fault?exception=true\");\n HttpURLConnection conn = (HttpURLConnection)u.openConnection();\n int rc = conn.getResponseCode();\n assertThat(rc)\n .isEqualTo(500);\n }",
"public ServerException(Response.Status status) {\n super(status);\n }",
"public ObjectNotFoundException() {\r\n super(\"ObjectNotFound Exception\");\r\n }",
"public void requestFailed(RequestFailureEvent e);",
"public ResourceNotFoundException(String msg) {\r\n\t\tsuper(msg);\r\n\t}",
"Object getFailonerror();",
"Object getFailonerror();",
"public SIPServerException(String response) {\n super(response);\n ServerLog.logException(this);\n }",
"OAuth2Error getError();",
"public void onError(Request request, Throwable e) {\n Window.alert(\"error = \" + e.getMessage());\n }",
"public void onError(Request request, Throwable e) {\n Window.alert(\"error = \" + e.getMessage());\n }",
"public InvalidURIException()\r\n\t{\r\n\t\tmessage = super.getMessage();\r\n\t}",
"public void onError(final Request request, final Throwable exception) {\n \t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void error(Exception e);",
"String getCauseException();",
"public Exception getException ()\r\n {\r\n return exception_;\r\n }",
"private Object logError(WebClientResponseException e, String string) {\n\t\treturn null;\n\t}",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"public String getError() throws IOException {\n String line = \"\";\n StringBuffer buffer = new StringBuffer();\n BufferedReader in = new BufferedReader(new InputStreamReader(\n httpConnection.getErrorStream()));\n while ((line = in.readLine()) != null) {\n buffer.append(line + \"\\n\");\n }\n in.close();\n return buffer.toString();\n }",
"public void onError(Request request, Throwable exception) {\n\t\t\t logger.severe(\"HTTP error occurred\");\n\t\t\t \tdeliveryPoint.onDeliveryProblem(letterBox, 0);\n\t\t\t }",
"void sendError(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Throwable ex) throws IOException;",
"@Override\r\n\t\t\tpublic void onFailure(Request arg0, IOException arg1) {\n\t\t\t\tsToast(\"失败\");\r\n\t\t\t}",
"public ResourceException(String reason, Exception exception) {\r\n super(reason, exception);\r\n }",
"public Exception getException() {\n return transactionFailure;\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(Request arg0, IOException arg1) {\n\t\t\t\t\t\tsToast(\"失败\");\r\n\t\t\t\t\t}",
"public java.lang.String getException() {\n return exception;\n }",
"public void downloadFailed(Throwable t);",
"public void httpfailure(String errmsg) {\n\t\t\n\t}",
"public Exception getException()\n {\n return exception;\n }",
"public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }",
"public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }",
"protected void sendFailureMessage(Request request, IOException e) {\n\t\tsendMessage(obtainMessage(HttpConsts.REQUEST_FAIL, new Object[] {request, e}));\n\t}",
"public Exception getException ()\n {\n return exception;\n }",
"Response.StatusType getStatus(Exception exception);",
"public void onException(RequestException e);",
"public Throwable getReason() { return err; }",
"public void onError(Request request, Throwable exception) {\n Utils.setErrorPrincipal(\"Ocurrio un error al conectar con el servidor\", \"error\");\n }",
"public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }",
"public Neo4jException(String message) {\n this(\"N/A\", message);\n }",
"public Exception getException() {\n return exception;\n }",
"public TeWeinigGeldException(Exception e) {this.e = e;}",
"public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }",
"@ExceptionHandler(Exception.class)\n\t@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n\tpublic VndError onException(Exception e) {\n\t\treturn new VndError(e.getClass().getSimpleName(), StringUtils.hasText(e\n\t\t\t\t.getMessage()) ? e.getMessage() : e.getClass().getSimpleName());\n\t}",
"java.lang.String getError();",
"java.lang.String getError();",
"java.lang.String getError();",
"private static Response getErrorResponse(Exception exception) {\n Response response = new Response();\n ResponseParams resStatus = new ResponseParams();\n String message = setMessage(exception);\n resStatus.setErrmsg(message);\n resStatus.setStatus(StatusType.FAILED.name());\n if (exception instanceof ProjectCommonException) {\n ProjectCommonException me = (ProjectCommonException) exception;\n resStatus.setErr(me.getCode());\n response.setResponseCode(ResponseCode.getHeaderResponseCode(me.getResponseCode()));\n } else {\n resStatus.setErr(ResponseCode.SERVER_ERROR.name());\n response.setResponseCode(ResponseCode.SERVER_ERROR);\n }\n response.setParams(resStatus);\n return response;\n }",
"public ResourceException(String reason) {\r\n super(reason);\r\n }",
"protected ResultEntity error(Exception ex) {\n log.error(ex);\n resultEntity.setMessage(ex.getMessage());\n if (ex instanceof CustomException) {\n CustomException customException = (CustomException) ex;\n resultEntity.setCode(customException.getCode());\n resultEntity.setData(customException.getData());\n } else {\n resultEntity.setCode(500);\n resultEntity.setMessage(\"Internal Server Error \" + ex.getMessage());\n }\n return resultEntity;\n }",
"public Exception() {\n\t\t\tsuper();\n\t\t}",
"@Override\n public void onRequestFailure(SpiceException spiceException) {\n }",
"public ObjectNotFoundException(String s) {\r\n super(s);\r\n }",
"@Override\n\t\t\t\t\tpublic void onError(Request request, Throwable exception) {\n\n\t\t\t\t\t}",
"public UnresolvedAddressException getException()\n\t{\n\t\treturn exception;\n\t}",
"public Exception getException() {\r\n return exception;\r\n }",
"protected void handleFailMessage(Request request, IOException e) {\n\t\tonRequestFailure(request, e);\n\t}",
"protected void connectionException(Exception exception) {}",
"public NetworkCallError() {\n }",
"public Exception getException()\n {\n return m_exception;\n }",
"public IndividualRequestNotFoundException(Long requestId) {\n super(ResourceBundle.getBundle(RESOURCE_STRING_PATH)\n .getString(INDIVIDUAL_REQUEST_NOT_FOUND_EXCEPTION_KEY) + requestId);\n }",
"@Override\n\t\t\t\t\tpublic void httpFail(String response) {\n\t\t\t\t\t}",
"@Override\r\n public void onFailure(@NotNull Call call, @NotNull IOException e) {\r\n Log.e(TAG, \"internet error\");\r\n Log.e(TAG, e.getMessage());\r\n }",
"public Exception getException()\n\t{\n\t\treturn exception;\n\t}",
"public void error(Throwable e);",
"public APIException(String message) {\n\t\tsuper(message, null);\n\t}",
"public HttpException(int status, String message, String body) {\r\n\t\tsuper(\"Status: \" + status + \", Response: \" + body);\r\n\t\tmStatus = status;\r\n\t\tmMessage = message;\r\n\t\tmBody = body;\r\n\t}",
"public OLMSException() {\r\n super();\r\n }",
"public ThunderConnectionException(String message, Response response) {\n super(message);\n\n this.response = response;\n }",
"public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }",
"public String getExceptionMessage() {\n\t\treturn \"Error while publishing JSON reports. Please contact system administrator or try again later!\";\n\t}",
"@Override\n\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\n\t\t\t}",
"public TrafficspacesAPIException(String reason) {\n this(null, (reason != null) ? reason : DEFAULT_MESSAGE);\n }",
"public Exception getException() {\n return exception;\n }",
"public ControllerException() {\n super();\n }",
"public ResultProxy addStandardException(Exception e){\n\t\taddRecordToDataset(\"exceptions\", new RecordProxy()\n\t\t\t.addParam(\"opstatus\", 10500)\n\t\t\t.addParam(\"httpStatusCode\", 500)\n\t\t\t.addParam(\"message\", e.getMessage())\n\t\t\t.addParam(\"class\", e.getClass().getCanonicalName())\n\t\t\t.addParam(\"stack\", ExceptionUtils.getStackTrace(e))\n\t\t);\n\t\t//\t)\n\t\t//);\n\n\t\treturn this;\n\t}",
"public NetworkCallError(Throwable throwable) {\n this.throwable = throwable;\n this.className = throwable.getClass().getName();\n this.errorMessage = throwable.getMessage();\n }",
"@SuppressWarnings(\"ThrowableNotThrown\") \n public static Response getSCIMInternalErrorResponse() {\n JSONEncoder encoder = new JSONEncoder();\n CharonException exception = new CharonException(\"Internal Error\");\n String responseStr = encoder.encodeSCIMException(exception);\n return Response.status(exception.getStatus()).entity(responseStr).build();\n }",
"void failed (Exception e);",
"public SkPublishAPIException(int statusCode, String response) {\n super();\n this.response = response;\n this.statusCode = statusCode;\n }",
"public InsertErrorException() {\n super(ErrorConstants.DEFAULT_TYPE, MessageContants.CONST_ERROR_CODE_INSERT_FAILURE, Status.INTERNAL_SERVER_ERROR);\n }",
"public MRFException() {\n\t\tsuper();\n\t}",
"public TwilioRestException(String message, int errorCode, String moreInfo) {\n\t\tsuper(message);\n\n\t\tthis.message = message;\n\t\tthis.errorCode = errorCode;\n\t\tthis.moreInfo = moreInfo;\n\t}",
"@Override\n public void onError(Throwable e)\n {\n if (e instanceof RestException)\n {\n promise.done(((RestException) e).getResponse());\n }\n else\n {\n promise.fail(e);\n }\n }",
"public Exception() {\n\tsuper();\n }"
]
| [
"0.63935894",
"0.638207",
"0.638207",
"0.62947357",
"0.6280379",
"0.6238441",
"0.61822253",
"0.6160771",
"0.6116528",
"0.6113145",
"0.60923827",
"0.6068401",
"0.5976564",
"0.5929669",
"0.5921761",
"0.590495",
"0.5857317",
"0.58497345",
"0.5785355",
"0.57752585",
"0.57551515",
"0.574832",
"0.574832",
"0.57403576",
"0.57337683",
"0.5730183",
"0.5730183",
"0.5710755",
"0.56962615",
"0.5681095",
"0.56769294",
"0.5674797",
"0.567214",
"0.5671353",
"0.5667415",
"0.5661788",
"0.5653691",
"0.56527615",
"0.5639223",
"0.56378365",
"0.56372166",
"0.5636121",
"0.5631884",
"0.5626397",
"0.562252",
"0.56131756",
"0.56107897",
"0.56107897",
"0.56075805",
"0.558258",
"0.5576967",
"0.5575745",
"0.5562871",
"0.5557598",
"0.55535775",
"0.5552244",
"0.55480886",
"0.5547309",
"0.5546049",
"0.5537831",
"0.553744",
"0.553744",
"0.553744",
"0.55372155",
"0.55343163",
"0.5532208",
"0.55168974",
"0.5514261",
"0.5512112",
"0.55112237",
"0.5509033",
"0.5505277",
"0.55036944",
"0.54833204",
"0.5472545",
"0.54712903",
"0.5463595",
"0.5458359",
"0.54565096",
"0.54496014",
"0.5448508",
"0.5447231",
"0.5428267",
"0.5424884",
"0.5421586",
"0.5409426",
"0.5408928",
"0.5406995",
"0.5399607",
"0.53994536",
"0.53943765",
"0.5392952",
"0.5392705",
"0.53925467",
"0.5387138",
"0.5384483",
"0.5375023",
"0.53629243",
"0.5361934",
"0.53548867",
"0.5354735"
]
| 0.0 | -1 |
The JSON model that is sent to the server. | @Property
public native String getClientRequest (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public JSONModel() {\n jo = new JSONObject();\n }",
"@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}",
"@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}",
"public String jsonify() {\n return gson.toJson(this);\n }",
"public String toJSON() {\n return new Gson().toJson(this);\n }",
"public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"public abstract Object toJson();",
"public String getJson();",
"public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}",
"public String toJson() { return new Gson().toJson(this); }",
"@JsonIgnore\n @Override\n public Model getModel() {\n return this.model;\n }",
"public interface BaseFormModel {\n JSONObject toJson();\n}",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public String toJson() {\n return JSON.getGson().toJson(this);\n }",
"public abstract String toJson();",
"public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }",
"String toJSON();",
"@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}",
"@Override\r\n public JSONObject toJSON() {\r\n return this.studente.toJSON();\r\n }",
"public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }",
"protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }",
"public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }",
"public String toJSON() throws JSONException;",
"public Map<String, Object> getModel() {\n\t return getModelMap();\n\t }",
"@Override\n public String toString() {\n return jsonString;\n }",
"public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\r\n\r\n JSONObject jsonObj = new JSONObject();\r\n jsonObj.put(\"note\", note);\r\n return jsonObj;\r\n }",
"public Map<String, Object> getDataModel() {\n return this.dataModel;\n }",
"com.google.protobuf.ByteString getModelBytes();",
"public java.lang.String getReqJson() {\n return req_json;\n }",
"public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }",
"@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }",
"@Override\n\tpublic JSONObject toJson() throws JSONException {\n\t\tJSONObject result = super.toJson();\n\t\treturn result;\n\t}",
"public java.lang.String getReqJson() {\n return req_json;\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"public abstract String toJsonString();",
"@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}",
"@Override\n @SuppressWarnings(\"unchecked\")\n public JSONObject toJSON() {\n JSONObject main = new JSONObject();\n JSONObject pocJSON = new JSONObject();\n pocJSON.put(JSON_NAME, this.getName());\n pocJSON.put(JSON_DESCRIPTION, this.getDescription());\n pocJSON.put(JSON_COLOR,this.colorConstraint.getColor().name());\n main.put(SharedConstants.TYPE, SharedConstants.PRIVATE_OBJECTIVE_CARD);\n main.put(SharedConstants.BODY,pocJSON);\n return main;\n }",
"public JSONObject toJSON() {\n return toJSON(true);\n }",
"public TypeToken<?> modelType() {\n return this.modelType;\n }",
"ModelData getModel();",
"public abstract JsonElement serialize();",
"public JSONObject toJSON()\n {\n JSONObject jsonField = new JSONObject();\n\n jsonField.put(\"name\", name);\n jsonField.put(\"type\", type);\n jsonField.put(\"visibility\", vis.name());\n\n return jsonField;\n }",
"@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Dictionary getModel() {\n\t\treturn dictionary;\r\n\t}",
"public String getModel()\n {\n return model;\n }",
"@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}",
"public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }",
"public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }",
"@Override\r\n\tpublic Object toJSonObject() {\n\t\treturn null;\r\n\t}",
"public String getModel() {\r\n return model;\r\n }",
"public String getModel() {\n return model;\n }",
"public String getModel() {\n return model;\n }",
"public JSONObject toJson() {\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}",
"@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}",
"private JSON() {\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}",
"@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}",
"public JSONObject toJSON() {\r\n return toJSON(new JSONObject());\r\n }",
"public JSONObject toJSON(){\n\t\treturn toJSON(false, false);\n\t}",
"public String getModel()\n\t{\n\t\treturn model;\n\t}",
"public Model getModel () { return _model; }",
"public String getModel() {\n\t\treturn model; \n\t}",
"public TypeToken<?> returnType() {\n return this.modelType;\n }",
"@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}",
"private JsonObject OnGoingRideObject()\n {\n OnGoingRideRequestModel requestModel = new OnGoingRideRequestModel();\n requestModel.setUserId(UserId);\n return new Gson().toJsonTree(requestModel).getAsJsonObject();\n }",
"@Override\n public String toJSONString()\n {\n return \"{\\\"packet\\\":{\\\"agentsName\\\":\\\"\\\",\\\"placesName\\\":\\\"\\\",\\\"placesX\\\":0,\\\"placesY\\\":0,\\\"numberOfPlaces\\\":0,\\\"numberOfAgents\\\":0,\\\"placeOverloadsSetDebugData\\\":false,\\\"placeOverloadsGetDebugData\\\":false,\\\"agentOverloadsSetDebugData\\\":false,\\\"agentOverloadsGetDebugData\\\":false,\\\"placeDataType\\\":\\\"\\\",\\\"agentDataType\\\":\\\"\\\"},\\\"request\\\":0}\";\n }",
"String getJson();",
"String getJson();",
"String getJson();",
"public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }",
"java.lang.String getModel();",
"public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }",
"@Override\n public String encode() {\n JsonObject tmp = new JsonObject();\n addIfSet(tmp, \"id\", id);\n addIfSet(tmp, \"courseId\", courseId);\n addIfSet(tmp, \"sheetId\", sheetId);\n addIfSet(tmp, \"maxPoints\", maxPoints);\n addIfSet(tmp, \"type\", type);\n addIfSet(tmp, \"link\", link);\n addIfSet(tmp, \"bonus\", bonus);\n addIfSet(tmp, \"linkName\", linkName);\n addIfSet(tmp, \"submittable\", submittable);\n addIfSet(tmp, \"resultVisibility\", resultVisibility);\n tmp = super.encodeToObject(tmp);\n return tmp.toString();\n }",
"@ModelAttribute(\"representation\")\n\tString representation(HttpServletRequest request) throws IOException {\n\t\tString contentType = request.getContentType();\n\n\t\tif (contentType != null && contentType.contains(\"application/json\")) {\n\t\t\tInputStream in = request.getInputStream();\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\n\t\t\tint d;\n\t\t\twhile ((d = in.read()) != -1) {\n\t\t\t\tstringBuffer.append((char) d);\n\t\t\t}\n\t\t\tSystem.out.println(stringBuffer.toString());\n\t\t\tSystem.out.println(Rra.defaultRepresentation instanceof GsonRepresentation);\n\t\t\trequest.setAttribute(\"representation\", stringBuffer.toString());\n\t\t}\n\t\treturn \"representation\";\n\t}",
"public String toJSON() {\n\t JSONObject outer = new JSONObject();\r\n\t JSONObject inner = new JSONObject();\r\n\t // Now generate the JSON output\r\n\t try {\r\n\t outer.put(\"articleMobile\", inner); // the outer object name\r\n\t inner.put(\"codeArticle\", codeArticle); // a name/value pair\r\n\t inner.put(\"designation\", designation); // a name/value pair\r\n\t inner.put(\"prixVente\", prixVente); // a name/value pair\r\n\t inner.put(\"stockTh\", stockTh);\r\n\t inner.put(\"error\", error); // a name/value pair\r\n\t inner.put(\"gisement\", gisement); // a name/value pair\r\n\t } catch (JSONException ex) {\r\n\t ex.printStackTrace();\r\n\t }\r\n\t return outer.toString(); // return the JSON text\r\n\t}",
"public String getModel();",
"public synchronized String getJSONString() {\n\n return getJSONObject().toString();\n }",
"public String getModel() {\n return this.model;\r\n }",
"public Object getJsonObject() {\n return JSONArray.toJSON(values);\n }",
"public Object getModel();",
"public String getJson() {\n Object ref = json_;\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 json_ = s;\n return s;\n }\n }",
"public String getJson() {\n Object ref = json_;\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 json_ = s;\n return s;\n }\n }",
"public String getJson() {\n Object ref = json_;\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 json_ = s;\n return s;\n }\n }",
"UserModel()\n {/*Used for Gson*/}",
"@SuppressWarnings({\"hiding\", \"static-access\"})\n @Override\n public RavenJObject toJson() {\n RavenJObject ret = new RavenJObject();\n ret.add(\"Key\", new RavenJValue(key));\n ret.add(\"Method\", RavenJValue.fromObject(getMethod().name()));\n\n RavenJObject patch = new RavenJObject();\n patch.add(\"Script\", new RavenJValue(this.patch.getScript()));\n patch.add(\"Values\", RavenJObject.fromObject(this.patch.getValues()));\n\n ret.add(\"Patch\", patch);\n ret.add(\"DebugMode\", new RavenJValue(debugMode));\n ret.add(\"AdditionalData\", additionalData);\n ret.add(\"Metadata\", metadata);\n\n if (etag != null) {\n ret.add(\"Etag\", new RavenJValue(etag.toString()));\n }\n if (patchIfMissing != null) {\n RavenJObject patchIfMissing = new RavenJObject();\n patchIfMissing.add(\"Script\", new RavenJValue(this.patchIfMissing.getScript()));\n patchIfMissing.add(\"Values\", RavenJObject.fromObject(this.patchIfMissing.getValues()));\n ret.add(\"PatchIfMissing\", patchIfMissing);\n }\n return ret;\n }",
"@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }",
"public DataModel getModel() {\n return model;\n }",
"public String toJson() throws Exception {\n\t\treturn WebAccess.mapper.writeValueAsString(this);\n\t}"
]
| [
"0.6870988",
"0.68448484",
"0.6802467",
"0.6801764",
"0.6799145",
"0.6652248",
"0.6646102",
"0.66049373",
"0.65837324",
"0.65560615",
"0.65418",
"0.6481804",
"0.6476792",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64616907",
"0.64607644",
"0.64220876",
"0.64122474",
"0.6365715",
"0.6350117",
"0.6282328",
"0.6268716",
"0.6268716",
"0.62480253",
"0.62435216",
"0.6234203",
"0.62243474",
"0.62129015",
"0.620326",
"0.619675",
"0.61866295",
"0.61785984",
"0.6175409",
"0.6160067",
"0.6155279",
"0.61423796",
"0.61303407",
"0.61224484",
"0.61221856",
"0.6112703",
"0.60685587",
"0.6050438",
"0.60426486",
"0.6036361",
"0.60344124",
"0.60309434",
"0.60265607",
"0.6017735",
"0.60103625",
"0.60038674",
"0.6003026",
"0.6003026",
"0.5983985",
"0.59768015",
"0.59697235",
"0.59697235",
"0.5968405",
"0.5966092",
"0.5964893",
"0.59637886",
"0.5948459",
"0.59115493",
"0.5891957",
"0.58900654",
"0.587878",
"0.5873977",
"0.5865489",
"0.5861417",
"0.58605796",
"0.58399516",
"0.58388364",
"0.58273226",
"0.58273226",
"0.58273226",
"0.5826048",
"0.5816512",
"0.5805794",
"0.58056444",
"0.5795535",
"0.5784722",
"0.5777743",
"0.57755053",
"0.57732",
"0.57713497",
"0.5767964",
"0.57479364",
"0.57479364",
"0.57479364",
"0.574285",
"0.5740544",
"0.5736855",
"0.57314706",
"0.57221574"
]
| 0.0 | -1 |
A Boolean that indicates whether the request was properly handled while debugging. | @Property
public native boolean isHandledWhileDebugging (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected boolean isDebugging() {\n\t\treturn debugging;\n\t}",
"public boolean isDebugged() {\r\n\t\treturn debugged;\r\n\t}",
"public boolean isDebug();",
"protected boolean isContinueDebug() {\n\t\treturn continueDebug;\n\t}",
"boolean isDebug();",
"boolean isDebug();",
"private final boolean isDebugMode() {\r\n\tString debug = m_ctx.getInitParameter(\"gateway.debug\");\r\n\tif (debug == null)\r\n\t return false;\r\n\tif (debug.equalsIgnoreCase(\"true\"))\r\n\t return true;\r\n\telse\r\n\t return false;\r\n }",
"public static boolean debugging()\n {\n return info;\n }",
"public boolean isDebugEnabled();",
"public boolean isDebug() {\n\t\treturn debug;\n\t}",
"public boolean isDebug() {\n\t\treturn debug;\n\t}",
"public boolean isDebug( ) {\n\t\treturn debug;\n\t}",
"@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\tlogger.info(\"preHandle:: preHandle Execution for URI: {}\", request.getRequestURI());\n\t\t\n\t\t// Logging the request parameters\n\t\tEnumeration<String> parameterNames = request.getParameterNames();\n\t\twhile (parameterNames.hasMoreElements()) {\n\t\t\tlogger.info(\"--parameter name: {}\", parameterNames.nextElement());\n\t\t}\n\t\t\n\t\t// Logging the request header names\n\t\tEnumeration<String> headerrNames = request.getHeaderNames();\n\t\twhile (headerrNames.hasMoreElements()) {\n\t\t\tlogger.info(\"--header name: {}\", headerrNames.nextElement());\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isDebugEnable() {\n return BlurDialogEngine.DEFAULT_DEBUG_POLICY;\n }",
"public boolean isDebug() {\n\t\treturn _debug;\n\t}",
"public boolean isDebug()\n\t{\n\t\treturn this.debug;\n\t}",
"public boolean shouldHandle(String requestUri) {\n\t\tif (requestUri.startsWith(this.requestStart)) {\n\t\t\tthis.eventListener.log(InternationalisationUtils.getI18nString(I18N_PROCESSING_REQUEST, requestUri.toString()));\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean isDebugEnabled();",
"@Input\n public boolean isDebuggable() {\n return debug;\n }",
"protected final boolean hasDebug() {\n return m_debug;\n }",
"public boolean isHandled() {\r\n return handled;\r\n }",
"public boolean isDisplayDebug() {\n return displayDebug;\n }",
"public boolean isRequest(){\n return false;\n }",
"public boolean getDebugStatus() {\r\n return DEBUG;\r\n }",
"public boolean escreveDebug (boolean escreveDebug) {\r\n return this._delegate.escreveDebug(escreveDebug);\r\n }",
"public boolean canServeRequest() {\n return outputWSService.isRunnningAndDbInstancesAvailable(false);\n }",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public boolean hasRequest() {\n return request_ != null;\n }",
"public boolean isDebugMode() {\n return debugMode;\n }",
"public boolean isDebugEnabled() {\n return debugEnabled;\n }",
"boolean isValid()\n {\n return isRequest() && isResponse();\n }",
"public boolean isHandlingException() {\n return this.isHandlingException.get();\n }",
"public boolean isHandlingException() {\n return this.isHandlingException.get();\n }",
"@java.lang.Override\n public boolean hasHttpRequest() {\n return httpRequest_ != null;\n }",
"@Override\n\tpublic boolean isDebugEnabled() {\n\t\treturn debugEnabled;\n\t}",
"public boolean supportsDebugArgument();",
"@Override\n public boolean isHandled() {\n return handled;\n }",
"protected boolean isRequestRecordable(HttpServletRequest ignored) {\n return true;\n }",
"public static boolean debugOn()\r\n {\r\n on = true;\r\n System.out.println(\"Debug Mode On\");\r\n return on;\r\n }",
"public boolean isDebugEnabled() {\n return getFormat().getConverterService().isDebugEnabled();\n }",
"protected void doDebug(HttpServletRequest httpServletRequest)\n\t{\n log.debug(\"context: \" + httpServletRequest.getContextPath());\n log.debug(\"path info: \" + httpServletRequest.getPathInfo());\n log.debug(\"translated: \" + httpServletRequest.getPathTranslated());\n log.debug(\"scheme: \" + httpServletRequest.getScheme());\n log.debug(\"server name: \" + httpServletRequest.getServerName());\n log.debug(\"server port: \" + httpServletRequest.getServerPort());\n log.debug(\"uri: \" + httpServletRequest.getRequestURI());\n log.debug(\"url: \" + httpServletRequest.getRequestURL().toString());\n log.debug(\"query string: \" + httpServletRequest.getQueryString());\n\t\tEnumeration headerNames = httpServletRequest.getHeaderNames();\n\t\tString headerName;\n log.debug(\"---------- headers ----------\");\n\t\twhile (headerNames.hasMoreElements())\n\t\t{\n\t\t\theaderName = (String)headerNames.nextElement();\n log.debug(\" \" + headerName + \": \" + httpServletRequest.getHeader(headerName));\n\t\t}\n\t\tEnumeration parameterNames = httpServletRequest.getParameterNames();\n\t\tString parameterName;\n log.debug(\"---------- parameters ---------\");\n\t\twhile (parameterNames.hasMoreElements())\n\t\t{\n\t\t\tparameterName = (String)parameterNames.nextElement();\n log.debug(\" \" + parameterName + \": \" + httpServletRequest.getParameter(parameterName));\n\t\t}\n log.debug(\"------------------------------\");\n\t}",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"boolean hasRequest();",
"public final boolean isDebugOn()\n {\n return this.getPropertyValue(GUILoggerSeverityProperty.DEBUG);\n }",
"public boolean getDebug() {\n return debug;\n }",
"public boolean getDebug() {\n return debug;\n }",
"public boolean isDebugEnabled()\n/* */ {\n/* 250 */ return getLogger().isDebugEnabled();\n/* */ }",
"public boolean isTracing();",
"public boolean status() {\n return DecoratedController != null;\n }",
"private boolean checkForTaskQueue(HttpServletRequest request, HttpServletResponse response) {\n if (request.getHeader(\"X-AppEngine-QueueName\") == null) {\n log.log(Level.SEVERE, \"Received unexpected non-task queue request. Possible CSRF attack.\");\n try {\n response.sendError(\n HttpServletResponse.SC_FORBIDDEN, \"Received unexpected non-task queue request.\");\n } catch (IOException ioe) {\n throw new RuntimeException(\"Encountered error writing error\", ioe);\n }\n return false;\n }\n return true;\n }",
"public boolean hasHttpRequest() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"public final boolean isHandled() {\n return this.handled;\n }",
"public boolean getDebugMode() { return debugMode; }",
"public boolean handle(ExchangeHelper exchangeHelper) throws IOException {\n if (method == null || method == exchangeHelper.getMethod()) {\n System.out.println(String.format(\"%s request received on path '%s', using handler: %s\", exchangeHelper.getMethod(), exchangeHelper.getUriPath(), handler.getClass().getSimpleName()));\n\n //Run pre filters\n for (RouteFilter filter : preFilters) {\n if (!filter.doFilter(exchangeHelper)) {\n //We don't continue, but the request was handled\n return true;\n }\n }\n\n //OK, we are a route for that method\n handler.handle(exchangeHelper);\n\n //Run post filters\n for (RouteFilter filter : postFilters) {\n if (!filter.doFilter(exchangeHelper)) {\n //We don't continue, but the request was handled\n return true;\n }\n }\n\n //We handled that request\n return true;\n }\n\n //We did NOT handle that request\n return false;\n }",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"protected boolean isTraced(HttpServletRequest httpServletRequest) {\n if (skipPattern != null) {\n int contextLength =\n httpServletRequest.getContextPath() == null\n ? 0\n : httpServletRequest.getContextPath().length();\n String url = httpServletRequest.getRequestURI().substring(contextLength);\n return !skipPattern.matcher(url).matches();\n }\n\n return true;\n }",
"public boolean hasRequest() {\n return requestBuilder_ != null || request_ != null;\n }",
"public boolean hasRequest() {\n return requestBuilder_ != null || request_ != null;\n }",
"public boolean debug(Class<?> eventClass) {\n return debugGlobal?(debugPrivates.containsKey(eventClass)?debugPrivates.get(eventClass):defaultee(eventClass)):false;\n }",
"public boolean hasRequest() {\n return instance.hasRequest();\n }",
"@java.lang.Override\n public boolean hasRoute() {\n return stepInfoCase_ == 7;\n }",
"@Override\n protected boolean isDebugEnable() {\n return false;\n }",
"@java.lang.Override\n public boolean hasRoute() {\n return stepInfoCase_ == 7;\n }",
"public boolean getDebugMode()\n {\n return debugMode;\n }",
"@Override\n public boolean containsContext(HttpServletRequest request) {\n return false;\n }",
"public boolean logAccess() {\n Map<String, String> response;\n try {\n response = logMessageService.sendRequestMessage(\"\");\n } catch (Exception exception) {\n LOGGER.warn(\"Log message could not be sent. [exception=({})]\", exception.getMessage());\n return allowAccess();\n }\n if (response != null) {\n return allowAccess();\n } else {\n LOGGER.warn(\"No response received.\");\n return allowAccess();\n }\n }",
"public boolean getDebug() {\n return this.debug;\n }",
"public boolean getDebug() {\n return this.debug;\n }",
"public static boolean canShowDebugMessage() {\r\n\t\treturn showDebugMessage;\r\n\t}",
"public boolean isLogResponseContent() {\n return logResponseContent;\n }",
"@java.lang.Override\n public boolean hasFirewall() {\n return stepInfoCase_ == 6;\n }",
"public boolean isCommitted() {\n return this.response.isCommitted();\n }",
"public boolean hasResponseLog() {\n return result.hasResponseLog();\n }",
"@Override\r\n\tpublic boolean isHandled() {\n\t\treturn true;\r\n\t}",
"private boolean checkForAjax(HttpServletRequest request, HttpServletResponse response) {\n if (!\"XMLHttpRequest\".equals(request.getHeader(\"X-Requested-With\"))) {\n log.log(\n Level.SEVERE, \"Received unexpected non-XMLHttpRequest command. Possible CSRF attack.\");\n try {\n response.sendError(HttpServletResponse.SC_FORBIDDEN,\n \"Received unexpected non-XMLHttpRequest command.\");\n } catch (IOException ioe) {\n throw new RuntimeException(\"Encountered error writing error\", ioe);\n }\n return false;\n }\n return true;\n }",
"public boolean isAnyRequestUnprocessed() {\n return !elevatorControllers\n .values()\n .stream()\n .allMatch(ElevatorController::isInactive);\n }",
"public boolean m16923b() {\n return this.f14943b.getInt(\"is_upload_err_log\") == 0;\n }",
"@java.lang.Override\n public boolean hasFirewall() {\n return stepInfoCase_ == 6;\n }",
"public static boolean isTracing() {\n return Trace.isTracing();\n }",
"protected boolean shouldStartRoutes() {\n return isStarted() && !isStarting();\n }",
"public static boolean isDebugAccessible() {\r\n\t\treturn DEBUG_DEPENDENCY;\r\n\t}",
"private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}",
"public boolean isError() {\n return code >= 400;\n }",
"@Override\n\t\t\tpublic boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2) throws Exception {\n\t\t\t\tSystem.out.println(\"自定义拦截器preHandle\");\n\t\t\t\treturn true;\n\t\t\t}",
"public boolean hasValidRoute() \n {\n return validRoute;\n }",
"public static void enableDebugging(){\n DEBUG = true;\n }",
"public boolean isResponse(){\n return true;\n }",
"public static boolean isDebugEnabled() {\n\n return debugLogger.isDebugEnabled();\n }",
"public static boolean isDebugging(final String trace) {\n return getDefault().isDebugging()\n && \"true\".equalsIgnoreCase(Platform.getDebugOption(trace)); //$NON-NLS-1$ \n }",
"public boolean hasDebugId() {\n return result.hasDebugId();\n }",
"protected boolean checkTraceEnabled() {\n String sysTraceEnabled = System.getenv(TRACE_ENABLED_ENV);\n if (sysTraceEnabled == null) {\n return false;\n }\n\n if (sysTraceEnabled.toLowerCase().equals(\"true\")) {\n return true;\n }\n return false;\n }"
]
| [
"0.6681812",
"0.6339038",
"0.63340294",
"0.6299877",
"0.6294159",
"0.6294159",
"0.6187587",
"0.612619",
"0.6109798",
"0.610891",
"0.610891",
"0.60934335",
"0.6087054",
"0.60809976",
"0.6051968",
"0.6014817",
"0.60095495",
"0.59875494",
"0.59614056",
"0.5907999",
"0.5900823",
"0.58961207",
"0.5860973",
"0.5818063",
"0.5815429",
"0.5801674",
"0.5784559",
"0.5784559",
"0.5784559",
"0.5747545",
"0.57420015",
"0.57409525",
"0.5707166",
"0.5707166",
"0.56932217",
"0.5687378",
"0.5668173",
"0.5654891",
"0.5629521",
"0.5614621",
"0.5608491",
"0.5603523",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55918986",
"0.55807054",
"0.55780095",
"0.55780095",
"0.5560738",
"0.55585974",
"0.5547346",
"0.5539555",
"0.55259085",
"0.5520209",
"0.5496266",
"0.5482695",
"0.5482108",
"0.54781854",
"0.54750365",
"0.54750365",
"0.5464666",
"0.5458574",
"0.54406136",
"0.54394305",
"0.5431225",
"0.5425757",
"0.5423935",
"0.54236764",
"0.5398127",
"0.5398127",
"0.5376381",
"0.5348614",
"0.5342619",
"0.53293025",
"0.53249407",
"0.532285",
"0.53075635",
"0.5302452",
"0.53014857",
"0.52997494",
"0.52952224",
"0.52762127",
"0.52688617",
"0.5266084",
"0.5254105",
"0.5252186",
"0.52401584",
"0.5227055",
"0.52223694",
"0.5217232",
"0.5213614",
"0.5212705",
"0.5200329"
]
| 0.6327733 | 3 |
Creates a calculator instance and gives it height and width. | public Calculator(int width, int height) {
buttons = new JButton[BUTTON_CAPTIONS.length];
operand = new StringBuilder("0");
initUI(width, height);
firstOperand = true;
expression = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CalcWindow (){\n\t\tsuper();\n\t\tsetProperties(\"Calculator\");\n\t}",
"public Calculator() {\r\n\t\tsuper();\r\n\t}",
"public Calculator()\n {\n \n frame = new JFrame();\n createCalculator(range);\n createCP(range);\n frame.setVisible(true);\n frame.setSize(1200,1000);\n \n\n }",
"public Calculator() {\n initComponents();\n \n }",
"public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }",
"public Calculator()\n {\n \n }",
"public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }",
"private Calculator() {\n }",
"public CalculatorWindow ( )\n\t{\n\t\t/* Name of the window set using the super constructor. Size of the window initialized to \n\t\t * default values of WINDOW_WIDTH and WINDOW_HEIGHT. Default layout set to the value of\n\t\t * faceGrid which is defined as a GridLayout with 2 rows and 1 column. Vertical gap between\n\t\t * components set to a default of 3 using the vGap variable. */\n\t\tsuper(\"Calculator\");\n\t\tthis.setSize (WINDOW_WIDTH, WINDOW_HEIGHT);\n\t\tthis.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n\t\tthis.setLayout(faceGrid);\t\t\n\t\tvGap = 3;\n\t\tfaceGrid.setVgap(vGap);\n\t\t\n\t\t/* Icon loaded and set, components added, menu bar, menus, and menu items created, all \n\t\t * panels created. \t*/\n\t\tloadAndSetIcon();\n\t\taddComponents();\n\t\tcreateMenu();\n\t\tthis.setJMenuBar(menuBar);\n\t\tcreateTextPanel();\n\t\tcreateFunctionPanel();\n\t\tcreateHeaderPanel();\n\t\tcreateFooterPanel();\n\t\t\n\t\t/* Main panels added to the window\t*/\n\t\tadd(headerPanel);\n\t\tadd(footerPanel);\t\t\n\t\t\n\t\t/* All listeners created here */ \n\t\taddMenuListeners();\n\t\taddNumberListeners();\n\t\taddFunctionListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t/* Visible option initialized to true, resizable option initialized to false, location set\n\t\t * relative to null so that the window is centered on the screen, default action when enter\n\t\t * pressed is set to equals */\n\t\tthis.setVisible (true);\t\t\n\t\tthis.setResizable(false);\n\t\tthis.setLocationRelativeTo (null);\n\t\tgetRootPane().setDefaultButton(equals);\t\t\n\t\tbase = 10;\t\t\n\t}",
"public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}",
"public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}",
"Calcul createCalcul();",
"public StandardCalculator init() {\n this.load(\"+\", this.add());\n this.load(\"-\", this.subtract());\n this.load(\"*\", this.multiple());\n this.load(\"/\", this.div());\n return this;\n }",
"public calculator() {\n JFrame frame = new JFrame(\"Calculator\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n JPanel buttons = new JPanel(new GridLayout(4, 4));\n \n JPanel display = new JPanel();\n //numField.setEnabled(false);\n display.add(numField);\n numField.setHorizontalAlignment(JTextField.RIGHT);\n numField.setFont(new Font(\"Roboto\", Font.PLAIN, 24));\n \n buttonSetup();\n\n // Adds each button into the panel\n for(JButton i:buttonOrder)\n buttons.add(i);\n \n // Adds each component into the frame\n frame.add(buttons, BorderLayout.SOUTH);\n frame.add(display, BorderLayout.NORTH);\n frame.pack();\n \n frame.setSize(300, 180);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}",
"CalculatorController(){\n\t\tintegrationStrategy.put(IntegrationType.RECTANGLES, new CalculatorByRectangles());\n\t\tintegrationStrategy.put(IntegrationType.TRAPEZES, new CalculatorByTrapezes());\n\t\tintegrationStrategy.put(IntegrationType.INTEGRAL, new CalculatorByIntegration());\n\t}",
"public CalculatorDevice() {\n initComponents();\n }",
"public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}",
"public Calculus() {\n super(\"Výuka násobení a dělení\");\n\n ImageIcon icon = new ImageIcon(getClass().getResource(\"divide-icon.png\"));\n setIconImage(icon.getImage());\n\n container = this.getContentPane();\n\n this.setSize(600, 500);\n this.setVisible(true);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n container.setLayout(new CardLayout());\n\n createAndShowGUI();\n }",
"public Calc() {\n obj = new CalcOperation();\n initComponents();\n }",
"public Calculate() {\n initComponents();\n setIcon();\n }",
"public WinCalculator() {\n initComponents();\n }",
"@Override\r\n\tpublic CalculatorRS getCalculator(CalculatorRQ calculatorRQ) {\n\t\t\r\n\t\tint num_1=calculatorRQ.getValue_1();\r\n\t\tint num_2=calculatorRQ.getValue_2();\r\n\t\t\r\n\t\t\t\t\r\n\t\tCalculatorRS calculatorRS=new CalculatorRS(num_1+num_2,num_1-num_2,num_1*num_2);\r\n\t\treturn calculatorRS;\r\n\t}",
"public ConvCalculator(Expression exp){\r\n this();\r\n this.expression = exp;\r\n }",
"public ButtonPanel(CalculatorController appController)\n\t{\n\t\tsuper();\n\t\tthis.appController = appController;\n\t\tnumberLayout = new GridLayout(5, 4, 10, 10);\n\t\tzero = new CalculatorButton(appController, \"0\", Color.GRAY);\n\t\tone = new CalculatorButton(appController, \"1\", Color.GRAY);\n\t\ttwo = new CalculatorButton(appController, \"2\", Color.GRAY);\n\t\tthree = new CalculatorButton(appController, \"3\", Color.GRAY);\n\t\tfour = new CalculatorButton(appController, \"4\", Color.GRAY);\n\t\tfive = new CalculatorButton(appController, \"5\", Color.GRAY);\n\t\tsix = new CalculatorButton(appController, \"6\", Color.GRAY);\n\t\tseven = new CalculatorButton(appController, \"7\", Color.GRAY);\n\t\teight = new CalculatorButton(appController, \"8\", Color.GRAY);\n\t\tnine = new CalculatorButton(appController, \"9\", Color.GRAY);\n\t\tpoint = new CalculatorButton(appController, \".\", Color.GRAY);\n\t\tmultiply = new CalculatorButton(appController, \"x\", Color.BLUE);\n\t\tdivide = new CalculatorButton(appController, \"/\", Color.BLUE);\n\t\tadd = new CalculatorButton(appController, \"+\", Color.BLUE);\n\t\tsubtract = new CalculatorButton(appController, \"-\", Color.BLUE);\n\t\tans = new CalculatorButton(appController, \"Ans\", new Color(0, 170, 100));\n\t\tequals = new JButton();\n\t\tclear = new JButton();\n\t\tbackspace = new JButton();\n\t\tnegative = new JButton();\n\t\tsetupPanel();\n\t\tsetupButtons();\n\t\tsetupListeners();\n\t}",
"public computer(Calculator Calculator) {\n mCalculator = Calculator;\n mCalculator.attach(this);\n initComponents();\n }",
"public Frame() {\n\n super(\"Calculator\");\n final JPanel mainPanel = new JPanel(new GridBagLayout());\n\n //------ LOOK-AND-FEEL FOR THE CALCULATOR'S DISPLAY ------------//\n\n display = new JTextField(\"0\");\n Font font = display.getFont();\n font = font.deriveFont(font.getSize() * 1.8f);\n display.setFont(font);\n display.setHorizontalAlignment(SwingConstants.TRAILING);\n display.setEnabled(false);\n display.setDisabledTextColor(Color.GRAY);\n\n //--- ADD DISPLAY AND BUTTONS IN THE MAIN PANEL OF THE FRAME ---//\n\n mainPanel.add(display, new GridBagConstraints(0, 0, 5, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"7\", insert), new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"8\", insert), new GridBagConstraints(1, 1, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"9\", insert), new GridBagConstraints(2, 1, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"÷\", command), new GridBagConstraints(3, 1, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"C\", command), new GridBagConstraints(4, 1, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"4\", insert), new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"5\", insert), new GridBagConstraints(1, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"6\", insert), new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"*\", command), new GridBagConstraints(3, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"±\", command), new GridBagConstraints(4, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"1\", insert), new GridBagConstraints(0, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"2\", insert), new GridBagConstraints(1, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"3\", insert), new GridBagConstraints(2, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"-\", command), new GridBagConstraints(3, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"=\", command), new GridBagConstraints(4, 3, 1, 2, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.BOTH, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"0\", insert), new GridBagConstraints(0, 4, 2, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\".\", insert), new GridBagConstraints(2, 4, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n mainPanel.add(addButton(\"+\", command), new GridBagConstraints(3, 4, 1, 1, 0, 0, GridBagConstraints.CENTER,\n GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));\n\n //-------------------- FINAL WINDOW'S SETUP --------------------//\n\n getContentPane().add(mainPanel, BorderLayout.CENTER);\n setLocationRelativeTo(null);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n }",
"public CFCalculator() {\n initComponents();\n }",
"@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}",
"@Given(\"^I have a calculator$\")\n public void initializeCalculator() throws Throwable {\n calculator = new Calculator();\n }",
"public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calculator2.name);\n// System.out.println(calculator.getTotal());\n// calculator2.subtract(2f);\n// System.out.println(calculator2.getTotal());\n//\n// calculator.add(5f).subtract(1f).add(2.5f);\n// System.out.println(calculator.getTotal());\n\n for (int i = 0; i < 10; i++) {\n calculator.add(i);\n System.out.println(calculator.getTotal());\n }\n }",
"public ConvCalculator(){\r\n super(\"Conversions Calculator\");\r\n this.setSize(280,350);\r\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n expression = new DecExpression();\r\n menuFileItems[3].setSelected(true);\r\n //Layout per le cifre esadecimali - pannello sud\r\n south.setLayout(new GridLayout(1,6));\r\n //Creazione dei pulsanti di opzione e aggiunta delle gestioni evento\r\n conversions = new JRadioButton[] {\r\n new JRadioButton(\"hex\"), new JRadioButton(\"bin\"), new JRadioButton(\"dec\")\r\n };\r\n for(JRadioButton conv : conversions){\r\n conv.addActionListener(new ConversionManagement(this));\r\n }\r\n conversions[2].setSelected(true);\r\n //Aggiunta dei pulsanti di opzioni a un gruppo di pulsanti opzione\r\n ButtonGroup conv = new ButtonGroup();\r\n conv.add(conversions[0]); //hex\r\n conv.add(conversions[1]); //bin\r\n conv.add(conversions[2]); //dec\r\n //Creazione dei pulsanti numerici e aggiunta delle gestioni evento\r\n letters = new JButton[]{\r\n new JButton(\"A\"), new JButton(\"B\"),new JButton(\"C\"), \r\n new JButton(\"D\"), new JButton(\"E\"), new JButton(\"F\")\r\n };\r\n //Aggiunta delle lettere esadecimali al pannello sud + disabilitazione\r\n for(JButton letter : letters){\r\n letter.addActionListener(new NumericManagement(this));\r\n letter.setEnabled(false);\r\n south.add(letter);\r\n }\r\n //Modifica del pannello centrale\r\n Component[] compC = this.center.getComponents();\r\n compC[0] = conversions[0];\r\n compC[1] = conversions[1];\r\n compC[2] = conversions[2];\r\n center.removeAll();\r\n for(Component c : compC){\r\n center.add(c);\r\n }\r\n //Aggiunta del bordo al pannello sud\r\n south.setBorder(new TitledBorder(new EtchedBorder(5),\"Hex Letters\"));\r\n //Aggiunta dei componenti al form principale\r\n Container contentPane = this.getContentPane();\r\n contentPane.add(display,\"North\");\r\n contentPane.add(center,\"Center\");\r\n contentPane.add(south,\"South\");\r\n //apri la finestra calcolatrice\r\n this.setVisible(true);\r\n }",
"public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}",
"public CalculatorGUI() {\n initComponents();\n setTitle(\"Calculator\");\n //setLookAndFeel(\"Windows\");\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n calculator = new Calculator();\n ui = new CalculatorUI(this);\n \n setContentView(ui.getLayout()); \n }",
"public Calc(){\r\n CalcPad();\r\n }",
"public static void main(String[] args)\n\t {\n\t Calculator calculator = new Calculator();\n\t calculator.setVisible(true);\n\t calculator.setSize(400,310);\n\t calculator.setLocation(200,150); \n\t }",
"public RMSize getSize() { return new RMSize(getWidth(), getHeight()); }",
"public ArithmeticGUI(Analyzer analyzer, WindowEvents windowEvents) {\n this.analyzer = analyzer;\n this.windowEvents = windowEvents;\n\n expressionList.setModel(listModel = new DefaultListModel<>());\n\n }",
"public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }",
"public Math() {\n initComponents();\n }",
"public Window()\n {\n // sets title\n super(\"Awesome Calculator\");\n\n // generated design code\n initComponents();\n\n conversions.addListSelectionListener(this);\n\n // sets up the map\n buttons = new JButton[]{\n zero, one, two, three, four,\n five, six, seven, eight, nine\n };\n\n // stores the initial button color\n init = zero.getBackground();\n\n // center frame on screen\n setLocationRelativeTo(null);\n\n // don't have to worry about component focus\n KeyboardFocusManager.getCurrentKeyboardFocusManager()\n .addKeyEventDispatcher(new KeyEventDispatcher()\n {\n @Override\n public boolean dispatchKeyEvent(KeyEvent event)\n {\n if (event.getID() == KeyEvent.KEY_PRESSED)\n {\n keyPressed(event);\n }\n\n return false;\n }\n }\n );\n }",
"public Calculator(Server server) {\n\t\tthis.server = server;\n\t}",
"calculatorEngine() {//!\n\t\tdata = new Stack<Integer>();//!\n\t}",
"public SwerveDriveCalculator() {\n this(1.0, 1.0);\n }",
"public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}",
"public Dimension getSize() { return new Dimension(width,height); }",
"public static Volume do_calc() {\n\t\treturn new Volume();\n\t}",
"public void run()\n\t {\n\t JFrame calculatorView = new JFrame(\"Calculator\");\n\t calculatorView.setMinimumSize(new Dimension(276, 460));\n\t calculatorView.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t calculatorView.setContentPane(new CalculatorView());\n\t calculatorView.setVisible(true);\t\n\t }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_calculator, container, false);\n\n //initialize all Buttons\n one = (Button)view.findViewById(R.id.one);\n two = (Button)view.findViewById(R.id.two);\n three = (Button)view.findViewById(R.id.three);\n four = (Button)view.findViewById(R.id.four);\n five = (Button)view.findViewById(R.id.five);\n six = (Button)view.findViewById(R.id.six);\n seven = (Button)view.findViewById(R.id.seven);\n eight = (Button)view.findViewById(R.id.eight);\n nine = (Button)view.findViewById(R.id.nine);\n zero = (Button)view.findViewById(R.id.zero);\n plus = (Button)view.findViewById(R.id.plus);\n minus = (Button)view.findViewById(R.id.minus);\n multiply = (Button)view.findViewById(R.id.multiply);\n divide = (Button)view.findViewById(R.id.divide);\n equals = (Button)view.findViewById(R.id.equals);\n clear = (Button)view.findViewById(R.id.clear);\n\n one.setOnClickListener(this);\n two.setOnClickListener(this);\n three.setOnClickListener(this);\n four.setOnClickListener(this);\n five.setOnClickListener(this);\n six.setOnClickListener(this);\n seven.setOnClickListener(this);\n eight.setOnClickListener(this);\n nine.setOnClickListener(this);\n zero.setOnClickListener(this);\n plus.setOnClickListener(this);\n minus.setOnClickListener(this);\n multiply.setOnClickListener(this);\n divide.setOnClickListener(this);\n equals.setOnClickListener(this);\n clear.setOnClickListener(this);\n\n //initialize TextView\n screen = (TextView)view.findViewById(R.id.tvScreen);\n //initialize ArrayList that will store all numbers and operands\n numbersAndOperands = new ArrayList<>();\n\n return view;\n }",
"Praktikum_3() {\n setTitle(\"Desain Calculator\");\n setLocation(200, 100);\n setSize(300, 300);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }",
"public OscillatorCalculator() {\n this(1);\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }",
"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(new GridLayout(0, 1, 0, 0));\n\t\t\n\t\tJLabel lblDigiteAAltura = new JLabel(\"Digite a altura\");\n\t\tframe.getContentPane().add(lblDigiteAAltura);\n\t\t\n\t\ttextField = new JTextField();\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tJLabel lblDigiteOPeso = new JLabel(\"Digite o peso\");\n\t\tframe.getContentPane().add(lblDigiteOPeso);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\tframe.getContentPane().add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Calcular\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextField.getText();\n\t\t\t\ttextField_1.getText();\n\t\t\t\tDouble altura = Double.valueOf(textField.getText());\n\t\t\t\tDouble peso = Double.valueOf(textField_1.getText());\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Seu Indice de massa corporal é: \" + String.format(\"%.2f\", peso / (altura*altura)), null, JOptionPane.INFORMATION_MESSAGE);\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(btnNewButton);\n\t}",
"public CalculatorUtil(){\n value = \"\";\n decimalUsed = false;\n arr = new String[20];\n tail = 0;\n }",
"@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }",
"public UnitCalculator getUnitCalculator()\n {\n return m_calculator;\n }",
"public IdealWeightCalculator() {\n initComponents();\n }",
"public Size(double width, double height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n }",
"public Game(){\n\t\tDimension size = new Dimension(width * scale, height * scale);\n\t\tsetPreferredSize(size);\n\t\t\n\t\tscreen = new Screen(width, height);//instantiated the new screen\n\t\t\n\t\tframe = new JFrame();\n\t\t\n\t}",
"public MathEquation() {\n }",
"public LoanCalculator() {\n initComponents();\n this.setLocationRelativeTo(null); //centers form\n this.getRootPane().setDefaultButton(CalculateJButton);\n \n // set icon for form\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(\"\\\\\\\\zeus\\\\profile$\\\\955331307\\\\my documents\\\\CS 141\\\\Lab 2\\\\Lab 2 -- Loan Calculator\\\\eclipse.png\"));\n PrincipalJTextField.requestFocus();\n setDate();\n }",
"public UserInterface(Pane theRoot) {\n\n\t\t// There are five gaps. Compute the button space accordingly.\n\t\tbuttonSpace = Calculator.WINDOW_WIDTH / 6.5;\n\n\t\t// Label theScene with the name of the calculator, centered at the top of the\n\t\t// pane\n\t\tsetupLabelUI(label_UNumberCalculator, \"Arial\", 24, Calculator.WINDOW_WIDTH, Pos.CENTER, 0, 10);\n\n\t\t// Label the first operand just above it, left aligned\n\t\tsetupLabelUI(label_Operand1, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 35, 75);\n\n\t\t// Establish the first text input operand field and when anything changes in\n\t\t// operand 1,\n\t\t// process both fields to ensure that we are ready to perform as soon as\n\t\t// possible.\n\t\tsetupTextUI(text_Operand1, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 150, 70, true);\n\t\ttext_Operand1.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tsetOperand1();\n\t\t});\n\t\t// Move focus to the second operand when the user presses the enter (return) key\n\t\ttext_Operand1.setOnAction((event) -> {\n\t\t\tif (text_Operand1.getText().isEmpty())\n\t\t\t\tlabel_errOperand1.setText(\"Please enter the Values\");\n\t\t\ttext_Operand3.requestFocus();\n\t\t});\n\n\t\t// Bottom proper error message\n\t\tlabel_errOperand1.setTextFill(Color.RED);\n\t\tlabel_errOperand1.setAlignment(Pos.BASELINE_LEFT);\n\t\tsetupLabelUI(label_errOperand1, \"Arial\", 14, Calculator.WINDOW_WIDTH, Pos.BASELINE_LEFT, 142, 128);\n\n\t\tsetupLabelUI(label_variable, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 515, 75);\n\n\t\t// Label the units and set the text field for the units for the first value.\n\t\tsetupLabelUI(units, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 990, 45);\n\n\t\tcomboBox1.setPromptText(\"\");\n\t\tcomboBox1.getItems().addAll(\"km\", \"miles\", \"m\", \"km/seconds\", \"miles/seconds\", \"days\", \"seconds\", \"No Unit\");\n\t\tcomboBox1.setLayoutX(940);\n\t\tcomboBox1.setLayoutY(70);\n\t\tcomboBox1.setOnAction(event -> {\n\t\t\tperform.setOperand1(text_Operand1.getText());\n\t\t\tperform.setOperand2(text_Operand2.getText());\n\t\t\tperform.setOperand3(text_Operand3.getText());\n\t\t\tperform.setOperand4(text_Operand1.getText());\n\t\t});\n\t\t// Establish the Third text input operand field and when anything changes in\n\t\t// operand 3,\n\t\t// process both fields to ensure that we are ready to perform as soon as\n\t\t// possible.\n\t\tsetupTextUI(text_Operand3, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 540, 70, true);\n\t\ttext_Operand3.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tsetOperand3();\n\t\t});\n\t\t// Move focus to the Third operand when the user presses the enter (return) key\n\t\ttext_Operand3.setOnAction((event) -> {\n\t\t\ttext_Operand2.requestFocus();\n\t\t});\n\n\t\t// Bottom proper error message\n\t\tlabel_errOperand3.setTextFill(Color.RED);\n\t\tlabel_errOperand3.setAlignment(Pos.BASELINE_RIGHT);\n\t\tsetupLabelUI(label_errOperand3, \"Arial\", 14, Calculator.WINDOW_WIDTH - 100 - 10, Pos.BASELINE_LEFT, 540, 128);\n\n\t\t// Label the second operand just above it, left aligned\n\t\tsetupLabelUI(label_Operand2, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 10, 157.5);\n\n\t\t// Establish the second text input operand field and when anything changes in\n\t\t// operand 2,\n\t\t// process both fields to ensure that we are ready to perform as soon as\n\t\t// possible.\n\t\tsetupTextUI(text_Operand2, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 150, 155, true);\n\t\ttext_Operand2.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tsetOperand2();\n\t\t});\n\n\t\t// Move the focus to the result when the user presses the enter (return) key\n\t\ttext_Operand2.setOnAction((event) -> {\n\t\t\tif (text_Operand2.getText().isEmpty()) {\n\t\t\t\tlabel_errOperand2.setText(\"Please enter the Values\");\n\t\t\t}\n\t\t\ttext_Operand4.requestFocus();\n\t\t});\n\n\t\t// Bottom proper error message\n\t\tlabel_errOperand2.setTextFill(Color.RED);\n\t\tlabel_errOperand2.setAlignment(Pos.BASELINE_RIGHT);\n\t\tsetupLabelUI(label_errOperand2, \"Arial\", 14, Calculator.WINDOW_WIDTH - 150 - 10, Pos.BASELINE_LEFT, 150, 210);\n\t\tlabel_errOperand2.setTextFill(Color.RED);\n\n\t\tsetupLabelUI(label_variable1, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 515, 160);\n\n\t\t// Establish the Fourth text input operand field and when anything changes in\n\t\t// operand 4,\n\t\t// process both fields to ensure that we are ready to perform as soon as\n\t\t// possible.\n\t\tsetupTextUI(text_Operand4, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 540, 155, true);\n\t\ttext_Operand4.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tsetOperand4();\n\t\t});\n\n\t\t// Bottom proper error message\n\t\tlabel_errOperand4.setTextFill(Color.RED);\n\t\tlabel_errOperand4.setAlignment(Pos.BASELINE_RIGHT);\n\t\tsetupLabelUI(label_errOperand4, \"Arial\", 14, Calculator.WINDOW_WIDTH - 150 - 10, Pos.BASELINE_LEFT, 540, 210);\n\t\tlabel_errOperand4.setTextFill(Color.RED);\n\n\t\t// Set the text field for the units for the second value.\n\t\t// Label the units and set the text field for the units for the first value.\n\n\t\tcomboBox2.setPromptText(\"\");\n\t\tcomboBox2.getItems().addAll(\"km\", \"miles\", \"m\", \"km/seconds\", \"miles/seconds\", \"days\", \"seconds\", \"No Unit\");\n\t\tcomboBox2.setLayoutX(940);\n\t\tcomboBox2.setLayoutY(155);\n\t\tcomboBox2.setOnAction(event -> {\n\t\t\tperform.setOperand1(text_Operand1.getText());\n\t\t\tperform.setOperand2(text_Operand2.getText());\n\t\t\tperform.setOperand3(text_Operand3.getText());\n\t\t\tperform.setOperand4(text_Operand1.getText());\n\t\t});\n\n\t\t// Label the result just above the result output field, left aligned\n\t\tsetupLabelUI(label_Result, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 85, 345);\n\n\t\t// Establish the result output field. It is not editable, so the text can be\n\t\t// selected and copied,\n\t\t// but it cannot be altered by the user. The text is left aligned.\n\t\tsetupTextUI(text_Result, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 150, 340, false);\n\n\t\t// Establish an error message for the Result operand just above it with, right\n\t\t// aligned\n\n\t\tsetupLabelUI(label_errResult, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 150, 210);\n\t\tlabel_errResult.setTextFill(Color.RED);\n\n\t\tsetupLabelUI(label_variable2, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 515, 345);\n\n\t\t// Establish the result output field. It is not editable, so the text can be\n\t\t// selected and copied,\n\t\t// but it cannot be altered by the user. The text is left aligned.\n\t\tsetupTextUI(text_Resulterr, \"Arial\", 18, Calculator.WINDOW_WIDTH - 850, Pos.BASELINE_LEFT, 540, 340, false);\n\n\t\t// Establish an error message for the Result operand just above it with, right\n\t\t// aligned\n\t\tsetupLabelUI(label_errResulterr, \"Arial\", 18, Calculator.WINDOW_WIDTH - 10, Pos.BASELINE_LEFT, 540, 340);\n\t\tlabel_errResulterr.setTextFill(Color.RED);\n\n\t\t// Set the text field for the units for the second value.\n\t\t// Label the units and set the text field for the units for the first value.\n\t\tcomboBoxRes.setPromptText(\"\");\n\t\tcomboBoxRes.getItems().addAll(\"km \", \"miles \", \"m \", \"s \", \"Days \", \"No Unit\");\n\t\tlastUnit = comboBoxRes.getSelectionModel().getSelectedItem();\n\t\tcomboBoxRes.setLayoutX(940);\n\t\tcomboBoxRes.setLayoutY(340);\n//\t\tcomboBoxRes.setOnAction((event -> {\n//\t\t\tchangedResult();\n//\t\t\tfirstTime = false;\n//\t\t}));\n\n\t\t// Establish the ADD \"+\" button, position it, and link it to methods to\n\t\t// accomplish its work\n\t\tsetupButtonUI(button_Add, \"Symbol\", 32, BUTTON_WIDTH, Pos.BASELINE_LEFT, 1 * buttonSpace - BUTTON_OFFSET, 245);\n\t\tbutton_Add.setOnAction((event) -> {\n\t\t\taddOperands();\n\t\t});\n\n\t\t// Establish the SUB \"-\" button, position it, and link it to methods to\n\t\t// accomplish its work\n\t\tsetupButtonUI(button_Sub, \"Symbol\", 32, BUTTON_WIDTH, Pos.BASELINE_LEFT, 2 * buttonSpace - BUTTON_OFFSET, 245);\n\t\tbutton_Sub.setOnAction((event) -> {\n\t\t\tsubOperands();\n\t\t});\n\n\t\t// Establish the MPY \"x\" button, position it, and link it to methods to\n\t\t// accomplish its work\n\t\tsetupButtonUI(button_Mpy, \"Symbol\", 32, BUTTON_WIDTH, Pos.BASELINE_LEFT, 3 * buttonSpace - BUTTON_OFFSET, 245);\n\t\tbutton_Mpy.setOnAction((event) -> {\n\t\t\tmpyOperands();\n\t\t});\n\n\t\t// Establish the DIV \"/\" button, position it, and link it to methods to\n\t\t// accomplish its work\n\t\tsetupButtonUI(button_Div, \"Symbol\", 32, BUTTON_WIDTH, Pos.BASELINE_LEFT, 4 * buttonSpace - BUTTON_OFFSET, 245);\n\t\tbutton_Div.setOnAction((event) -> {\n\t\t\tdivOperands();\n\t\t});\n\n\t\t// Establish the SQRT \"root\" button, position it, and link it to methods to\n\t\t// accomplish its work\n\t\tsetupButtonUI(button_Sqrt, \"Symbol\", 32, BUTTON_WIDTH, Pos.BASELINE_LEFT, 5 * buttonSpace - BUTTON_OFFSET, 245);\n\t\tbutton_Sqrt.setOnAction((event) -> {\n\t\t\tsqrtOperands();\n\t\t});\n\n\t\t// Error Message for the Measured Value for operand 1\n\t\toperand1ErrPart1.setFill(Color.BLACK);\n\t\toperand1ErrPart1.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 18));\n\t\toperand1ErrPart2.setFill(Color.RED);\n\t\toperand1ErrPart2.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 24));\n\t\terr1 = new TextFlow(operand1ErrPart1, operand1ErrPart2);\n\t\terr1.setMinWidth(Calculator.WINDOW_WIDTH - 10);\n\t\terr1.setLayoutX(160);\n\t\terr1.setLayoutY(100);\n\n\t\t// Error Message for the Measured Value for operand 2\n\t\toperand2ErrPart1.setFill(Color.BLACK);\n\t\toperand2ErrPart1.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 18));\n\t\toperand2ErrPart2.setFill(Color.RED);\n\t\toperand2ErrPart2.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 24));\n\t\terr2 = new TextFlow(operand2ErrPart1, operand2ErrPart2);\n\t\terr2.setMinWidth(Calculator.WINDOW_WIDTH - 10);\n\t\terr2.setLayoutX(160);\n\t\terr2.setLayoutY(190);\n\n\t\t// Error Message for the Measured Value for operand 3\n\t\toperand3ErrPart1.setFill(Color.BLACK);\n\t\toperand3ErrPart1.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 18));\n\t\toperand3ErrPart2.setFill(Color.RED);\n\t\toperand3ErrPart2.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 24));\n\t\terr3 = new TextFlow(operand3ErrPart1, operand3ErrPart2);\n\t\terr3.setMinWidth(Calculator.WINDOW_WIDTH - 10);\n\t\terr3.setLayoutX(560);\n\t\terr3.setLayoutY(100);\n\n\t\t// Error Message for the Measured Value for operand 4\n\t\toperand4ErrPart1.setFill(Color.BLACK);\n\t\toperand4ErrPart1.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 18));\n\t\toperand4ErrPart2.setFill(Color.RED);\n\t\toperand4ErrPart2.setFont(Font.font(\"Arial\", FontPosture.REGULAR, 24));\n\t\terr4 = new TextFlow(operand4ErrPart1, operand4ErrPart2);\n\t\terr4.setMinWidth(Calculator.WINDOW_WIDTH - 10);\n\t\terr4.setLayoutX(560);\n\t\terr4.setLayoutY(190);\n\n\t\t// Place all of the just-initialized GUI elements into the pane\n\t\ttheRoot.getChildren().addAll(label_UNumberCalculator, label_variable, label_variable1, label_variable2,\n\t\t\t\tlabel_Operand1, text_Operand1, label_errOperand1, label_Operand2, text_Operand2, label_errOperand2,\n\t\t\t\ttext_Operand3, label_errOperand3, text_Operand4, label_errOperand4, label_Result, text_Result,\n\t\t\t\tlabel_errResult, text_Resulterr, label_errResulterr, button_Add, button_Sub, button_Mpy, button_Div,\n\t\t\t\tbutton_Sqrt, err1, err2, err3, err4, units, comboBox1, comboBox2, comboBoxRes);\n\n\t}",
"public static void createInstance(final double fontSize) {\n if (instance == null) {\n synchronized (CONSTRUCT) {\n instance = new UIParameters();\n }\n }\n instance.calcSizes(fontSize);\n }",
"public EasyCalcView (EasyCalcController controller) {\n\n JPanel easyCalcPanel = new JPanel();\n this.setTitle(TITLE);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setSize(SIZE, SIZE);\n this.setVisible(true);\n\n // add all components\n easyCalcPanel.add(valueLabel);\n easyCalcPanel.add(enterValue);\n easyCalcPanel.add(calculateAllBtn);\n easyCalcPanel.add(resultLabel);\n easyCalcPanel.add(calcResults);\n // make textarea read-only\n calcResults.setEditable(false);\n easyCalcPanel.add(clearBtn);\n easyCalcPanel.add(copyBtn);\n easyCalcPanel.add(factorsLabel);\n easyCalcPanel.add(factorsToChoose);\n easyCalcPanel.add(instructionsBtn);\n // set factor 4 as default\n factorsToChoose.setSelectedIndex(0);\n this.add(easyCalcPanel);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n titleLabel = new javax.swing.JLabel();\n lenLabel = new javax.swing.JLabel();\n widLabel = new javax.swing.JLabel();\n widthInput = new javax.swing.JTextField();\n lengthInput = new javax.swing.JTextField();\n calcButton = new javax.swing.JButton();\n outputLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n setForeground(new java.awt.Color(255, 255, 255));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n titleLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n titleLabel.setText(\"Area of a Rectangle\");\n\n lenLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lenLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lenLabel.setText(\"Length:\");\n\n widLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n widLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n widLabel.setText(\"Width:\");\n\n widthInput.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n lengthInput.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n calcButton.setText(\"Calculate\");\n calcButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n calcButtonActionPerformed(evt);\n }\n });\n\n outputLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(titleLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(widLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(lenLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(93, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(203, Short.MAX_VALUE)\n .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(92, 92, 92)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(48, 48, 48)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lenLabel)\n .addGap(66, 66, 66)\n .addComponent(widLabel))\n .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(outputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(40, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(255, Short.MAX_VALUE)))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"private JButton getJbtnCalculate() {\n\t\tif (jbtnCalculate == null) {\n\t\t\tjbtnCalculate = new JButton();\n\t\t\tjbtnCalculate.setText(\"Calculate\");\n\t\t\tjbtnCalculate.setBounds(new Rectangle(128, 520, 213, 34));\n\t\t\tjbtnCalculate.setActionCommand(\"Calculate\");\n\t\t}\n\t\treturn jbtnCalculate;\n\t}",
"public interface CalculatorService {\n\n\tpublic double add(double arg1, double arg2); \n\tpublic double sub(double arg1, double arg2); \n\tpublic double div(double arg1, double arg2);\n\tpublic double mult(double arg1, double arg2);\n}",
"public static RadianceIcon of(int width, int height) {\n ext_h base = new ext_h();\n base.width = width;\n base.height = height;\n return base;\n }",
"private LLCalc createCalc(Grammar g) {\n\t\treturn new MyLLCalc(g);\n\t}",
"public Size(int w, int h) {\n width = w;\n height = h;\n }",
"GridBagLayoutCalc(){\n\n windowContent = new JPanel();\n\n // Set the layout manager for this panel\n GridBagLayout gblwc = new GridBagLayout();\n windowContent.setLayout(gblwc);\n\n\n // Create the display field and place it in the\n // North area of the window\n\n displayField = new JTextField(20);\n gblwc.setConstraints(displayField, constr);\n windowContent.add(\"0\",displayField);\n \n\n // Create buttons using constructor of the\n // class JButton that takes the label of the\n // button as a parameter\n\n JButton[] numbers = new JButton[10];\n JButton[] equals = new JButton[1];\n JButton[] controllers = new JButton[4];\n\n String[] numbers_name = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"};\n String[] equals_name = {\"=\"};\n String[] controllers_name = {\"+\", \"-\", \"*\", \"/\"};\n\n // Create the panel with the GridBagLayout with 15 buttons\n //10 numeric ones, 4 controllers, and the equal sign\n\n p1 = new JPanel();\n GridBagLayout gbl =new GridBagLayout();\n p1.setLayout(gbl);\n\n // Add window controls to the panel p1\n panelMaker(numbers, numbers_name, p1, Color.BLUE);\n panelMaker(equals, equals_name, p1, Color.BLACK);\n panelMaker(controllers, controllers_name, p1, Color.BLACK);\n\n }",
"private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}",
"public static void main(String[] args) {\n Calculator result = new Calculator();\n\n // Perform operations on the object and print the calculations with the result\n System.out.println(\"1 + 1 = \" + result.add(1, 1));\n System.out.println(\"23 - 52 = \" + result.subtract(23, 52));\n System.out.println(\"34 * 2 = \" + result.multiply(34, 2));\n System.out.println(\"12 / 3 = \" + result.divide(12, 3));\n System.out.println(\"12 / 7 = \" + result.divide(12, 7));\n System.out.println(\"3.4 + 2.3 = \" + result.add(3.4, 2.3));\n System.out.println(\"6.7 * 4.4 = \" + result.add(6.7, 4.4));\n System.out.println(\"5.5 - 0.5 = \" + result.subtract(5.5,0.5));\n System.out.println(\"10.8 / 2.2 = \" + result.divide(10.8, 2.2));\n }",
"private Equation createEquation() throws MainApplicationException {\r\n\t\tEquation equation = new Equation(false,\r\n\t\t\t\t\"a+b=c\", \r\n\t\t\t\tfalse, \r\n\t\t\t\tnew Parametre(), \r\n\t\t\t\t\"Insérer Propriété\",\r\n\t\t\t\t\"Insérer commentaire\");\r\n\t\tequation.setIsModifiable(true);\r\n\t\treturn equation;\r\n\t}",
"public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Calculator().setVisible(true);\n }\n } \n );\n}",
"private void initialize() {\n\t\tfrmJavaCalculator = new JFrame();\n\t\tfrmJavaCalculator.setResizable(false);\n\t\tfrmJavaCalculator.setType(Type.UTILITY);\n\t\tfrmJavaCalculator.setTitle(\"Calculator\");\n\t\tfrmJavaCalculator.setBounds(100, 100, 278, 345);\n\t\tfrmJavaCalculator.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmJavaCalculator.setLocation(500, 250);\n\t\tfrmJavaCalculator.getContentPane().setLayout(null);\n\t\t\n\t\tdisplayText = new JTextField();\n\t\tdisplayText.setEditable(false);\n\t\tdisplayText.setBackground(Color.WHITE);\n\t\tdisplayText.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tdisplayText.setFont(new Font(\"Tahoma\", Font.BOLD, 22));\n\t\tdisplayText.setBounds(10, 23, 244, 36);\n\t\tfrmJavaCalculator.getContentPane().add(displayText);\n\t\tdisplayText.setColumns(10);\n\t\t\n\t\tJButton btnClear = new JButton(\"AC\");\n\t\tbtnClear.setFocusable(false);\n\t\tbtnClear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tbtnClear.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnClear.setBounds(10, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnClear);\n\t\t\n\t\tJButton btnSign = new JButton(\"+-\");\n\t\tbtnSign.setFocusable(false);\n\t\tbtnSign.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnSign.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnSign.setBounds(74, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnSign);\n\t\t\n\t\tJButton btnMod = new JButton(\"%\");\n\t\tbtnMod.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"%\");\n\t\t\t}\n\t\t});\n\t\tbtnMod.setFocusable(false);\n\t\tbtnMod.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMod.setBounds(138, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMod);\n\t\t\n\t\tJButton btnDiv = new JButton(\"\\u00F7\");\n\t\tbtnDiv.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"\\u00F7\");\n\t\t\t}\n\t\t});\n\t\tbtnDiv.setFocusable(false);\n\t\tbtnDiv.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnDiv.setBounds(200, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnDiv);\n\t\t\n\t\tJButton btn7 = new JButton(\"7\");\n\t\tbtn7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"7\");\n\t\t\t}\n\t\t});\n\t\tbtn7.setFocusable(false);\n\t\tbtn7.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn7.setBounds(10, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn7);\n\t\t\n\t\tJButton btn8 = new JButton(\"8\");\n\t\tbtn8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"8\");\n\t\t\t}\n\t\t});\n\t\tbtn8.setFocusable(false);\n\t\tbtn8.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn8.setBounds(74, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn8);\n\t\t\n\t\tJButton btn9 = new JButton(\"9\");\n\t\tbtn9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"9\");\n\t\t\t}\n\t\t});\n\t\tbtn9.setFocusable(false);\n\t\tbtn9.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn9.setBounds(138, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn9);\n\t\t\n\t\tJButton btnMult = new JButton(\"\\u00D7\");\n\t\tbtnMult.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"\\u00D7\");\n\t\t\t}\n\t\t});\n\t\tbtnMult.setFocusable(false);\n\t\tbtnMult.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMult.setBounds(200, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMult);\n\t\t\n\t\tJButton btn4 = new JButton(\"4\");\n\t\tbtn4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"4\");\n\t\t\t}\n\t\t});\n\t\tbtn4.setFocusable(false);\n\t\tbtn4.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn4.setBounds(10, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn4);\n\t\t\n\t\tJButton btn5 = new JButton(\"5\");\n\t\tbtn5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"5\");\n\t\t\t}\n\t\t});\n\t\tbtn5.setFocusable(false);\n\t\tbtn5.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn5.setBounds(74, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn5);\n\t\t\n\t\tJButton btn6 = new JButton(\"6\");\n\t\tbtn6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"6\");\n\t\t\t}\n\t\t});\n\t\tbtn6.setFocusable(false);\n\t\tbtn6.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn6.setBounds(138, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn6);\n\t\t\n\t\tJButton btnMinus = new JButton(\"-\");\n\t\tbtnMinus.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"-\");\n\t\t\t}\n\t\t});\n\t\tbtnMinus.setFocusable(false);\n\t\tbtnMinus.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMinus.setBounds(200, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMinus);\n\t\t\n\t\tJButton btn1 = new JButton(\"1\");\n\t\tbtn1.setFocusable(false);\n\t\tbtn1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"1\");\n\t\t\t}\n\t\t});\n\t\tbtn1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn1.setBounds(10, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn1);\n\t\t\n\t\tJButton btn2 = new JButton(\"2\");\n\t\tbtn2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"2\");\n\t\t\t}\n\t\t});\n\t\tbtn2.setFocusable(false);\n\t\tbtn2.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn2.setBounds(74, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn2);\n\t\t\n\t\tJButton btn3 = new JButton(\"3\");\n\t\tbtn3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"3\");\n\t\t\t}\n\t\t});\n\t\tbtn3.setFocusable(false);\n\t\tbtn3.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn3.setBounds(138, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn3);\n\t\t\n\t\tJButton btnPlus = new JButton(\"+\");\n\t\tbtnPlus.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if this is the first operator\n\t\t\t\tdisplayText.setText(displayText.getText() + \"+\");\n\t\t\t}\n\t\t});\n\t\tbtnPlus.setFocusable(false);\n\t\tbtnPlus.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnPlus.setBounds(200, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnPlus);\n\t\t\n\t\tJButton btn0 = new JButton(\"0\");\n\t\tbtn0.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if this is the first digit\n\t\t\t\tdisplayText.setText(displayText.getText() + \"0\");\n\t\t\t}\n\t\t});\n\t\tbtn0.setFocusable(false);\n\t\tbtn0.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn0.setBounds(10, 258, 118, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn0);\n\t\t\n\t\tJButton btnDot = new JButton(\".\");\n\t\tbtnDot.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if there is a decimal point already\n\t\t\t\tdisplayText.setText(displayText.getText() + \".\");\n\t\t\t}\n\t\t});\n\t\tbtnDot.setFocusable(false);\n\t\tbtnDot.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnDot.setBounds(138, 258, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnDot);\n\t\t\n\t\tJButton btnEqual = new JButton(\"=\");\n\t\tbtnEqual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcalculate();\n\t\t\t}\n\t\t});\n\t\tbtnEqual.setFocusable(false);\n\t\tbtnEqual.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnEqual.setBounds(200, 258, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnEqual);\n\t}",
"private void initialize() { \r\n\t\t\r\n\t\tframe = new JFrame(\"Calculator\");\r\n\t\tframe.setBounds(100, 100, 673, 862);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel output = new JLabel(\"\");\r\n\t\toutput.setFont(new Font(\"Ebrima\", Font.PLAIN, 40));\r\n\t\toutput.setOpaque(true);\r\n\t\toutput.setBackground(Color.WHITE);\r\n\t\toutput.setBounds(38, 51, 560, 108);\r\n\t\tframe.getContentPane().add(output);\r\n\t\t\r\n\t\tJButton button1 = new JButton(\"1\");\r\n\t\tbutton1.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton1.setBounds(38, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button1);\r\n\t\tbutton1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"1\";\r\n\t\t\t\teqLabel += \"1\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button0 = new JButton(\"0\");\r\n\t\tbutton0.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton0.setBounds(38, 666, 100, 100);\r\n\t\tframe.getContentPane().add(button0);\r\n\t\tbutton0.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"0\";\r\n\t\t\t\teqLabel += \"0\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonDot = new JButton(\".\");\r\n\t\tbuttonDot.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonDot.setBounds(153, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonDot);\r\n\t\tbuttonDot.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \".\";\r\n\t\t\t\teqLabel += \".\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\tJButton buttonNeg = new JButton(\"(-)\");\r\n\t\tbuttonNeg.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonNeg.setBounds(268, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonNeg);\r\n\t\tbuttonNeg.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"-\";\r\n\t\t\t\teqLabel += \"-\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button2 = new JButton(\"2\");\r\n\t\tbutton2.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton2.setBounds(153, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button2);\r\n\t\tbutton2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"2\";\r\n\t\t\t\teqLabel += \"2\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button3 = new JButton(\"3\");\r\n\t\tbutton3.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton3.setBounds(268, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button3);\r\n\t\tbutton3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"3\";\r\n\t\t\t\teqLabel += \"3\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button4 = new JButton(\"4\");\r\n\t\tbutton4.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton4.setBounds(38, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button4);\r\n\t\tbutton4.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"4\";\r\n\t\t\t\teqLabel += \"4\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button5 = new JButton(\"5\");\r\n\t\tbutton5.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton5.setBounds(153, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button5);\r\n\t\tbutton5.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"5\";\r\n\t\t\t\teqLabel += \"5\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button6 = new JButton(\"6\");\r\n\t\tbutton6.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton6.setBounds(268, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button6);\r\n\t\tbutton6.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"6\";\r\n\t\t\t\teqLabel += \"6\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button7 = new JButton(\"7\");\r\n\t\tbutton7.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton7.setBounds(38, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button7);\r\n\t\tbutton7.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"7\";\r\n\t\t\t\teqLabel += \"7\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button8 = new JButton(\"8\");\r\n\t\tbutton8.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton8.setBounds(153, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button8);\r\n\t\tbutton8.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"8\";\r\n\t\t\t\teqLabel += \"8\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button9 = new JButton(\"9\");\r\n\t\tbutton9.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton9.setBounds(268, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button9);\r\n\t\tbutton9.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"9\";\r\n\t\t\t\teqLabel += \"9\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonOpenParen = new JButton(\"(\");\r\n\t\tbuttonOpenParen.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonOpenParen.setBounds(383, 318, 100, 100);\r\n\t\tframe.getContentPane().add(buttonOpenParen);\r\n\t\tbuttonOpenParen.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \" ( \";\r\n\t\t\t\teqLabel += \"(\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonClosedParen = new JButton(\")\");\r\n\t\tbuttonClosedParen.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonClosedParen.setBounds(498, 318, 100, 100);\r\n\t\tframe.getContentPane().add(buttonClosedParen);\r\n\t\tbuttonClosedParen.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \" ) \";\r\n\t\t\t\teqLabel += \")\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonMult = new JButton(\"x\");\r\n\t\tbuttonMult.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonMult.setBounds(383, 434, 100, 100);\r\n\t\tframe.getContentPane().add(buttonMult);\r\n\t\tbuttonMult.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" * \";\r\n\t\t\t\t\toutput.setText(\"ANS*\");\r\n\t\t\t\t\teqLabel = \"ANS*\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" * \";\r\n\t\t\t\t\teqLabel += \"*\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonDivide = new JButton(\"\\u00F7\");\r\n\t\tbuttonDivide.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonDivide.setBounds(498, 434, 100, 100);\r\n\t\tframe.getContentPane().add(buttonDivide);\r\n\t\tbuttonDivide.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" / \";\r\n\t\t\t\t\toutput.setText(\"ANS÷\");\r\n\t\t\t\t\teqLabel = \"ANS÷\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" / \";\r\n\t\t\t\t\teqLabel += \"÷\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonAdd = new JButton(\"+\");\r\n\t\tbuttonAdd.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonAdd.setBounds(383, 550, 100, 100);\r\n\t\tframe.getContentPane().add(buttonAdd);\r\n\t\tbuttonAdd.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" + \";\r\n\t\t\t\t\toutput.setText(\"ANS+\");\r\n\t\t\t\t\teqLabel = \"ANS+\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" + \";\r\n\t\t\t\t\teqLabel += \"+\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonSub = new JButton(\"-\");\r\n\t\tbuttonSub.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonSub.setBounds(498, 550, 100, 100);\r\n\t\tframe.getContentPane().add(buttonSub);\r\n\t\tbuttonSub.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" - \";\r\n\t\t\t\t\toutput.setText(\"ANS-\");\r\n\t\t\t\t\teqLabel = \"ANS-\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" - \";\r\n\t\t\t\t\teqLabel += \"-\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonAns = new JButton(\"ANS\");\r\n\t\tbuttonAns.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonAns.setBounds(383, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonAns);\r\n\t\tbuttonAns.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += Double.toString(result);\r\n\t\t\t\teqLabel += \"ANS\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonEqual = new JButton(\"=\");\r\n\t\tbuttonEqual.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonEqual.setBounds(498, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonEqual);\r\n\t\tbuttonEqual.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresult = Calculator.calculatePostExp(Calculator.convertInfix(Calculator.splitExp(equation)));\r\n\t\t\t\tequation = \"\";\r\n\t\t\t\teqLabel = \"\";\r\n\t\t\t\toutput.setText(Double.toString(result));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton btnDel = new JButton(\"DEL\");\r\n\t\tbtnDel.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbtnDel.setBounds(153, 202, 100, 100);\r\n\t\tframe.getContentPane().add(btnDel);\r\n\t\tbtnDel.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation = equation.substring(0, equation.length()-1);\r\n\t\t\t\teqLabel = equation.substring(0, eqLabel.length()-1);\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonCLR = new JButton(\"CLR\");\r\n\t\tbuttonCLR.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonCLR.setBounds(38, 202, 100, 100);\r\n\t\tframe.getContentPane().add(buttonCLR);\r\n\t\tbuttonCLR.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation = \"\";\r\n\t\t\t\teqLabel = \"\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}",
"Rectangle(int width, int height){\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }",
"public mathMethods() {\n initComponents();\n }",
"private void makeFrame() {\n\t\tframe = new JFrame(calc.getTitle());\n\n\t\tJPanel contentPane = (JPanel) frame.getContentPane();\n\t\tcontentPane.setLayout(new BorderLayout(8, 8));\n\t\tcontentPane.setBorder(new EmptyBorder(10, 10, 10, 10));\n\n\t\tdisplay = new JTextField();\n\t\tdisplay.setEditable(false);\n\t\tcontentPane.add(display, BorderLayout.NORTH);\n\n\t\tJPanel buttonPanel = new JPanel(new GridLayout(6, 5));\n\n\t\taddButton(buttonPanel, \"A\");\n\t\taddButton(buttonPanel, \"B\");\n\t\taddButton(buttonPanel, \"C\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\tJCheckBox check = new JCheckBox(\"HEX\");\n\t\tcheck.addActionListener(this);\n\t\tbuttonPanel.add(check);\n\n\t\taddButton(buttonPanel, \"D\");\n\t\taddButton(buttonPanel, \"E\");\n\t\taddButton(buttonPanel, \"F\");\n\t\taddButton(buttonPanel, \"(\");\n\t\taddButton(buttonPanel, \")\");\n\n\t\taddButton(buttonPanel, \"7\");\n\t\taddButton(buttonPanel, \"8\");\n\t\taddButton(buttonPanel, \"9\");\n\t\taddButton(buttonPanel, \"AC\");\n\t\taddButton(buttonPanel, \"^\");\n\n\t\taddButton(buttonPanel, \"4\");\n\t\taddButton(buttonPanel, \"5\");\n\t\taddButton(buttonPanel, \"6\");\n\t\taddButton(buttonPanel, \"*\");\n\t\taddButton(buttonPanel, \"/\");\n\n\t\taddButton(buttonPanel, \"1\");\n\t\taddButton(buttonPanel, \"2\");\n\t\taddButton(buttonPanel, \"3\");\n\t\taddButton(buttonPanel, \"+\");\n\t\taddButton(buttonPanel, \"-\");\n\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"0\");\n\t\tbuttonPanel.add(new JLabel(\" \"));\n\t\taddButton(buttonPanel, \"=\");\n\n\t\tcontentPane.add(buttonPanel, BorderLayout.CENTER);\n\n\t\tframe.pack();\n\t\thexToggle();\n\n\t}",
"private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tbutton1 = new JButton(\"1\");\n\t\tbutton2 = new JButton(\"2\");\n\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tFlowLayout flowlayout = new FlowLayout(FlowLayout.CENTER);\n\t\t\tsetLayout(flowlayout);\n\n\t\t\tflowlayout.setHgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tadd(button1);\n\t\tadd(button2);\n\t\t}",
"public interface Calculator extends Remote {\n\tString add(int x, int y) throws RemoteException;\n\n\n\tString subtract(int x, int y) throws RemoteException;\n\n\n\tString divide(int x, int y) throws RemoteException;\n\n\n\tString multiply(int x, int y) throws RemoteException;\n}",
"public Sampler() { \n setLayout(new BorderLayout(GAP, GAP));\n setBackground(BKGD);\n int g = 2*GAP;\n Color b = Color.black;\n setBorder(BorderFactory.createCompoundBorder(\n BorderFactory.createLineBorder(b), \n BorderFactory.createEmptyBorder(g, g, g, g)\n ));\n \n JPanel p = new JPanel();\n p.setOpaque(false);\n p.setLayout(new BorderLayout(GAP, GAP));\n JLabel lab1 = new JLabel(\"Expression:\");\n lab1.setFont(normal);\n p.add(lab1, \"West\");\n exp.setFont(ttype);\n exp.addActionListener(new Ear());\n p.add(exp);\n val.setFont(normal);\n val.setForeground(Color.black);\n p.add(val, \"East\");\n add(p, \"North\");\n \n JPanel q = new JPanel();\n q.setOpaque(false);\n q.setLayout(new BorderLayout(GAP, GAP));\n JLabel lab2 = new JLabel(\"Postfix:\");\n lab2.setFont(normal);\n q.add(lab2, \"West\");\n rpn.setFont(ttype);\n rpn.setEditable(false);\n q.add(rpn);\n add(q, \"South\");\n \n JScrollPane s = new JScrollPane(txt);\n txt.setEditable(false);\n txt.setRows(nROWS);\n JLabel lab3 = new JLabel(\"Tree:\");\n lab3.setFont(normal);\n add(lab3, \"West\");\n add(s, \"Center\");\n }",
"public static void main(String[] args) {\n new Calculator();\n }",
"public Calculator getCurrentCalculator(VisualStyle style) {\n \t\tif (style == null)\n \t\t\treturn null;\n \n \t\tif (isNodeProp())\n \t\t\treturn style.getNodeAppearanceCalculator().getCalculator(this);\n \t\telse\n \n \t\t\treturn style.getEdgeAppearanceCalculator().getCalculator(this);\n \t}",
"public MathEval() {\r\n super();\r\n\r\n constants=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n setConstant(\"E\" ,Math.E);\r\n setConstant(\"Euler\" ,0.577215664901533D);\r\n setConstant(\"LN2\" ,0.693147180559945D);\r\n setConstant(\"LN10\" ,2.302585092994046D);\r\n setConstant(\"LOG2E\" ,1.442695040888963D);\r\n setConstant(\"LOG10E\",0.434294481903252D);\r\n setConstant(\"PHI\" ,1.618033988749895D);\r\n setConstant(\"PI\" ,Math.PI);\r\n\r\n variables=new TreeMap<String,Double>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n functions=new TreeMap<String,FunctionHandler>(String.CASE_INSENSITIVE_ORDER);\r\n\r\n offset=0;\r\n isConstant=false;\r\n }",
"public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }",
"public Salary_Calculator() {\n initComponents();\n }",
"public CalculatorParser(CalculatorParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n }",
"public Kalkulator() {\n initComponents();\n this.setLocation(300, 200);\n }",
"@Test\r\n\tpublic void testCalculator() {\n\t\tCalculator calc = new Calculator();\r\n\t\tassertNotNull(calc);\r\n\t\t// testing the initial local variable\r\n\t\tassertEquals(0, calc.getTotal());\r\n\t\t// testing the strHistory\r\n\t\tString expected = \"0\";\r\n\t\tassertEquals(expected, calc.getHistory());\r\n\t}",
"static private Screen createScreen() {\n Screen test = new Screen();\n //These values below, don't change\n test.addWindow(1,1,64, 12);\n test.addWindow(66,1,64,12);\n test.addWindow(1,14,129,12);\n test.setWidthAndHeight();\n test.makeBoarders();\n test.setWindowsType();\n test.draw();\n return test;\n }",
"Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }",
"Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }",
"public Calculator( String toParse )\r\n\t{\r\n\t\tequationString = \ttoParse;\r\n\t\tinitialized = \t\ttrue;\r\n\t}",
"public RectangleProgram(){\r\n //Esto metodos los heredamos de JFrame este es el constructor\r\n\t\tsetTitle(\"Area and Perimeter of a Rectangle\");\r\n\t\tsetSize(ANCHO, ALTO);\r\n\t\tsetVisible(true);\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); //La aplicacion sale cuando la cerramos\r\n\t}",
"public static CashFlowEquivalentCalculator getInstance() {\n return INSTANCE;\n }",
"Rectangle(int width, int height){\n area = width * height;\n }",
"MathinterpreterFactory getMathinterpreterFactory();"
]
| [
"0.6509424",
"0.64905286",
"0.64715326",
"0.64209104",
"0.6372601",
"0.6234798",
"0.6099005",
"0.5995316",
"0.5988807",
"0.5953806",
"0.59002036",
"0.58954287",
"0.58805734",
"0.58446264",
"0.58161896",
"0.5750402",
"0.5744614",
"0.57425165",
"0.56708044",
"0.5567227",
"0.5505836",
"0.544214",
"0.54388076",
"0.5392561",
"0.53785014",
"0.5356713",
"0.53110176",
"0.530843",
"0.52995586",
"0.5286663",
"0.52601135",
"0.52385885",
"0.5205523",
"0.5200881",
"0.5184234",
"0.5165599",
"0.5146826",
"0.5142762",
"0.51381475",
"0.5137582",
"0.50865924",
"0.50836897",
"0.50819093",
"0.5061255",
"0.50587744",
"0.50522417",
"0.5051416",
"0.5040443",
"0.5028809",
"0.5028808",
"0.49811882",
"0.49809507",
"0.49748978",
"0.49511662",
"0.49447283",
"0.4922867",
"0.49109343",
"0.4905965",
"0.49058816",
"0.4903551",
"0.48832807",
"0.4878918",
"0.48698962",
"0.48652992",
"0.48619014",
"0.48360527",
"0.48325914",
"0.4829935",
"0.48255754",
"0.48114035",
"0.48014835",
"0.48013347",
"0.47911087",
"0.47902143",
"0.4784018",
"0.47818998",
"0.47793895",
"0.476758",
"0.4767139",
"0.4765466",
"0.475961",
"0.47562185",
"0.47560263",
"0.47491387",
"0.47484693",
"0.47451097",
"0.47447658",
"0.47420886",
"0.473631",
"0.4735897",
"0.4725656",
"0.47173446",
"0.47155577",
"0.47149068",
"0.47149068",
"0.4708368",
"0.4699306",
"0.46970776",
"0.469568",
"0.4686805"
]
| 0.677877 | 0 |
Executes the previous command with the second operand. | private void executeCommand() {
expression += operand;
double execute = command.execute(expression);
operand = new StringBuilder(Double.toString(execute));
firstOperand = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Operand execute(Operand first, Operand second);",
"@Override\r\n\tpublic String pipeTwoCommands(String... args) {\r\n\t\treturn pipeCaller(args);\r\n\t}",
"@Override\n\tpublic int execute(Short operand1,Short operand2) {\n\t\tint result[] = MainFunctionUnit.getInstance().getAdder().sub(operand1, operand2);\n\n\t\tsuper.setResult((short)result[0]);\n\t\treturn result[1];\n\t}",
"public Command createOperationCommand(int operator, Operand operand1, Operand operand2);",
"private void replayNextOp() {\n\t\topNum++;\n\t\tif (opNum > ops.length) {\n\t\t\topNum = -1;\n\t\t\tupdate();\n\t\t} else if (!getExited()) {\n\t\t\tjavax.swing.SwingUtilities.invokeLater(doReplayNextOp);\n\t\t}\n\t}",
"@Override\n public int getPositionSecondOperand() {\n return position + 2;\n }",
"@Override\n\tpublic void execute(Machine m) {\n\t\tint value1 = m.getRegisters().getRegister(op1);\n\t\tint value2 = m.getRegisters().getRegister(op2);\n\t\tm.getRegisters().setRegister(result, value1 + value2);\n\t}",
"@Override\n\tpublic void execute(int n1, int n2) {\n\t\tthis.result = n1*n2;\n\t}",
"private void setOperand2() {\n\t\ttext_Result.setText(\"\");\n\t\tlabel_Result.setText(\"Result\");\n\t\tlabel_errResult.setText(\"\");\n\t\tif (perform.setOperand2(text_Operand2.getText())) {\n\t\t\tlabel_errOperand2.setText(\"\");\n\t\t\toperand2ErrPart1.setText(\"\"); // Clear the first term of error part\n\t\t\toperand2ErrPart2.setText(\"\"); // Clear the second term of error part\n\t\t\tif (text_Operand1.getText().length() == 0)\n\t\t\t\tlabel_errOperand1.setText(\"\");\n\t\t} else\n\t\t\terr2();\n\t}",
"@Override\n\tsynchronized void execute() {\n\t\t_dataOUTPipe.dataIN(op1.getText());\n\t\t_dataOUTPipe.dataIN(op2.getText());\n\t\t_dataOUTPipe.dataIN(op.getText());\n\t}",
"public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public int operation(int number1,int number2,String operator)",
"@Override\n\tprotected void executeAux(CPU cpu) throws InstructionExecutionException {\n\t\t if(cpu.getNumElem() > 0){\n\t\t\t cpu.push(-cpu.pop());\n\t\t }\n\t\t else \t\n\t\t\t\tthrow new InstructionExecutionException\n\t\t\t\t\t(\"Error ejecutando \" + this.toString() + \": faltan operandos en la pila (hay \" + cpu.getNumElem() + \")\");\n\t\t\t\n\t}",
"public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}",
"public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}",
"public State execute(int command, State state);",
"protected void operation(String op) {\n \tint value;\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tint second = stack.pop();\n \t // handles when only one value in stack\n \t\tif (stack.empty()) {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tstack.push(second);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tcurrent = second *-1;\n \t\t\t\tstack.push(current);\n \t\t\t\tshow(stack.peek());\n \t\t\t\tcurrent = 0;\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t}\n \t // handles the other cases\n \t\telse {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tvalue = second + stack.pop();\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tvalue = stack.pop() - second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tvalue = stack.pop() * second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tvalue = stack.pop() / second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t}\n \t}\n }",
"final public void PendingOperator(String operator1, String operator2) throws ParseException {String o, op1, op2, r;\n// Si la pila no esta vacía\n if( !pOperators.empty()) {\n\n // Y el tope de la pila es alguno de los operadores mandados. +- o */\n if ( pOperators.peek() == operator1 || pOperators.peek() == operator2 ) {\n\n // Sacar los operandos y el operador de las pilas\n op2 = (String)pOperands.pop();\n op1 = (String)pOperands.pop();\n o = (String)pOperators.pop();\n r = \"t\" + currentTemporal;\n\n currentTemporal++;\n\n // Crear un cuadruplo y meterlos\n Cuadruplo quad = new Cuadruplo(o, op1, op2, r);\n quadCounter++;\n pOperands.push(r);\n cuadruplos.addElement(quad);\n }\n }\n }",
"private void cmdUndo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().undoLastStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }",
"public double getOperand2()\r\n\t{\r\n\t\tSystem.out.println(\"enter the operand 2:\");\r\n\t\tdouble op2=sc.nextDouble();\r\n\t\treturn op2;\r\n\t}",
"public static UnitP Subtraction(UnitP first, UnitP second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Subtraction,\n OperationsOther.GetOperationString(first, second, Operations.Subtraction)\n );\n }",
"public void next()\n {\n if (mHistoryIdx == mCommandList.size()) {\n return;\n }\n\n mCommandList.get(mHistoryIdx++).redo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public double Restar(double operador_1, double operador_2){\n return RestaC(operador_1, operador_2);\n }",
"void execute(Integer num1, Integer num2);",
"private void setOperand1() {\n\t\ttext_Result.setText(\"\"); // Any change of an operand probably invalidates\n\t\tlabel_Result.setText(\"Result\"); // the result, so we clear the old result.\n\t\tlabel_errResult.setText(\"\");\n\t\tif (perform.setOperand1(text_Operand1.getText())) { // Set the operand and see if there was an error\n\t\t\tlabel_errOperand1.setText(\"\"); // If no error, clear this operands error\n\t\t\toperand1ErrPart1.setText(\"\"); // Clear the first term of error part\n\t\t\toperand1ErrPart2.setText(\"\"); // Clear the second term of error part\n\t\t\tif (text_Operand2.getText().length() == 0) // If the other operand is empty, clear its error\n\t\t\t\tlabel_errOperand2.setText(\"\"); // as well.\n\t\t} else // If there's a problem with the operand, display\n\t\t\terr1();\n\t}",
"private Operation expression2(Scope scope, Vector queue)\r\n {\r\n Operation root = expression3(scope, queue);\r\n\r\n if (infix.contains(nextSymbol))\r\n root = expression2Rest(root, scope, queue);\r\n\r\n return root;\r\n }",
"public synchronized void undo(){\n int index_of_last_operation = instructions.size() - 1;\n if (index_of_last_operation >= 0){\n instructions.remove(index_of_last_operation);\n }\n }",
"public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }",
"public static NumberP Subtraction(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Subtraction\n ); \t\n }",
"boolean undoLastCommand() throws Exception;",
"@Override\n\tpublic float subtrair(float op1, float op2) {\n\t\treturn op1 - op2;\n\t}",
"private double operation(char operand, double num1, double num2){\r\n\t\t\tdouble result;\r\n\t\t\tCalculatorImpl ci = new CalculatorImpl();\r\n\t\t\tswitch(operand){\r\n\t\t\tcase PLUS : result = ci.getAddition(num1, num2);break;\r\n\t\t\tcase MINUS : result = ci.getSubtraction(num1, num2);break;\r\n\t\t\tcase MULTI : result = ci.getMultification(num1, num2);break;\r\n\t\t\tcase DIVIDE : result = ci.getDivision(num1, num2);break;\r\n\t\t\tdefault : result=0.0;break;\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}",
"public EncapsulatedIRCCommand getNextCommand();",
"@Override\n\tpublic String nextCommand() {\n\t\treturn null;\n\t}",
"public void execute() {\n\t\t// XOR GATE OP\n\t\txor.a.set(a.get());\n\t\txor.b.set(b.get());\n\t\txor.execute();\n\t\tsum.set(xor.out.get());\n\n\t\t// AND GATE OP\n\t\tand.a.set(a.get());\n\t\tand.b.set(b.get());\n\t\tand.execute();\n\t\tcarry.set(and.out.get());\n\n\t}",
"public String getPrevCommandString() {\n if (this.history.size() == 0) {\n return \"\";\n }\n\n if (this.currIndex <= 0) {\n return this.history.get(0);\n }\n\n this.currIndex -= 1;\n return this.history.get(this.currIndex);\n }",
"public void undo() {\n\t\tif (lastCommand != null) {\n\t\t\tlastCommand.undo();\n\t\t\tlastCommand = null;\n\t\t}\n\t}",
"public Command createStoreCommand(Operand lhs, Operand rhs);",
"@Override\n\tpublic void calc() {\n\t\tcalculated = true;\n\t\tanswer=operand1-operand2;\n\t}",
"SEIntegerVariable getOperand2();",
"void flipUp( ) {\n\t\t\t\t\t\tUpCommand . execute ( ) ;\n\n\n\t\t}",
"@Override\n public void execute(VirtualMachine vm){\n int Operand_two = vm.pop();\n int Operand_one = vm.pop();\n\n int answer = 0;\n\n //Switch case to evaluate the operator and perform the necessary actions\n //The answer after the operation is performed is pushed onto the RunTime Stack\n switch (operator){\n case \"+\":\n answer = Operand_one + Operand_two;\n break;\n case \"-\":\n answer = Operand_one - Operand_two;\n break;\n case \"*\":\n answer = Operand_one * Operand_two;\n break;\n case \"/\":\n answer = Operand_one / Operand_two;\n break;\n case \"==\":\n if(Operand_one == Operand_two){\n answer = 1;\n }\n else {\n answer = 0;\n }\n break;\n case \"!=\":\n if(Operand_one != Operand_two){\n answer = 1;\n }\n else{\n answer = 0;\n }\n break;\n case \"<=\":\n if(Operand_one <= Operand_two){\n answer = 1;\n }\n else{\n answer = 0;\n }\n break;\n case \">\":\n if(Operand_one > Operand_two){\n answer = 1;\n }\n else {\n answer = 0;\n }\n break;\n case \">=\":\n if(Operand_one >= Operand_two){\n answer = 1;\n }\n else {\n answer = 0;\n }\n break;\n case \"<\":\n if(Operand_one < Operand_two){\n answer = 1;\n }\n else {\n answer = 0;\n }\n break;\n case \"|\":\n if(Operand_one == 0 && Operand_two == 0){\n answer = 0;\n }\n else {\n answer = 1;\n }\n break;\n case \"&\":\n if(Operand_one == 1 && Operand_two == 1){\n answer = 1;\n }\n else {\n answer = 0;\n }\n break;\n default:\n break;\n }\n vm.push(answer);\n }",
"private static int executeInstruction(int instruction, int arg0, int arg1, int arg2, int[] memory){\n\t\t\n\t\tswitch(instruction){\n\t\t\tcase mov:\n\t\t\t\tmemory[arg0] = memory[arg1];\n\t\t\t\tbreak;\n\t\t\tcase movv:\n\t\t\t\tmemory[arg0] = arg1;\n\t\t\t\tbreak;\n\t\t\tcase jmp:\n\t\t\t\treturn arg0;\n\t\t\t\t//break;\n\t\t\tcase jif:\n\t\t\t\tif(memory[arg0] != 0){\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase jifv:\n\t\t\t\tif(arg0 != 0){\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase add:\n\t\t\t\tmemory[arg0] = memory[arg1] + memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase sub:\n\t\t\t\tmemory[arg0] = memory[arg1] - memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase mlt:\n\t\t\t\tmemory[arg0] = memory[arg1] * memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase div:\n\t\t\t\tmemory[arg0] = memory[arg1] / memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase mod:\n\t\t\t\tmemory[arg0] = memory[arg1] % memory[arg2];\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase addvl:\n\t\t\t\tmemory[arg0] = arg1 + memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase subvl:\n\t\t\t\tmemory[arg0] = arg1 - memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase mltvl:\n\t\t\t\tmemory[arg0] = arg1 * memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase divvl:\n\t\t\t\tmemory[arg0] = arg1 / memory[arg2];\n\t\t\t\tbreak;\n\t\t\tcase modvl:\n\t\t\t\tmemory[arg0] = arg1 % memory[arg2];\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase addlv:\n\t\t\t\tmemory[arg0] = memory[arg1] + arg2;\n\t\t\t\tbreak;\n\t\t\tcase sublv:\n\t\t\t\tmemory[arg0] = memory[arg1] - arg2;\n\t\t\t\tbreak;\n\t\t\tcase mltlv:\n\t\t\t\tmemory[arg0] = memory[arg1] * arg2;\n\t\t\t\tbreak;\n\t\t\tcase divlv:\n\t\t\t\tmemory[arg0] = memory[arg1] / arg2;\n\t\t\t\tbreak;\n\t\t\tcase modlv:\n\t\t\t\tmemory[arg0] = memory[arg1] % arg2;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase addvv:\n\t\t\t\tmemory[arg0] = arg1 + arg2;\n\t\t\t\tbreak;\n\t\t\tcase subvv:\n\t\t\t\tmemory[arg0] = arg1 - arg2;\n\t\t\t\tbreak;\n\t\t\tcase mltvv:\n\t\t\t\tmemory[arg0] = arg1 * arg2;\n\t\t\t\tbreak;\n\t\t\tcase divvv:\n\t\t\t\tmemory[arg0] = arg1 / arg2;\n\t\t\t\tbreak;\n\t\t\tcase modvv:\n\t\t\t\tmemory[arg0] = arg1 % arg2;\n\t\t\t\tbreak;\n\t\t\t///////////////////////////////\n\t\t\tcase l:\n\t\t\t\tmemory[arg0] = memory[arg1] < memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase g:\n\t\t\t\tmemory[arg0] = memory[arg1] > memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase le:\n\t\t\t\tmemory[arg0] = memory[arg1] <= memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase ge:\n\t\t\t\tmemory[arg0] = memory[arg1] >= memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase e:\n\t\t\t\tmemory[arg0] = memory[arg1] == memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase ne:\n\t\t\t\tmemory[arg0] = memory[arg1] != memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase lvl:\n\t\t\t\tmemory[arg0] = arg1 < memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase gvl:\n\t\t\t\tmemory[arg0] = arg1 > memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase levl:\n\t\t\t\tmemory[arg0] = arg1 <= memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase gevl:\n\t\t\t\tmemory[arg0] = arg1 >= memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase evl:\n\t\t\t\tmemory[arg0] = arg1 == memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase nevl:\n\t\t\t\tmemory[arg0] = arg1 != memory[arg2] ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase llv:\n\t\t\t\tmemory[arg0] = memory[arg1] < arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase glv:\n\t\t\t\tmemory[arg0] = memory[arg1] > arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase lelv:\n\t\t\t\tmemory[arg0] = memory[arg1] <= arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase gelv:\n\t\t\t\tmemory[arg0] = memory[arg1] >= arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase elv:\n\t\t\t\tmemory[arg0] = memory[arg1] == arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase nelv:\n\t\t\t\tmemory[arg0] = memory[arg1] != arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase lvv:\n\t\t\t\tmemory[arg0] = arg1 < arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase gvv:\n\t\t\t\tmemory[arg0] = arg1 > arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase levv:\n\t\t\t\tmemory[arg0] = arg1 <= arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase gevv:\n\t\t\t\tmemory[arg0] = arg1 >= arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase evv:\n\t\t\t\tmemory[arg0] = arg1 == arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase nevv:\n\t\t\t\tmemory[arg0] = arg1 != arg2 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase andll:\n\t\t\t\tmemory[arg0] = memory[arg1] != 0 && memory[arg2] != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase orll:\n\t\t\t\tmemory[arg0] = memory[arg1] != 0 || memory[arg2] != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase andvl:\n\t\t\t\tmemory[arg0] = arg1 != 0 && memory[arg2] != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase orvl:\n\t\t\t\tmemory[arg0] = arg1 != 0 || memory[arg2] != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase andlv:\n\t\t\t\tmemory[arg0] = memory[arg1] != 0 && arg2 != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase orlv:\n\t\t\t\tmemory[arg0] = memory[arg1] != 0 || arg2 != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase andvv:\n\t\t\t\tmemory[arg0] = arg1 != 0 && arg2 != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase orvv:\n\t\t\t\tmemory[arg0] = arg1 != 0 || arg2 != 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase notl:\n\t\t\t\tmemory[arg0] = memory[arg1] == 0 ? 1 : 0;\n\t\t\t\tbreak;\n\t\t\tcase notv:\n\t\t\t\tmemory[arg0] = arg1 == 0 ? 1 : 0;\n\t\t\t\n\t\t\tcase nop:\n\t\t\t\t//do nothing\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t//jump ahead one instruction\n\t\treturn 1;\n\t}",
"private StringBuilder getOperand() {\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\treturn firstNumber;\r\n\t\t} else {\r\n\t\t\treturn secondNumber;\r\n\t\t}\r\n\t}",
"static Double executeSubtraction(List<Double> operands) {\n Double result = null;\n if (!CollectionUtils.isEmpty(operands)) {\n Double firstElement = operands.get(0);\n result = (firstElement*2) - operands.stream().reduce(0D, Double::sum);\n }\n return result;\n }",
"private void cmdRedo() throws NoSystemException {\n \ttry {\n\t\t\tsystem().redoStatement();\n\t\t} catch (MSystemException e) {\n\t\t\tLog.error(e.getMessage());\n\t\t}\n }",
"@Test\n @Ignore\n public void testDoubleCommand() throws Exception {\n MockPIFrame frame = startSession();\n BrowserRequest browserRequest = frame.getMostRecentRequest();\n\n // 1. driver requests click \"foo\"\n DriverRequest clickFoo = sendCommand(\"click\", \"foo\", \"\");\n sleepForAtLeast(100);\n // 2. before the browser can respond, driver requests click \"bar\"\n DriverRequest clickBar = sendCommand(\"click\", \"bar\", \"\");\n browserRequest.expectCommand(\"click\", \"foo\", \"\");\n browserRequest = frame.sendResult(\"OK\");\n browserRequest.expectCommand(\"click\", \"bar\", \"\");\n frame.sendResult(\"OK\");\n assertEquals(\"click foo result got mangled\", \"OK\", clickFoo.getResult());\n assertEquals(\"click bar result got mangled\", \"OK\", clickBar.getResult());\n }",
"public double executeStrategy(double num1,double num2) {\n\t\treturn exp.calculate(num1, num2);\n\t}",
"@Override\r\n\tpublic ATokVisitor<IGrammarSymbol, Object> makeCombinedVisitor(ATokVisitor<IGrammarSymbol, Object> other) {\r\n\t\treturn new ATokVisitor<IGrammarSymbol, Object>(other) {\r\n\t\t\t{\r\n\t\t\t\t//addCmdTo(this);\r\n\t\t\t\tthis.setCmd(getName(), makeCmd());\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"boolean redoLastCommand() throws Exception;",
"public String arg2() {\r\n return command.split(\"\\\\s+\")[2];\r\n }",
"public void executeViaUndoManager(String label, Command command) {\n\t\tif (command.canExecute()) {\n\t\t\tif (undoManager != null) {\n\t\t\t\tundoManager.beginRecording(this, label);\n\t\t\t\tcommand.execute();\n\t\t\t\tundoManager.endRecording(this);\n\t\t\t} else\n\t\t\t\texecuteViaStack(command);\n\t\t}\n\t}",
"@Override\n\tpublic double execute() {\n\t\tList<Variable> args = getArgs();\n\t\tVariable newVar = null;\n\t\tfor (int i = 0; i < args.size(); i += 2) {\n\t\t\tnewVar = new Variable(args.get(i).getKey(), args.get(i + 1).getValue());\n\t\t\tgetBackendController().setVariable(newVar);\n\t\t}\n\t\treturn newVar == null ? 0 : newVar.getValue();\n\t}",
"public void redo() {\n if (!future.isEmpty()) {\n Command c = future.get(0);\n c.redo();\n future.remove(0);\n history.add(0, c);\n }\n }",
"public Integer perform (IExpression left, IExpression right);",
"public static void undo () {\r\n\t\tCommand cmd = undoCommands.pop();\r\n\t\tcmd.undo();\r\n\t\tredoCommands.push(cmd);\r\n\t}",
"public static UnitP Addition(UnitP first, UnitP second)\n {\n return OperationsPublic.PerformUnitOperation\n (\n first, second, Operations.Addition,\n OperationsOther.GetOperationString(first, second, Operations.Addition)\n );\n }",
"void redoPreviousAction() throws NothingToRedoException;",
"public void redoUndoneCommand() {\r\n // TODO: Fix me!!!\r\n try {\r\n char c=redo.pop();\r\n //redo.push(c);\r\n if(c=='c'){\r\n super.rotateClockwise();\r\n }\r\n if(c=='r'){\r\n super.rotateCounterClockwise();\r\n }\r\n if(c=='m'){\r\n super.moveForward();\r\n }\r\n } catch (Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"public int performArithmaticCalculation(int num1, int num2){\n\t return calculation.calculate(num1, num2);\n\t }",
"public void prev();",
"void execute()\n\t{\n\t\tVM.top++;\n\t\tVM.opStack[VM.top] = arg();\n\t\tVM.pc++;\n\t}",
"void undoPreviousAction() throws NothingToUndoException;",
"synchronized int doCommand(int command, int operand, int channel) {\n byte workingByte=0;\n int commandRetVal=0;\n \n switch (command) {\n case CMD_FORWARD:\n case CMD_BACKWARD:\n if (command==CMD_FORWARD && motorState[channel]==STATE_RUNNING_FWD) break;\n if (command==CMD_BACKWARD && motorState[channel]==STATE_RUNNING_BKWD) break;\n if (motorType[channel]==MOTTYPE_REGULATED) {\n \tif (motorState[channel]!=STATE_STOPPED) {\n \t\t((MMXRegulatedMotor) motors[channel]).doListenerState(MMXRegulatedMotor.LISTENERSTATE_STOP);\n \t}\n \t((MMXRegulatedMotor) motors[channel]).doListenerState(MMXRegulatedMotor.LISTENERSTATE_START);\n }\n // command + 1 = STATE_RUNNING_BKWD or STATE_RUNNING_FWD\n \t\tsetDirection(channel, command + 1);\n \t\tcommandMotor(channel, 0);\n break;\n case CMD_FLT:\n \tworkingByte = MMXCOMMAND_MAP[MMXCOMMAND_IDX_FLOAT][channel];\n case CMD_STOP:\n if (command==CMD_STOP) workingByte = MMXCOMMAND_MAP[MMXCOMMAND_IDX_BRAKE][channel];\n \tsendData(REG_MMXCOMMAND, workingByte);\n if (motorType[channel]==MOTTYPE_REGULATED && motorState[channel]!=STATE_STOPPED ) {\n \t((MMXRegulatedMotor) motors[channel]).doListenerState(MMXRegulatedMotor.LISTENERSTATE_STOP);\n }\n \n motorState[channel]=STATE_STOPPED;\n break;\n case CMD_SETPOWER: // requires positive value and validation done in caller\n \t// exit if no change\n \tif (motorParams[MOTPARAM_POWER][channel]==operand) break;\n \t\n \t// set the (abs) power value in global param array\n \tmotorParams[MOTPARAM_POWER][channel] = operand;\n \n // set the power with proper sign based on direction\n workingByte = (byte)operand;\n if (motorState[channel]==STATE_RUNNING_BKWD ) {\n workingByte *= -1;\n }\n sendData(REGISTER_MAP[REG_IDX_POWER][channel], workingByte); \n \n // if not running or in a rotate, exit\n if (motorState[channel]==STATE_STOPPED || motorState[channel]==STATE_ROTATE_TO) break;\n \n // set the power if running (but not in a rotate) to take effect immediately\n commandMotor(channel, 0);\n break;\n case CMD_ROTATE:\n case CMD_ROTATE_TO:\n \tif (motorType[channel]==MOTTYPE_REGULATED) {\n \tif (motorState[channel]!=STATE_STOPPED) {\n \t// ensure the motor has stopped before new rotate so listener event timing is correct\n// \t\tsendData(REG_MMXCOMMAND, MMXCOMMAND_MAP[MMXCOMMAND_IDX_BRAKE][channel]);\n// \twhile (tachoMonitor.isMoving(channel)) Delay.msDelay(50);\n \t\t((MMXRegulatedMotor) motors[channel]).doListenerState(MMXRegulatedMotor.LISTENERSTATE_STOP);\n \t}\n \t((MMXRegulatedMotor) motors[channel]).doListenerState(MMXRegulatedMotor.LISTENERSTATE_START);\n }\n rotate(channel, operand, command);\n break;\n case CMD_GETPOWER:\n commandRetVal=motorParams[MOTPARAM_POWER][channel];\n break;\n case CMD_GETTACHO:\n commandRetVal=getEncoderValue(channel);\n break;\n case CMD_RESETTACHO:\n // reset encoder/tacho \n \tsendData(REG_MMXCOMMAND, MMXCOMMAND_MAP[MMXCOMMAND_IDX_ENCODER_RST][channel]);\n \tDelay.msDelay(50);\n break;\n case CMD_ISMOVING:\n commandRetVal=MOTPARAM_OP_TRUE;\n if (motorState[channel]==STATE_STOPPED) commandRetVal=MOTPARAM_OP_FALSE;\n // over-ride previous decision if regulated motor and it is moving\n if (tachoMonitorAlive()) {\n \tcommandRetVal = tachoMonitor.isMoving(channel)?MOTPARAM_OP_TRUE:MOTPARAM_OP_FALSE;\n }\n break;\n case CMD_ISSTALLED:\n \tcommandRetVal=MOTPARAM_OP_FALSE;\n \tif (tachoMonitorAlive() && motorState[channel]!=STATE_STOPPED && !tachoMonitor.isMoving(channel)) {\n \t\tcommandRetVal=MOTPARAM_OP_TRUE;\n \t}\n \tbreak;\n case CMD_SETREGULATE:\n motorParams[MOTPARAM_REGULATE][channel]=operand; //1=true, 0=false \n break;\n case CMD_GETSPEED:\n commandRetVal = 0;\n if (tachoMonitorAlive()) {\n commandRetVal = tachoMonitor.getSpeed(channel);\n }\n break;\n case CMD_GETLIMITANGLE:\n commandRetVal = limitangle[channel];\n break;\n case CMD_SETRAMPING:\n \tmotorParams[MOTPARAM_RAMPING][channel]=operand; //1=true, 0=false \n break;\n \n default:\n throw new IllegalArgumentException(\"Invalid Command\");\n }\n return commandRetVal; \n }",
"public void secondarySetOperator(com.hps.july.persistence.Operator arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondarySetOperator(arg0);\n }",
"@Override\n\tpublic void operate() {\n\t\tthis.method2();\n\t\tsuper.operate();\n\t}",
"public String getNextCommand() {\n System.out.println(\"Left, Right, Advance <n>, Quit , Help: \");\n return scanner.nextLine();\n }",
"public static void main(String[] args) {\n\n\t\t// Check number of strings passed\n\t\tif (args.length != 3) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Usage: java Calculator operand1 operator operand2\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// The result of the operation\n\t\tint result = 0;\n\n\t\t// Determine the operator\n\t\tswitch (args[1].charAt(0)) {\n\t\tcase '+': result = Integer.parseInt(args[0]) +\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '-': result = Integer.parseInt(args[0]) -\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '.': result = Integer.parseInt(args[0]) *\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '/': result = Integer.parseInt(args[0]) /\n\t\t\t\tInteger.parseInt(args[2]);\n\t\t}\n\n\t\t// Display result\n\t\tSystem.out.println(args[0] + ' ' + args[1] + ' ' + args[2] + \" = \" + result);\n\n\n\n\n\t}",
"public void Prev();",
"private void operator() {\n reduce();\n shift();\n getDispenser().advance();\n if(getDispenser().tokenIsNumber()) setState(State.NUMBER);\n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM);\n \n }",
"@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }",
"private void executeConcurrently() {\n String[] commandArgs = SysLib.stringToArgs(command);\n prevPID = SysLib.exec(commandArgs); //run command\n command = \"\"; //clear command\n }",
"@Override\n\tprotected void runLine(Query query) {\n\t\tquery.inc();\n\t\tint i = Integer.parseInt(query.next());\n\t\tArrayList<Integer> originList = new ArrayList<Integer>();\n\t\toriginList.add(i - 1);\n\t\tArrayList<Integer> destinationList = new ArrayList<Integer>();\n\t\tparseSecondCondition(query, originList, destinationList);\n\t}",
"public String operator( String op);",
"public void execute(State s){\n while(bExpression.value(s))\n s1.execute(s);\n }",
"protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }",
"@Test\n public void whenTryExecuteMultiplyShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"2\", \"2\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = String.format(\"%s + %s = %s\\n%s * %s = %s\\n\",\n 0.0, 2.0, 2.0, 2.0, 2.0, 4.0);\n final int firstCommand = 0;\n final int secondCommand = 2;\n\n menuCalculator.select(firstCommand);\n menuCalculator.select(secondCommand);\n\n assertThat(stubIO.getOut(), is(expected));\n }",
"@Override\n public String evaluate(final String leftOperand, final String rightOperand)\n throws IllegalArgumentException\n {\n // error checking for null/empty\n if (leftOperand == null || rightOperand == null || leftOperand.equals(\"\")\n || rightOperand.equals(\"\"))\n {\n throw new IllegalArgumentException(Strings.UI.getStrings().getString(Strings.TWO_OPERANDS));\n }\n\n String noSpL = leftOperand.replaceAll(Strings.SPACE, \"\");\n String noSpR = rightOperand.replaceAll(Strings.SPACE, \"\");\n String distribute = SubtractionOperator.distribute(noSpR);\n String result = new AdditionOperator().evaluate(noSpL, distribute);\n\n return result;\n }",
"public void operator() {\n while (keepOperational) {\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"\\nInput:\\n\");\n String input = scanner.nextLine();\n\n /** delegate the input - all for enabling unit testing */\n operate(input);\n }\n }",
"public int executeOperation(){\n\t\tswitch (operation){\n\t\tcase 1: \n\t\t\treturn var1 + var2;\n\t\tcase 2: \n\t\t\treturn var1 - var2;\n\t\tcase 3: \n\t\t\treturn var1 * var2;\n\t\tcase 4: \n\t\t\treturn var1 / var2;\n\t\t default:\n\t\t\treturn 0;\n\t\t\n\t\t}\n\t}",
"private void executeSequentially() {\n String[] commandArgs = SysLib.stringToArgs(command);\n prevPID = SysLib.exec(commandArgs); //run command\n while (SysLib.join() != prevPID) ; //wait for the termination of the\n // command\n command = \"\"; //clear the command\n }",
"public void previous();",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 - num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}",
"protected static int calculateTwoTokens(String[] tokens) throws NumberFormatException, CalculatorException\n {\n int a = Integer.parseInt(tokens[1]); // Throws NumberFormatException if the second token is not an int value.\n \n \tif (tokens[0] == \"negate\") {\n \t\ta=-a;\n \t\treturn a;\n \t}\n \tif (tokens[0] == \"halve\") {\n \t\ta = Math.round(a/2);\n \t\treturn a;\n \t}\n \n \telse {\n \n throw new CalculatorException (\"Illegal Command\");\n }\n \n }",
"@Override\n protected void execute() {\n if(isBackwards) {\n exeBackwards();\n } else {\n exeForwards();\n }\n\n SmartDashboard.putNumber(\"DrivePath/SegmentX\", m_left_follower.getSegment().x);\n SmartDashboard.putNumber(\"DrivePath/SegmentVelocity\", m_left_follower.getSegment().velocity);\n }",
"public String getNextCommandString() {\n if (this.history.size() == 0) {\n return \"\";\n }\n\n if ((this.currIndex + 1) >= this.history.size()) {\n this.currIndex = this.history.size();\n return \"\";\n }\n\n this.currIndex += 1;\n return this.history.get(this.currIndex);\n }",
"public void execute(String label, Command command) {\n\t\texecuteViaUndoManager(label, command);\n\t}",
"protected void ExecuteCommand()\n {\n //Check if the inserted command is valid\n if(this.ValidateCommand())\n {\n //Set line index to first fine\n if(this.Command.equals(\"^\"))\n {\n //-1 if the Linked List is empty, 0 if at least one line exists\n this.LineIndex = this.FileLines.isEmpty()? -1: 0;\n System.out.println(\"Pointer set to first line.\");\n }\n\n //Set line index to last line\n if(this.Command.equals(\"$\"))\n {\n //-1 if the Linked List is empty, size - 1 if at least one line exists\n this.LineIndex = this.FileLines.isEmpty()? -1: this.FileLines.size() - 1;\n System.out.println(\"Pointer set to last line.\");\n }\n\n //Set line index to previous position\n if(this.Command.equals(\"-\"))\n {\n //Check whether the Linked List is empty\n if(this.FileLines.isEmpty())\n {\n this.LineIndex = -1;\n }\n else\n {\n //0 if the line index is already at the first line, else decrease it\n this.LineIndex = this.LineIndex == 0? 0: this.LineIndex - 1;\n }\n System.out.println(\"Pointer set to previous line.\");\n }\n\n //Set line index to next position\n if(this.Command.equals(\"+\"))\n {\n //size - 1 if the line index is already at the last line, else increase it\n this.LineIndex = (this.FileLines.size() - 1) == this.LineIndex ? this.LineIndex: this.LineIndex + 1;\n System.out.println(\"Pointer set to next line.\");\n }\n\n //Add new line after current line\n if(this.Command.equals(\"a\"))\n {\n System.out.println(\"Type the text for the new line:\");\n \n //Initialize a Scanner object to read for the command line\n Scanner cmdCurrentLineScanner = new Scanner(System.in);\n\n //Read the entered line\n String inputLine = cmdCurrentLineScanner.nextLine();\n\n //Check if the inserted line length is greater than the MaxFileLineSize\n if(inputLine.length() > SizeConstants.getMaxFileLineSize())\n {\n //Cut the inserted line to the maximum size\n inputLine = inputLine.substring(0, SizeConstants.getMaxFileLineSize());\n System.out.println(\"The inserted line is too big. Only a portion of it will be inserted\");\n }\n this.FileLines.add(this.LineIndex + 1, inputLine);\n \n //Set the line index to the new line\n this.LineIndex++;\n System.out.println(\"New line entered successfully.\");\n }\n\n //Add new line before current line\n if(this.Command.equals(\"t\"))\n {\n System.out.println(\"Type the text for the new line:\");\n\n //Initialize a Scanner object to read for the command line\n Scanner cmdCurrentLineScanner = new Scanner(System.in);\n\n //Read the entered line\n String inputLine = cmdCurrentLineScanner.nextLine();\n\n //Check if the inserted line length is greater than the MaxFileLineSize\n if(inputLine.length() > SizeConstants.getMaxFileLineSize())\n {\n //Cut the inserted line to the maximum size\n inputLine = inputLine.substring(0, SizeConstants.getMaxFileLineSize());\n System.out.println(\"The inserted line is too big. Only a portion of it will be inserted\");\n }\n\n //Check whether the Linked List is empty\n if(this.FileLines.isEmpty())\n {\n //Add the inserted line at the first position\n this.FileLines.add(inputLine);\n }\n else\n {\n //Add the inserted line at the current position, and shift the current line to next position\n this.FileLines.add(this.LineIndex, inputLine);\n }\n System.out.println(\"New line entered successfully.\");\n }\n\n //Delete current line\n if(this.Command.equals(\"d\"))\n {\n //Check whether the Linked List is empty\n if(this.FileLines.isEmpty())\n {\n this.LineIndex = -1;\n System.out.println(\"No lines to be deleted.\");\n }\n else\n {\n //Delete the current line\n this.FileLines.remove(this.LineIndex);\n\n //Set the line index\n this.LineIndex = this.LineIndex == 0? 0: this.LineIndex - 1;\n System.out.println(\"Current line deleted successfully.\");\n }\n }\n\n //Print all lines\n if(this.Command.equals(\"l\"))\n {\n //Line number index\n int index = 0;\n\n //Iterate over the file lines\n for(String line : this.FileLines)\n {\n //If printing of the line number is enabled\n if(this.mPrintLineNumbers)\n {\n System.out.println(index + 1 + \") \" + line);\n index++;\n }\n else\n {\n System.out.println(line);\n }\n }\n }\n\n //Toggle whether line numbers are displayed when printing all lines\n if(this.Command.equals(\"n\"))\n {\n //If printing of the line number is enabled\n if(this.mPrintLineNumbers)\n {\n //Disable the line number printing\n this.mPrintLineNumbers = false;\n System.out.println(\"Line numbers won't be displayed when printing all lines.\");\n }\n else\n {\n //Enable the line number printing\n this.mPrintLineNumbers = true;\n System.out.println(\"Line numbers will be displayed when printing all lines.\");\n }\n }\n\n //Print current line\n if(this.Command.equals(\"p\"))\n {\n //Check whether the Linked List is empty\n if(this.FileLines.isEmpty())\n {\n System.out.println(\"No line to print.\");\n }\n else\n {\n System.out.println(this.FileLines.get(this.LineIndex));\n }\n }\n\n //Quit without save\n if(this.Command.equals(\"q\"))\n {\n System.out.println(\"Exiting without save.\");\n exit(0);\n }\n\n //Write file to disk\n if(this.Command.equals(\"w\"))\n {\n try\n {\n //Try to open the txt file\n FileWriter LocalOutputFileWriter = new FileWriter(new File(this.Filename));\n\n //Iterate over the file lines\n for(String line : this.FileLines)\n {\n //Write the line and a newline character\n LocalOutputFileWriter.write(line + \"\\n\");\n }\n System.out.println(\"File was written successfully.\");\n\n //Close the FileWriter object\n LocalOutputFileWriter.close();\n }\n catch (IOException e)\n {\n //Catch the IOException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n }\n }\n\n //Exit with save\n if(this.Command.equals(\"x\"))\n {\n try\n {\n //Try to open the txt file\n FileWriter LocalOutputFileWriter = new FileWriter(new File(this.Filename));\n\n //Iterate over the file lines\n for(String line : this.FileLines)\n {\n //Write the line and a newline character\n LocalOutputFileWriter.write(line + \"\\n\");\n }\n System.out.println(\"Exiting with save.\");\n\n //Close the FileWriter object\n LocalOutputFileWriter.close();\n\n //Exit from the program\n exit(0);\n }\n catch (IOException e)\n {\n //Catch the IOException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n }\n }\n\n //Print current line number\n if(this.Command.equals(\"=\"))\n {\n //Check whether the Linked List is empty\n if(this.FileLines.isEmpty())\n {\n System.out.println(\"Current line number: 0\");\n }\n else\n {\n System.out.println(\"Current line number: \" + (this.LineIndex + 1));\n }\n }\n\n //Print number of lines and characters\n if(this.Command.equals(\"#\"))\n {\n //Get the current line character length\n int mLines = this.FileLines.size();\n \n //Sum all the characters\n int totalLineCharacters = 0;\n for(String line : this.FileLines)\n {\n //Add the lines characters to total sum\n totalLineCharacters += line.length();\n }\n System.out.println(mLines + \" Lines, \" + totalLineCharacters + \" characters.\");\n }\n\n //Create index file\n if(this.Command.equals(\"c\"))\n {\n //Initialize an ArrayList for the file lines\n ArrayList<String> wordList = new ArrayList<>();\n\n //Initialize an ArrayList for the file line numbers\n ArrayList<Integer> fileLineIndex = new ArrayList<>();\n \n //Initialize a file line counter\n int lineCounter = 1;\n \n //Iterate over the file lines\n for(String line : this.FileLines)\n {\n //Split the words from each line\n String[] splitWords = line.split(\"-|[ ,.?!]+\");\n \n //Iterate over the spliced words\n for(String word : splitWords)\n {\n //If the spit word length is less than MinWordSize, ignore it\n if(word.length() >= SizeConstants.getMinWordSize())\n {\n //If the spit word length is greater than MaxWordSize, cut it to maximum size\n if(word.length() > SizeConstants.getMaxWordSize())\n {\n word = word.substring(0,SizeConstants.getMaxWordSize());\n }\n //Add the word to the array list\n wordList.add(word);\n\n //Add the word line number to the array list\n fileLineIndex.add(lineCounter);\n }\n }\n //Increase the line counter\n lineCounter++;\n }\n \n //Create a IndexFileBufferFileWriter, to create the index file\n IndexFileBufferFileWriter indexTableFileWriter = new IndexFileBufferFileWriter(this.Filename);\n\n //Create the sorted index table of the the file\n IndexingTable indexingTable = new IndexingTable(wordList, fileLineIndex, true);\n\n //Create the index file based on the index table and get the data page number\n int mNumberOfPages = indexTableFileWriter.IndexingTableByteFileWrite(indexingTable);\n System.out.print(\"Index file was created successfully.\");\n System.out.println(\"Data pages of size \" + SizeConstants.getBufferSize() + \" bytes: \" + mNumberOfPages);\n }\n\n //Print index file\n if(this.Command.equals(\"v\"))\n {\n //Initialize an ArrayList for the file lines\n ArrayList<String> wordList = new ArrayList<>();\n\n //Initialize an ArrayList for the file line numbers\n ArrayList<Integer> fileLineIndex = new ArrayList<>();\n\n //Initialize a file line counter\n int lineCounter = 1;\n\n //Iterate over the file lines\n for(String line : this.FileLines)\n {\n //Split the words from each line\n String[] splitWords = line.split(\"-|[ ,.?!]+\");\n\n //Iterate over the spliced words\n for(String word : splitWords)\n {\n //If the spit word length is less than MinWordSize, ignore it\n if(word.length() >= SizeConstants.getMinWordSize())\n {\n //If the spit word length is greater than MaxWordSize, cut it to maximum size\n if(word.length() > SizeConstants.getMaxWordSize())\n {\n word = word.substring(0,SizeConstants.getMaxWordSize());\n }\n //Add the word to the array list\n wordList.add(word);\n\n //Add the word line number to the array list\n fileLineIndex.add(lineCounter);\n }\n }\n //Increase the line counter\n lineCounter++;\n }\n //Create the unsorted index table of the the file\n IndexingTable indexingTable = new IndexingTable(wordList, fileLineIndex, false);\n\n //Iterate over the indexing table tuples\n for(int index = 0; index < fileLineIndex.size(); index++)\n {\n System.out.println(indexingTable.getTupleVector().get(index).getLeftValue() + \" Line: \" + indexingTable.getTupleVector().get(index).getRightValue());\n }\n }\n\n //Print lines of word serial(Linear) search.\n if(this.Command.equals(\"s\"))\n {\n System.out.println(\"Type the word that you want to search:\");\n\n //Initialize a Scanner object to read the word to be searched from the command line\n Scanner cmdCurrentLineScanner = new Scanner(System.in);\n\n //Read the inserted word\n String inputWord = cmdCurrentLineScanner.nextLine();\n\n //Initialize an ArrayList to store the lines that the word is found\n ArrayList<Integer> matchingPositions = new ArrayList<>();\n\n //Execute the linear read of the index file and get the number of data page accesses\n int dataPageAccessCounter = LinearReadIndexFile(this.Filename, matchingPositions, inputWord);\n\n //Check whether the word has been found in the index file\n if(matchingPositions.isEmpty())\n {\n //If the word doesn't exists in the index file\n System.out.println(\"The word: \" + inputWord + \" has not been found.\");\n }\n else\n {\n //If the word exists in the index file\n System.out.print(\"The word: \" + inputWord + \" has been found on lines: \");\n\n //Iterate over the lines that the word to be searched was found\n for(Integer position : matchingPositions)\n {\n System.out.print(position + \",\");\n }\n System.out.println(\".\");\n }\n System.out.println(\"Disk Accesses: \" + dataPageAccessCounter);\n }\n\n //Print lines of word binary search.\n if(this.Command.equals(\"b\"))\n {\n System.out.println(\"Type the word that you want to search:\");\n\n //Initialize a Scanner object to read the word to be searched from the command line\n Scanner cmdCurrentLineScanner = new Scanner(System.in);\n \n //Read the inserted word\n String inputWord = cmdCurrentLineScanner.nextLine();\n\n //Initialize an ArrayList to store the lines that the word is found\n ArrayList<Integer> matchingPositions = new ArrayList<>();\n\n //Execute the binary read of the index file and get the number of data page accesses\n int dataPageAccessCounter = BinaryReadIndexFile(this.Filename, matchingPositions, inputWord);\n\n //Check whether the word has been found in the index file\n if(matchingPositions.isEmpty())\n {\n //If the word doesn't exists in the index file\n System.out.println(\"The word: \" + inputWord + \" has not been found.\");\n }\n else\n {\n //If the word exists in the index file\n System.out.print(\"The word: \" + inputWord + \" has been found on lines: \");\n\n //Sort the lines occurrences list\n Collections.sort(matchingPositions);\n\n //Remove duplicate entries\n List<Integer> uniqueMatchingPositions = matchingPositions.stream().distinct().collect(Collectors.toList());\n\n //Iterate over the lines that the word to be searched was found\n for(Integer position : uniqueMatchingPositions)\n {\n System.out.print(position + \",\");\n }\n System.out.println(\".\");\n }\n System.out.println(\"Disk Accesses: \" + dataPageAccessCounter);\n }\n }\n else\n {\n //If the inserted command is invalid\n System.out.println(\"Invalid Command.\");\n }\n }",
"private void _createSecondPort() throws NameDuplicationException, IllegalActionException {\r\n // Go looking for the port in case somebody else created the port\r\n // already. For example, this might\r\n // happen in shallow code generation.\r\n secondOperand = (Port) getPort(\"secondOperand\");\r\n if (secondOperand == null) {\r\n secondOperand = PortFactory.getInstance().createInputPort(this, \"secondOperand\", Double.class);\r\n\r\n } else if (secondOperand.getContainer() == null) {\r\n secondOperand.setContainer(this);\r\n }\r\n }",
"private void processOperator(String operator){\n if (numStack.size() <2){\n System.out.println(\"Stack underflow.\");\n }\n else if (dividingByZero(operator)){\n System.out.println(\"Divide by 0.\"); \n }\n else{\n int num1 = numStack.pop();\n int num2 = numStack.pop();\n int result = performCalculation(num1, num2, operator);\n numStack.push(result);\n }\n\n }",
"@Override\n protected double executeCommand(Turtle turtle, GlobalProperties globalProperties) {\n double distance = getChildren().get(0).execute(turtle, globalProperties);\n turtle.forward(-1 * distance);\n return distance;\n }",
"public void executeUndoCommand(){\n for (Command command: undoStack) {\n command.execute();\n }\n }",
"public static void redo () {\r\n\t\tCommand cmd = redoCommands.pop();\r\n\t\tcmd.redo();\r\n\t\tundoCommands.push(cmd);\r\n\t}",
"public String redo() {\n/* 173 */ return redo(0, false);\n/* */ }",
"public void executeNewCommand(Command cmd)\n {\n if (mHistoryIdx < mCommandList.size()) {\n if (clobber) {\n /* Overwrite (well, remove) history past this point */\n while (mHistoryIdx < mCommandList.size()) {\n mCommandList.remove(mCommandList.size() - 1);\n this.setChanged();\n this.notifyObservers(HISTORY_CLOBBERED);\n }\n } else {\n throw new RuntimeException(\n \"Cannot execute new command while not and the end of the \" +\n \"command list\");\n }\n }\n\n mCommandList.add(cmd);\n cmd.redo();\n mHistoryIdx++;\n this.setChanged();\n this.notifyObservers(cmd);\n }",
"public void undo() {\n setExecuted(false);\n }",
"@Override\r\n\t\t\t\tpublic Integer call(Integer v1, Integer v2) throws Exception {\n\t\t\t\t\treturn v1+v2;\r\n\t\t\t\t}",
"public void inputPrev() {\n --this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"private void calculate(double x, String lastCommand) {\n\n switch (lastCommand.charAt(0)){\n case '+':\n result += x;\n break;\n case '-':\n result -= x;\n break;\n case '*':\n result *= x;\n break;\n case '÷':\n result /= x;\n break;\n case '=':\n result = x;\n break;\n }\n showResult(result);\n }",
"@Override\n public int getPositionFirstOperand() {\n return position + 1;\n }"
]
| [
"0.6540275",
"0.6030355",
"0.576471",
"0.56055886",
"0.55942124",
"0.5585368",
"0.55616146",
"0.5515863",
"0.5422545",
"0.5413353",
"0.53987765",
"0.5398763",
"0.5325807",
"0.5297202",
"0.5280968",
"0.5242259",
"0.5218986",
"0.52038676",
"0.51659423",
"0.5159908",
"0.5134069",
"0.5095656",
"0.5091413",
"0.5045598",
"0.502736",
"0.50259423",
"0.5023725",
"0.50137234",
"0.5011476",
"0.50053626",
"0.49868435",
"0.49841678",
"0.49836627",
"0.49800384",
"0.49759874",
"0.49573988",
"0.49545112",
"0.49457976",
"0.4942524",
"0.49422845",
"0.4942055",
"0.49412626",
"0.4940129",
"0.4939878",
"0.49372897",
"0.4922459",
"0.49138036",
"0.49104384",
"0.4899656",
"0.48851153",
"0.48780352",
"0.4875798",
"0.48725328",
"0.48607856",
"0.4856847",
"0.48563308",
"0.48494834",
"0.48371202",
"0.4833385",
"0.48299482",
"0.48244745",
"0.4819649",
"0.48151955",
"0.48118398",
"0.48083025",
"0.4807186",
"0.48051804",
"0.47981358",
"0.47977647",
"0.4794428",
"0.4770926",
"0.4768394",
"0.47674698",
"0.47657135",
"0.47608227",
"0.47514632",
"0.47459656",
"0.47435838",
"0.473715",
"0.47354072",
"0.47334763",
"0.473332",
"0.4730733",
"0.4728564",
"0.4725559",
"0.4725147",
"0.47222272",
"0.47202554",
"0.47195628",
"0.47160226",
"0.47152117",
"0.4706428",
"0.4706166",
"0.47026628",
"0.47024083",
"0.46978343",
"0.46960565",
"0.46787995",
"0.467521",
"0.4674979"
]
| 0.65105695 | 1 |
Testing closing popups and entering the login section. | @Test(priority = 1)
public void testHomePage() {
driver.navigate().to(HomePage.URL);
driver.manage().window().maximize();
WebDriverWait wait = new WebDriverWait(driver, 10);
HomePage.clickAnnouncementButton(driver);
HomePage.clickCookiesButton(driver);
HomePage.clickLogin(driver);
String currentUrl = driver.getCurrentUrl();
String expectedUrl = "https://www.humanity.com/app/";
SoftAssert sa = new SoftAssert();
sa.assertEquals(currentUrl, expectedUrl);
sa.assertAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void SignIn()\n\t{\n\t\tdriver.get(baseUrl);\n\t\tHomePage hp =new HomePage(driver);\n\t\thp.SignIn();\n\t\tString handle=driver.getWindowHandle();\n\t\tdriver.switchTo().window(handle);\n\t\t\n\t\t//2.\tLogin -Enter non-valid credentials. Expected error message is displayed\n\t\tLoginPage lp =new LoginPage(driver);\n\t\tlp.email(f);\n\t\tlp.password(p);\n\t\tlp.Login();\t\n\t\t\n\t\t// 3. Verify error message\n\t\tString ExpMsg = lp.Error_Mess();\n\t\tString DispMsg = (\"Authentication failed.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg,DispMsg);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//4.\tLogin -Enter wrong credentials. Expected error message is displayed\n\t\tlp.email(g);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t\t\n\t\t//5.\tVerify error message\n\t\tString ExpMsg1 = lp.Error_Mess();\n\t\tString DispMsg1 = (\"Invalid email address.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg1,DispMsg1);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//6.\tLogin -Enter valid credentials and Sign in\n\t\tlp.Signin();\n\t\tlp.email(e);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"@Test\n public void checkLoginAndLogout() {\n mInjector.authentication()\n .authenticateValidUser(USERNAME, PASSWORD)\n .checkMainScreenIsDisplayed(); // Then the main screen appears\n\n mInjector.navigationDrawer()\n .logoutUser(USERNAME) // When the user logs out\n .checkAuthScreenIsDisplayed();\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"@Test(priority = 0, groups = \"test\")\r\n\tpublic void TestLogin()\r\n\t{\r\n\t\t// Step-1] Login using adminX credentials.\r\n\t login.AdminXLogin();\r\n\t extent.log(LogStatus.INFO, \"LoggedIn successfully.\");\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.linkText(\"PRODUCT\")));\r\n\t // Step-2] Open Add scheme page.\r\n\t Ops.OpenAddScheme();\r\n\t \r\n\t}",
"@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}",
"@Test\n public void positiveTest() {\n\n loginPage.setUsername(\"admin\");\n loginPage.setPassword(\"123\");\n loginPage.clickOnLogin();\n Assert.assertEquals(driver.getTitle(), \"Players\", \"Wrong title after login\");\n Assert.assertNotEquals(driver.getCurrentUrl(), LoginPage.URL_login, \"You are still on login page.\");\n }",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"@Test\t\t\n\tpublic void Login()\t\t\t\t\n\t{\t\t\n\t driver.get(\"https://demo.actitime.com/login.do\");\t\t\t\t\t\n\t driver.findElement(By.id(\"username\")).sendKeys(\"admin\");\t\t\t\t\t\t\t\n\t driver.findElement(By.name(\"pwd\")).sendKeys(\"manager\");\t\t\t\t\t\t\t\n\t driver.findElement(By.xpath(\"//div[.='Login ']\")).click();\t\t\n\t driver.close();\n\t}",
"@Test public void test() {\n click(\"#txfEmail\").\n type(SMALL_EMAIL_BODY).\n press(KeyCode.SHIFT).\n press(KeyCode.DIGIT2).\n release(KeyCode.SHIFT).\n release(KeyCode.DIGIT2).\n type(EMAIL_SERVER);\n click(\"#psfPassword\").type(PASS);\n click(\"#btnLogin\");\n sleep(3000);\n assertEquals(UStage.getInstance().getCurrentController().getClass(), CMain.class);\n verifyThat(\"#lblNickname\", hasText(NICK));\n verifyThat(\"#lblProfileName\", hasText(NAME));\n }",
"@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }",
"public void test_Login() throws Exception {\n//\t\tSystem.setProperty(BrowType, BrowPath);\n//\t\tWebDriver driver = new ChromeDriver();\n\t\t\n//\t\tdriver.get(url);\n//\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"emailAddress\")).sendKeys(EmailAddress);\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(Password);\n\t\tdriver.findElement(By.id(\"signInButton\")).click();\n\t\tThread.sleep(5000);\n\t\t\n\t\tString ExpConfMsg2 = \"Signed in as \" + DisplayName + \"(Sign Out)\";\n\t\tString ConfMsg2 = driver.findElement(By.xpath(\"//*[@id='signedInAs']\")).getText();\n\t\tif(ConfMsg2.equals(ExpConfMsg2)) {\n\t\t\tSystem.out.println(\"Login functionality Passed. Confirmation Message that appeared is : \" + ConfMsg2);\n\t\t} else {\n\t\t\tSystem.out.println(\"Login functionality Failed. Confirmation Message that appeared is : \" + ConfMsg2);\n\t\t}\n\t\t\n\t\tdriver.quit();\n\t\t\n\t}",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"@When(\"^user should cliks the Login Button in login page$\")\n\tpublic void user_should_cliks_the_Login_Button_in_login_page() throws Throwable {\n\t\telementClick(pa.getAp().getLoginclick());\n\t \n\t}",
"@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}",
"@Test(dependsOnMethods=\"startapp\")\r\n\tpublic void loginapp() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[1]/input\")).sendKeys(\"[email protected]\");\r\n\t\t//((WebElement) driver.findElements(By.xpath(\"//*[@id=\\\"idSIButton9\\\"]\"))).click();\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/div[2]/input\")).sendKeys(\"Liverpool1\");\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"root\\\"]/div/div/div/form/button\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);\r\n\t}",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}",
"@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }",
"@Test(priority = 4)\n\tpublic void loginTest1() throws InterruptedException {\n\t\tHomePage home = new HomePage(this.driver);\n\t\tAssert.assertTrue(home.myAccountElementIsDisplayed());\n\t\thome.navigateToMyAccount();\n\t\tAssert.assertTrue(home.dropBoxMyAccountIsDisplayed());\n\t\t// After step must be openned small window when are few elements with Login btn\n\t\tLoginPage login = new LoginPage(this.driver);\n\t\tlogin = home.navigateToLogin();\n\t\tAssert.assertTrue(login.loginPageIsOpen());\n\t\t// After step by clicking login must be openned new ProfilePage\n\t\t// when user can write email and password and log in\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToEmailField(\"\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToPasswordField(\"\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToLoginBtn();\n\t\tThread.sleep(2000);\n\t\tAssert.assertTrue(login.errorDisplayed());\n\t\thome.navigateToReturnHomePage();\n\t}",
"@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}",
"@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}",
"@Test\n\tpublic void portalTestFinishesWhileLoggedInAsRegularUser() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running portalTestFinishesWhileLoggedInAsRegularUser()...\");\n\n\t\t// Log into Portal\n\t\tportal.loginScreen.navigateToPortal();\n\t\tportal.login(portalUser);\n\n\t\tVoodooUtils.voodoo.log.info(\"If this message appears, that means we logged in successfully without error.\");\n\t\tportal.navbar.userAction.assertVisible(true);\n\n\t\tsugar().loginScreen.navigateToSugar();\n\t\tsugar().alerts.waitForLoadingExpiration(30000);\n\t\tsugar().logout();\n\t\tsugar().login(sugar().users.getQAUser());\n\n\t\tVoodooUtils.voodoo.log.info(\"portalTestFinishesWhileLoggedInAsRegularUser() completed.\");\n\t}",
"@Test\n\tpublic void testingLoginWithEnter() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validUsername\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.sendKeys(Keys.ENTER);\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"@Test(description = \"Login con credenciales correctas\", enabled = false)\n\tpublic void login() {\n\t\tPageLogin pageLogin = new PageLogin(driver);\n\t\tPageReservation pageReservation = new PageReservation(driver);\n\t\tpageLogin.login(\"mercury\", \"imercury\");\n\t\tpageReservation.assertPage();\n\t\t//****Este código se cambió por A****\n\t\t/*driver.findElement(By.name(\"userName\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"login\")).click();*/\n\t\t//******todo este código que se repite se cambió por B****\n\t\t/*try {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//****código B****\n\t\t/*Helpers helper = new Helpers();\n\t\thelper.sleepSeconds(4);*/\n\t\t//este codigo pasa a la Page Object(page reservation)\n\t\t//Assert.assertTrue(driver.findElement(By.xpath(\"/html/body/div/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[3]/td/font\")).getText().contains(\"Flight Finder to search\"));\n\t}",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"@Test\n public void SignInTest() throws InterruptedException {\n LoginTC login = new LoginTC(driver);\n login.LoginTest();\n\n SignInPagePO signInPage = new SignInPagePO(driver);\n\n\n //Step 1: Click On Users\n Assert.assertEquals(signInPage.clickUsers(), true,\"Opps!! unable to click Users\");\n\n //Step 2 :: Click On Managers\n\n Assert.assertEquals(signInPage.clickManagers(), true,\"Opps!! unable to click Managers\");\n\n //Step 3: Click On addmanager\n\n Assert.assertEquals(signInPage.clickAddmanager(), true,\"Opps!! unable to click addmanager\");\n\n //Step 1 :: Enter valid Username\n\n String firstname=\"testname\";\n Assert.assertEquals(signInPage.enterfirstName(firstname), true,\"Opps!! unable to enter first name\");\n\n //Step 1 :: Enter valid Username\n String lastname=\"testlastname\";\n Assert.assertEquals(signInPage.enterlasttName(lastname), true,\"Opps!! unable to enter last name\");\n\n\n }",
"@When(\"I click on log in\")\n\tpublic void i_click_on_log_in() {\n\t\tlogger.info(\"Clicking on Sign in\");\n\t\thomepage.login.click();\n\t\tBrowserUtilities.waitFor(2);\n\n\t}",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Test\n\tpublic void cricLogin(){\n\t\tdriver.get(\"http://localhost:8080/CricWebApp/login.do\");\n\t\tdriver.manage().window().maximize(); \n\t\ttry {\n\t\t\tThread.sleep(4000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//driver.findElement(By.linkText(\"Sign Up\")).click();\n\t\tdriver.findElement(By.name(\"userName\")).sendKeys(\"jmuh\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"jmuh\");\n\t\tdriver.findElement(By.tagName(\"input\")).click();\n\t\tdriver.findElement(By.xpath(\"/html/body/form/div[2]/table/tbody/tr[3]/td/input\")).click();\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdriver.close();\n\t\t\n\t}",
"@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"public void testMainMenu() {\n // open and close New Project wizard\n NewProjectWizardOperator.invoke().close();\n\n //workaround for issue 166989\n if (System.getProperty(\"os.name\").equals(\"Mac OS X\")) {\n try {\n new NbDialogOperator(\"Warning\").close();\n } catch (TimeoutExpiredException e) {\n }\n }\n }",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"@Test(enabled = true, priority = 8)\n\tpublic void loginButtonTest03() {\n\t\tdriver.findElement(By.cssSelector(\"#cms-login-submit\")).click();\n\n\t}",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"@Test(priority = 6)\n\tpublic void loginTest3() throws InterruptedException {\n\t\tHomePage home = new HomePage(this.driver);\n\t\tAssert.assertTrue(home.myAccountElementIsDisplayed());\n\t\thome.navigateToMyAccount();\n\t\tAssert.assertTrue(home.dropBoxMyAccountIsDisplayed());\n\t\tLoginPage login = new LoginPage(this.driver);\n\t\tlogin = home.navigateToLogin();\n\t\tAssert.assertTrue(login.loginPageIsOpen());\n\t\tThread.sleep(2000);\n\t\tlogin.clearField();\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToEmailField(\"[email protected]\");\n\t\tlogin.navigateToPasswordField(\"\");\n\t\tlogin.navigateToLoginBtn();\n\t\tAssert.assertTrue(login.errorDisplayed());\n\t\thome.navigateToReturnHomePage();\n\t}",
"@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}",
"@Test(priority = 1)\n public void testLoginUser() {\n\n WebElement loginField = driver.findElement(By.name(\"username\"));\n loginField.sendKeys(userLogin);\n System.out.println(userLogin);\n\n WebElement passwordField = driver.findElement(By.name(\"password\"));\n passwordField.sendKeys(userPassword);\n System.out.println(userPassword);\n\n WebElement loginButton = driver.findElement(By.cssSelector(\"button[class*='el-button']\"));\n loginButton.click();\n\n// wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\"div[class*='search-form'] > div > input\")));\n\n String url = driver.getCurrentUrl();\n Assert.assertEquals(url,\"http://login.multidetect.eu/project\");\n }",
"@Test\n @UiThreadTest\n public void testGuestLoginLogout() {\n // Click guest user\n expectVisible(firstViewWithText(\"GU\"));\n screenshot(\"Test Start\");\n click(viewWithText(\"Guest User\"));\n\n // Should be logged in; log out\n expectVisible(viewWithText(R.string.title_location_list));\n screenshot(\"After Guest User Clicked\");\n click(viewWithText(\"GU\"));\n expectVisible(viewWithText(\"Guest User\"));\n screenshot(\"After Guest User Selected in Action Bar\");\n click(viewWithId(R.id.button_log_out));\n\n waitForProgressFragment();\n\n // Should be back at the user list\n click(viewWithId(R.id.action_new_user));\n screenshot(\"After Logout\");\n }",
"public void verifyVINCERegistrationPageInNewWindow() {\n\t\tAssert.assertTrue(notAUserText.isDisplayed());\n\t\t_normalWait(3000);\n\t}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"@Then(\"User does Successful login\")\n\tpublic void user_does_Successful_login() {\n\t\tdriver.close();\n\t}",
"@Test\n public void testlogInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n //verify we're viewing the testing profile\n assertTrue(driver.findElement(By.id(\"founderProfile\")).isDisplayed());\n logOutUser();\n }",
"@Test\n\tpublic void testLogout() throws Exception {\n\t\tgotoHomePage();\n\t\t\n\t\t// login then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\t// should redirect to home page\n\t\tAssert.assertEquals(\"SIS\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Cart page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Cart\")).click();\n\t\tAssert.assertEquals(\"Cart\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Transcript page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Transcript\")).click();\n\t\tAssert.assertEquals(\"Transcript\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Payment page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Payment\")).click();\n\t\tAssert.assertEquals(\"Payment\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Grades page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Grades\")).click();\n\t\tAssert.assertEquals(\"Grades\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Change Password page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Change Password\")).click();\n\t\tAssert.assertEquals(\"Change Password\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t}",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }",
"@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }",
"@Test\n @Issue(\"EZ-8885\")\n void verifyGeneralElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getStatusLoginFields();\n LoginPage.getButtonsStatus();\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getStatusLoginFields()).isTrue();\n softly.assertThat(LoginPage.getButtonsStatus()).isTrue();\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n\n }",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"@Test(priority = 7)\n\tpublic void loginTest4() throws InterruptedException {\n\t\tHomePage home = new HomePage(this.driver);\n\t\tAssert.assertTrue(home.myAccountElementIsDisplayed());\n\t\thome.navigateToMyAccount();\n\t\tAssert.assertTrue(home.dropBoxMyAccountIsDisplayed());\n\t\tLoginPage login = new LoginPage(this.driver);\n\t\tlogin = home.navigateToLogin();\n\t\tAssert.assertTrue(login.loginPageIsOpen());\n\t\tThread.sleep(2000);\n\t\tlogin.clearField();\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToEmailField(\"[email protected]\");\n\t\tlogin.navigateToPasswordField(\"\");\n\t\tlogin.navigateToLoginBtn();\n\t\tAssert.assertTrue(login.errorDisplayed());\n\t\thome.navigateToReturnHomePage();\n\t}",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Test\n\tpublic void Test_NoAccess3() throws Exception {\n\t\t\n\t\tfinal HtmlForm form = (HtmlForm) page.getElementById(\"signInForm1\");\n\t\t\n\t\tform.getInputByName(\"username\").setValueAttribute(\"jb\");\n\t\tform.getInputByName(\"password\").setValueAttribute(\"xxxx\");\t// wrong password!!!\n\t\t\n\t\tform.getInputByName(\"submit\").click();\n\t\t\n\t\tassertEquals(\"Fab Lab - Anmelden\", page.getTitleText());\n\t\tassertTrue(page.asXml().contains(\"<span wicket:id=\\\"signInPanel\\\" id=\\\"signInPanel\\\">\"));\n\t\t\n\t}",
"@Test\n\tpublic void checking_thirdalertbtn_withcancel()throws IOException, InterruptedException\n\t{\n\t\tgetlogin();\n\t\tSwitchtoPage sp=new SwitchtoPage(driver);\n\t\tsp.getswitchtolink().click();\n\t\tsp.getAlertlink().click();\n\t\tsp.getalTextbox().click();\n\t\tsp.getPrompt().click();\n \t Alert al=driver.switchTo().alert();\n \t al.dismiss();\n\t}",
"@Test\n\tpublic void Test_NoAccess2() throws Exception {\n\t\t\n\t\tfinal HtmlForm form = (HtmlForm) page.getElementById(\"signInForm1\");\n\t\t\n\t\tform.getInputByName(\"username\").setValueAttribute(\"jb\");\n\t\tform.getInputByName(\"password\").setValueAttribute(\"\");\t// No password!!!\n\t\t\n\t\tform.getInputByName(\"submit\").click();\n\t\t\n\t\tassertEquals(\"Fab Lab - Anmelden\", page.getTitleText());\n\t\tassertTrue(page.asXml().contains(\"<span wicket:id=\\\"signInPanel\\\" id=\\\"signInPanel\\\">\"));\n\t\t\n\t}",
"@Test\r\n\tpublic void test_Logout() throws Exception{\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Click on profile\r\n\t\t\tdriver.findElement(By.xpath(object.getProperty(\"R_profile\"))).click();\r\n\t\t\t //click on logout\r\n\t\t\tdriver.findElement(By.xpath(object.getProperty(\"R_logout\"))).click();\r\n\t\t\t\r\n\t\t\t/*// Click on alert button\r\n\t\t\tdriver.findElement(By.id(\"popup_ok\")).click();\r\n\t\t\t//Click on Logout button.\r\n\r\n\t\t\tdriver.findElement(By.xpath(\"/html/body/div[3]/div/section/div/li/button\")).click();\r\n*/\r\n\t\t\tAlert alert = driver.switchTo().alert();\r\n\t\t\tThread.sleep(3000);\r\n\t\t\talert.accept();\r\n\r\n\t\t\t \r\n\t\t\t Thread.sleep(3000);\r\n\t\t\t// Utility.writeResult(\"Ppass\",76,5);\r\n\t\t\tUtility.getscreenshot(\"Logout\",driver);\t\t\t\t \r\n\t\t\tLog.info(\"logout Page\");\r\n\t\t\tReporter.log(\"logout Page\");\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t // Utility.writeResult(\"PFail\",76,5);\r\n\t\t\tLog.info(\"Unable to logout\");\r\n\t\t\tReporter.log(\"Unable to logout\");\r\n\t\t\tthrow new Exception();\r\n\t\t}\r\n\t}",
"public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }",
"@Test\n\tpublic void checkValidLoginRegistrator() {\n\t\ttest = report.createTest(\"CheckValidLoginRegistrator\");\n\t\t\n\t\tregistratorhomepage = loginpage.successfullLoginRegistrator(UserContainer.getRegistrator());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(registratorhomepage.getUserNameText(), UserContainer.getRegistrator().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = registratorhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Test(priority=0)\n \n public void test_Login(){\n \tobjLogin = new PilrLogin(driver);\n \n \t//Verify login page title\n \tString loginPageTitle = objLogin.getPageSource();\n \tAssert.assertTrue(loginPageTitle.toLowerCase().contains(\"sign in\"));\n\n \n \t//login to application\n \tobjLogin.loginToPilr(objtestvars.getUserName(), \n \t\t\tobjtestvars.getPassWrd());\n \n \t// go the next page\n \tobjHomePage = new PilrHomePage(driver);\n \n \t//Verify home page\n \tAssert.assertTrue(objHomePage.getHomePageWelcome().toLowerCase().contains(\n \t\t\t\"welcome back, bikerjohn!\"));\n \tSystem.out.println(\"[Test Case]Home Page Verified\");\n }",
"@Test(priority = 1)\n\tpublic void login() {\n\t\tlp.loginToApp();\n\t}",
"@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"private void testFinished() {\n\t\t\tLoginPage.logout(driver());\n\t\t}",
"@Test(\tdescription = \"Verify initial focus on the login screen should be in username\",\n\t\t\tgroups = { \"skip-functional\" })\n\tpublic void LoginScreen03() throws HarnessException {\n\t\tapp.zPageLogin.zNavigateTo();\n\t\t\n\t\t// Type a unique string into the browser\n\t\tString value = \"foo\" + ZmailSeleniumProperties.getUniqueString();\n\t\tapp.zPageLogin.zKeyboardTypeString(value);\n\t\t\n\t\t// Get the value of the username field\n\t\tString actual = app.zPageLogin.sGetValue(PageLogin.Locators.zInputUsername);\n\t\t\n\t\t// Verify typed text and the actual text match\n\t\tZAssert.assertEquals(actual, value, \"Verify the username has initial focus\");\n\t\t\n\t}",
"public void Rooms_and_Guests() \r\n\t{\r\n\t\tExplicitWait(roomsandguests);\r\n\t\tif (roomsandguests.isDisplayed()) \r\n\t\t{\r\n\t\t\troomsandguests.click();\r\n\t\t\t//System.out.println(\"roomsandguests popup opened successfully\");\r\n\t\t\tlogger.info(\"roomsandguests popup opened successfully\");\r\n\t\t\ttest.log(Status.PASS, \"roomsandguests popup opened successfully\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"roomsandguests popup not found\");\r\n\t\t\tlogger.error(\"roomsandguests popup not found\");\r\n\t\t\ttest.log(Status.FAIL, \"roomsandguests popup not found\");\r\n\r\n\t\t}\r\n\t}",
"@Test\n public void openRegisterScreen() {\n //TODO 1,2,3\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).check(matches(isDisplayed()));\n\n //TODO 4,5\n Espresso.closeSoftKeyboard();\n Espresso.pressBack();\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.usernameEditText)).check(matches(isDisplayed()));\n }",
"@Then(\"user is navigated to login page\")\n\tpublic void user_is_navigated_to_login_page() throws InterruptedException {\n\t\tdriver.findElement(By.id(\"logout\")).isDisplayed();\n\t\tThread.sleep(2000);\n\n\t\tdriver.close();\n\t\tdriver.quit();\n\n\n\t\t\n\t}",
"@Test (priority = 5)\n\tpublic void loginTest2() throws InterruptedException {\n\t\tHomePage home = new HomePage(this.driver);\n\t\tAssert.assertTrue(home.myAccountElementIsDisplayed());\n\t\thome.navigateToMyAccount();\n\t\tAssert.assertTrue(home.dropBoxMyAccountIsDisplayed());\n\t\tLoginPage login = new LoginPage(this.driver);\n\t\tlogin = home.navigateToLogin();\n\t\tAssert.assertTrue(login.loginPageIsOpen());\n\t\tThread.sleep(2000);\n\t\tlogin.clearField();\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToEmailField(\"asasas\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToPasswordField(\"\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToLoginBtn();\n\t\tThread.sleep(2000);\n\t\tAssert.assertTrue(login.errorDisplayed());\n\t\thome.navigateToReturnHomePage();\n\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Test\n\tpublic void test() throws Exception {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 60);\n\n\t\t// Login\n\t\tdriver.get(Config.URL_LOGIN);\n WebElement txtEmail = wait.until(ExpectedConditions.presenceOfElementLocated(By.id(\"email\"))); \n txtEmail.sendKeys(Config.USUARIO);\n\t\tassertEquals(Config.USUARIO, txtEmail.getAttribute(\"value\"), \"ASSERT => txtEmail\");\n\n WebElement txtContrasena = wait.until(ExpectedConditions.presenceOfElementLocated(By.name(\"passwd\"))); \n txtContrasena.sendKeys(Config.CONTRASENA);\n\t\tassertEquals(Config.CONTRASENA, txtContrasena.getAttribute(\"value\"), \"ASSERT => txtContrasena\");\n\n WebElement btnLogin = wait.until(ExpectedConditions.elementToBeClickable(By.id(\"SubmitLogin\"))); \n btnLogin.click();\n \n WebElement txtBuscar = wait.until(ExpectedConditions.presenceOfElementLocated(By.id(\"search_query_top\")));\n txtBuscar.sendKeys(\"dress\");\n \n WebElement btnLupa = wait.until(ExpectedConditions.presenceOfElementLocated(By.name(\"submit_search\")));\n btnLupa.click();\n \n \n \n Thread.sleep(5000);\n //valida que se muestra mi cuenta\n // WebElement lblMyAccount = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//*[text()='My account']\"))); \n //boolean myAccountIsDisplay = lblMyAccount.isDisplayed();\n //assertTrue(myAccountIsDisplay, \"ASSERT => LOGIN.\");\n\n \n \n // Logout\n //WebElement lnkLogOut = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"(//a[contains(text(), 'Sign out')])[1]\"))); \n //lnkLogOut.click();\n\t\t\n\t\t//valida que se realize el logout\n\t\t//WebElement lnkLogin = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"(//a[contains(text(), 'Sign in')])[1]\"))); \n\t\t//assertTrue(lnkLogin.isDisplayed(), \"ASSERT => LOGOUT.\");\n\t\tdriver.quit();\n\t}",
"@Test\n\tpublic void portalLoginAfterSugarLogin() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running portalLoginAfterSugarLogin()...\");\n\n\t\t// Log into Portal\n\t\tportal.loginScreen.navigateToPortal();\n\t\tportal.login(portalUser);\n\n\t\tVoodooUtils.voodoo.log.info(\"If this message appears, that means we logged in successfully without error.\");\n\t\tportal.navbar.userAction.assertVisible(true);\n\n\t\tVoodooUtils.voodoo.log.info(\"portalLoginAfterSugarLogin() completed.\");\n\t}",
"public void createLoginPopUp(JButton loginButton) {\n\t\tJPanel loginPanel = new JPanel();\n\n\t\tHintTextField usernameEntry = new HintTextField(\"Username\");\n\t\tusernameEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tHintPasswordField passwordEntry = new HintPasswordField(\"Password\");\n\t\tpasswordEntry.setPreferredSize(new Dimension(150, 25));\n\n\t\tBox vBox = Box.createVerticalBox(); // Align components in one column\n\t\tvBox.add(usernameEntry);\n\t\tvBox.add(passwordEntry);\n\n\t\tloginPanel.add(vBox);\n\t\tObject options[] = { \"Login\", \"Cancel\" };\n\n\t\tint selection = JOptionPane.showOptionDialog(null, loginPanel, \"BTS Login\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\n\t\tif (selection == JOptionPane.OK_OPTION) {\n\t\t\tString username = usernameEntry.getText();\n\t\t\tString password = String.valueOf(passwordEntry.getPassword());\n\t\t\t// Call Login method in uicontroller and take action based on result\n\t\t\tEmployee logged_in_result = uiController_.login(username + \":\" + password);\n\t\t\tif (logged_in_result == null) {\n\t\t\t\t// Show login failed message\n\t\t\t\tJOptionPane.showMessageDialog(uiController_.getFrame(), \"Unrecognized Login Credentials\",\n\t\t\t\t\t\t\"Invalid Login\", JOptionPane.WARNING_MESSAGE);\n\t\t\t} else if (logged_in_result instanceof Manager) {\n\t\t\t\t// Get components\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\n\t\t\t\t// Create new ManagerPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"ManagerPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new ManagerPanel(uiController_).getPanel_(), \"ManagerPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to manager panel\n\t\t\t\tlayout.show(viewHolder, \"ManagerPanel\");\n\t\t\t} else if (logged_in_result instanceof Developer) {\n\t\t\t\t((DefaultComboBoxModel<String>) pageSelector.getModel()).addElement(\"Assignment\");\n\t\t\t\tpageSelector.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tif (pageSelector.getSelectedItem().equals(\"Assignment\")) {\n\t\t\t\t\t\t\t// Switch to Ordinary panel\n\t\t\t\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\t// Get components\n\t\t\t\tJPanel viewHolder = (JPanel) (uiController_.getFrame().getContentPane().getComponent(0));\n\t\t\t\tCardLayout layout = (CardLayout) viewHolder.getLayout();\n\t\t\t\tloginButton.setVisible(false);\n\t\t\t\t// Create new DeveloperPanel if it doesn't exist\n\t\t\t\tif (!uiController_.checkPanelExists(\"DeveloperPanel\", viewHolder)) {\n\t\t\t\t\tviewHolder.add(new DeveloperPanel(uiController_).getPanel_(), \"DeveloperPanel\");\n\t\t\t\t}\n\n\t\t\t\t// Change view to developer panel\n\t\t\t\tlayout.show(viewHolder, \"DeveloperPanel\");\n\t\t\t}\n\t\t}\n\t}",
"private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }",
"@Test\npublic void cytc_005() throws InterruptedException {\n\t Thread.sleep(3000);\n\t cyclosPOM.cyclosGenericLogin(\"srivalli2\",\"pass12345\");\n\t screenShot.captureScreenShot(\"CYTC00501\");\n\t Thread.sleep(3000);\n\t cyclosPOM.myProfileOption();\n\t screenShot.captureScreenShot(\"CYTC00502\");\n\t Thread.sleep(2000);\n\t cyclosPOM.changeProfileBtn();\n\t screenShot.captureScreenShot(\"CYTC00503\");\n\t Thread.sleep(1000);\n\t cyclosPOM.changeAddress(\"Raidurgam\");\n\t cyclosPOM.saveButton();\n\t screenShot.captureScreenShot(\"CYTC00504\");\n\t System.out.println(driver.switchTo().alert().getText());\n\t driver.switchTo().alert().accept();\n\t screenShot.captureScreenShot(\"CYTC00505\");\n\t String Actual = cyclosPOM.verifyAddress();\n\t String Expected = \"Raidurgam\";\n\t Assert.assertEquals(Actual, Expected);\n}",
"@Test\n public void loginNegative() throws Exception{\n loginPage.login(ConfigurationReader.getProperty(\"sales_manager_username\"), ConfigurationReader.getProperty(\"invalidPassword!\"));\n\n //Error message\n String err = \"Invalid user name or password.\";\n Assert.assertTrue(loginPage.errorMessage.isDisplayed() && err.equals(err));\n\n //Page title and url\n Assert.assertEquals(driver.getTitle(), ConfigurationReader.getProperty(\"url\").contains(\"login\"));\n }",
"@Test(priority = 0)\n\tpublic void facebookLogin_with_bothValid_credentials() throws InterruptedException {\n\t\t\n\t\tExtentTestManager.getTest().setDescription(\"This is Facebook login with valid username and valid password.\");\n\t\t\n\t\tdriver.get(Config.getServerURL());\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\t// Use PageFactory to init pagelements.\n\t\tFacebookLoginFactory facebookLogin= PageFactory.initElements(driver, FacebookLoginFactory.class);\n\n\t\tConfig.waitForElement(driver, facebookLogin.getLnk_LoginWithFcaebook());\n\t\tfacebookLogin.getLnk_LoginWithFcaebook().click();\n\t\tConfig.waitForTime();\n\n\t\t//This script will switch the command from main(parent) to child window\n\t\tSet<String> windowIds = driver.getWindowHandles();\n\t\tIterator<String> iter = windowIds.iterator();\n\t\tString mainWindow = iter.next();\n\t\tString childWindow = iter.next();\n\t\tdriver.switchTo().window(childWindow);\n\t\tdriver.manage().window().maximize();\n\t\n\t\tfacebookLogin.getTxt_FacebookUserName().sendKeys(\"[email protected]\");\n\t\tConfig.waitForElement(driver, facebookLogin.getTxt_FacebookPassword());\n\t\tfacebookLogin.getTxt_FacebookPassword().sendKeys(\"test123*\");\n\t\tConfig.waitForElement(driver, facebookLogin.getBtn_FacebookLogin());\n\t\tfacebookLogin.getBtn_FacebookLogin().click();\n\t\t\n\t\t// Return to parent window\n\t\tdriver.switchTo().window(mainWindow);\n\t\tConfig.waitForElement(driver, facebookLogin.getTxt_MsgOnlogin());\n\t\tString textmessage = facebookLogin.getTxt_MsgOnlogin().getText();\n\t\tAssert.assertEquals(textmessage, \"You are not eligible for registration\");\n\t\t\n\t}",
"@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}",
"@Test\n\tpublic void Test_Access1() throws Exception {\n\t\t\n\t\tfinal HtmlForm form = (HtmlForm) page.getElementById(\"signInForm1\");\n\t\t\n\t\tform.getInputByName(\"username\").setValueAttribute(\"jb\");\t// Correct Login Data\n\t\tform.getInputByName(\"password\").setValueAttribute(\"jb\");\n\t\t\n\t\tpage = form.getInputByName(\"submit\").click();\n\t\t\n\t\tassertNotSame(\"Fab Lab - Anmelden\", page.getTitleText());\t// Not the login page anymore\n\t\tassertEquals(\"Fab Lab - BasePage\", page.getTitleText());\n\t}",
"@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}",
"@Given(\"^user is on the login page$\")\n public void userIsOnTheLoginPage() throws Throwable {\n }",
"public void testLogin() throws Exception {\n super.login();\n }",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"@BeforeTest\n\tpublic void openBrowser(){\n\t\t//initializing the firefox driver\n\t\tdriver =new FirefoxDriver();\n\t\t// accessing the webpage\n\t\tdriver.get(\"https://platform-stag.systran.net\");\n\t\t//setting the windows size in 1920*1080\n\t\tdriver.manage().window().setSize(new Dimension(1920,1080));\n\n\t\t// the imperative wait \n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t//accessing the from page of the webpage and clicking in the sign in button\n\t\tLocatorsInFrontPage locatorinfront=PageFactory.initElements(driver, LocatorsInFrontPage.class);\n\t\tlocatorinfront.signIn.click();\n\t\t// accessing the pop up sign in and choosing the log in with systran\t\n\t\tLocatorsInSigninPopUp signinpopup=PageFactory.initElements(driver, LocatorsInSigninPopUp.class);\n\t\tsigninpopup.continueWithSystran.click();\n\n\t\t// locating the username and password filling form\n\t\tLocatorsInSignInaccount locatorinSignIn=PageFactory.initElements(driver, LocatorsInSignInaccount.class);\n\t\tlocatorinSignIn.userName.sendKeys(\"[email protected]\");\n\t\tlocatorinSignIn.password.sendKeys(\"SESpassword\");\n\t\tlocatorinSignIn.signIn.click();\n\n\n\t}",
"public void clickloginbutton(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Login Button should be clicked\");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnLogin\"));\r\n\t\t\tsleep(2000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Login Button is clicked\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login button is not clicked with WebElement \"+elementProperties.getProperty(\"btnLogin\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnLogin\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Test\n\t\n\t\tpublic void Login_invalid() \n\t\t\n\t\t{\n\n\t\t\tString un = \"vivek\";\n\t\t\tString pw = \"vivek kumar\";\n\n\t\t\tlogger.info(\"********** Verify that use can able to login with correct username & incorrect password***********\");\n\t\t\t\n\t\t\tWebElement uname = d.findElement(By.id(\"kitchen_user_user_name\"));\n\t\t\tWebElement pwd = d.findElement(By.id(\"kitchen_user_password_digest\"));\n\t\t\t// WebElement Rme = d.findElement(By.name(\"remember\"));\n\t\t\tWebElement submit = d.findElement(By.name(\"commit\"));\n\n\t\t\t\n\t\t\tif (uname.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the User Name field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the User Name field is present \");\n\n\t\t\t}\n\t\t\t\n\n\t\t\tif (uname.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the username fields get autofocus\");\n\n\t\t\t\tuname.sendKeys(\"vivek\");\n\t\t\t\t\n\t\t\t\tuname.sendKeys(Keys.TAB);\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the username fields get autofocus\");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n \n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\tSystem.out.println(\"TESTNGINGIN\");\n\t\t\t\n\n\t\t\tif (pwd.isDisplayed()) {\n\n\t\t\t\tlogger.info(\"Verify that if the Password field is present \");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the Password field is present \");\n\n\t\t\t}\n\n\t\t\tif (pwd.equals(d.switchTo().activeElement())) {\n\n\t\t\t\tlogger.info(\"Verify that if the password fields get focused\");\n\n\t\t\t\tpwd.sendKeys(\"vivek kumar\");\n\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that if the password fields get focused\");\n\t\t\t}\n\n\t\t\t\n\t\t\tif (submit.isEnabled()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsubmit.click();\n\t\t\t\t\n\n\t\t\t\tString url = \"http://192.168.1.73:4000\";\n\t\t\t\t\n\t\t\t\tString curl = d.getCurrentUrl();\n\t\t\t\t\n\t\t\t\tif (d.getCurrentUrl().equals(url)) {\n\t\t\t\t\t\n\t\t\t\t\tlogger.error(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\n\n\t\t\t\t\tlogger.info(\"Verify that if the user can't able to login with correct un & incorrect password\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\tlogger.error(\"Verify that user can't able to click the submit\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t}",
"@Test\r\n\tpublic void testLogin8() {\r\n\t\tassertTrue(t1.login(\"user\", \"pass\"));\r\n\t}",
"@Test\n public void positiveLoginTest(){\n Driver.getDriver().get(ConfigReader.getProperty(\"CHQAUrl\"));\n\n QAConcortPage qaConcortPage=new QAConcortPage();\n //login butonuna bas\n qaConcortPage.ilkLoginLinki.click();\n //test data username: manager ,\n qaConcortPage.usernameKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidUsername\"));\n //test data password : Manager1!\n qaConcortPage.passwordKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidPassword\"));\n qaConcortPage.loginButonu.click();\n //Degerleri girildiginde sayfaya basarili sekilde girilebildigini test et\n Assert.assertTrue(qaConcortPage.basariliGirisYaziElementi.isDisplayed());\n Driver.closeDriver();\n }",
"public void testLogin() {\n login(datum.junit);\n\t}",
"@Test(priority = 2)\n\tpublic void case3_Logout(){\t\n\t\tdriver.get(tryUrl);\n\t\tString actualmsgTryLogin = gettext(flashmsg);\n\t\tassertEquals(actualmsgTryLogin, expected_msgTrylogin);\n\t}",
"@Test\n\tpublic void testingLoginEmail() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validEmail\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}",
"@Test\n\tpublic void _02_loginWithValidCredentials() throws InterruptedException {\n\t\t\n\t\tlp = new LoginPage();\n\t\tThread.sleep(1000);\n\t\tlp.userName.clear();\n\t\tsendText(lp.userName, ConfigsReader.getProperty(\"username\"));\n\t\tlp.loginBtn.click();\n\t\tlp.password.clear();\n\t\tsendText(lp.password, ConfigsReader.getProperty(\"password\"));\n\t\tlp.loginBtn.click();\n\n\t\tThread.sleep(3000);//for demo purposes only\n\t\tpp = new ProfilePage();\n\t\tAssertJUnit.assertEquals(ConfigsReader.getProperty(\"username\"), pp.userName.getText());\n\t}",
"@Flaky\n @Test\n public void checkServicePage() {\n assertEquals(getWebDriver().getTitle(), MAIN_DRIVER_TITLE);\n\n //2. Perform login\n servicePage.login(cfg.login(), cfg.password());\n\n //3. Assert User name in the left-top side of screen that user is loggined\n servicePage.checkUserNameTitle();\n\n\n }",
"@Test\n\t@Order(5)\n\tpublic void credentialsTest() {\n\t\tString url = \"http://twitter.com/\";\n\t\tString username = \"meepz\";\n\t\tString password = \"spooki520boi\";\n\t\t// credentials to be updated\n\t\tString newUrl = \"clubpenguin.com\";\n\t\tString newUsername = \"fightrOfDaNightMan\";\n\t\tString newPassword = \"milkSteak\";\n\t\t// signup\n\t\tdriver.get(baseUrl + \"/signup\");\n\t\tSignupPage signupPage = new SignupPage(driver);\n\t\tsignupPage.signup(firstName, lastName, username, password);\n\t\t// get login page, init login page, login\n\t driver.get(baseUrl + \"/login\");\n\t\tLoginPage loginPage = new LoginPage(driver);\n\t\tloginPage.login(username, password);\n\n\t\tdriver.get(baseUrl + \"/home\");\n // init home page, insert new credentials\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.addCredential(false, url, username, password);\n\t\t// init result page and click link back to home page\n\t\t// driver is automatically taken to result page after adding\n\t\t// credentials, etc. so no need to use driver.get(result)\n\t\t// just feed driver into the result page\n\t\tResultPage resultPage = new ResultPage(driver);\n\t\tresultPage.clickHomeAnchor();\n\n\t\t// After returning to home page, click credential tab\n\t\t// and grab text from first credential\n\t\tCredential firstCredential = homePage.getFirstCredential();\n\n\t\t// check that hidden td's password is encrypted\n Assertions.assertNotEquals(password, homePage.getPasswordEnc());\n // check that url and username both match what was entered\n Assertions.assertEquals(url, firstCredential.getUrl());\n\t\tAssertions.assertEquals(username, firstCredential.getUsername());\n\n\t\t// check that entered password and retrieved (what should be dots) don't match\n\t\tAssertions.assertNotEquals(password, firstCredential.getPassword());\n\n\t\t// after clicking show button retrieve credentials again\n\t\thomePage.clickShowPassword();\n\t\tCredential credPasswordRevealed = homePage.getFirstCredential();\n\t\t// password that is now showing on page should match entered\n\t\tAssertions.assertNotEquals(password, firstCredential.getPassword());\n\n\t\t// clicking show password again will hide it\n\t\t// check that it is hidden\n\t\thomePage.clickShowPassword();\n\t\tCredential hiddenCredential = homePage.getFirstCredential();\n\t\tAssertions.assertNotEquals(password, hiddenCredential.getPassword());\n\n\t\thomePage.addCredential(true, newUrl, newUsername, newPassword);\n\t\tresultPage.clickHomeAnchor();\n\n\t\tCredential updatedCredential = homePage.getFirstCredential();\n\t\t// check to see that hidden password's text does not match entered password\n\t\tAssertions.assertNotEquals(password, homePage.getPasswordEnc());\n\t\tAssertions.assertNotEquals(updatedCredential.getPassword(), homePage.getPasswordEnc());\n\t\tAssertions.assertEquals(newUrl, updatedCredential.getUrl());\n\t\tAssertions.assertEquals(newUsername, updatedCredential.getUsername());\n\t\tAssertions.assertNotEquals(newPassword, updatedCredential.getPassword());\n\t\tAssertions.assertEquals(newPassword, homePage.getPasswordDecrypted());\n\n\t\thomePage.deleteCredential();\n\t\tresultPage.clickHomeAnchor();\n\n Assertions.assertThrows(NoSuchElementException.class, () -> homePage.getFirstCredential());\n\t}",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"@Test\n public void kullanici_login_test(){\n extentTest=extentReports.createTest(\"TC_1001_Kullanici login edebilme\",\"Kullanici login yapip profiline gelebilmeli\");\n US_010_page us_010_page=new US_010_page();\n Driver.getDriver().get(ConfigReader.getProperty(\"us010_chotel_url\"));\n Assert.assertTrue(Driver.getDriver().getTitle().contains(ConfigReader.getProperty(\"us010_chotel_Title_Home_yazisi\")));\n extentTest.pass(\"title home yazisi iceriyor, Test PASSED\");\n us_010_page.homeLogin.click();\n Assert.assertTrue(Driver.getDriver().getTitle().contains(ConfigReader.getProperty(\"us010_chotel_Title_Login_yazisi\")));\n extentTest.pass(\"title login yazisi iceriyor, Test PASSED\");\n us_010_page.usernameTextBox.sendKeys(ConfigReader.getProperty(\"us010_chotel_username\"));\n Assert.assertTrue(us_010_page.usernameTextBox.isEnabled());\n extentTest.pass(\"username box aktif yazi yazilabilir, Test PASSED\");\n us_010_page.passwordTextBox.sendKeys(ConfigReader.getProperty(\"us010_chotel_password\"));\n Assert.assertTrue(us_010_page.passwordTextBox.isEnabled());\n extentTest.pass(\"password box aktif yazi yazilabilir, Test PASSED\");\n Assert.assertTrue(us_010_page.loginButonu.isEnabled());\n extentTest.pass(\"login butonu aktif, Test PASSED\");\n us_010_page.loginButonu.click();\n Assert.assertTrue(us_010_page.profileYazisi.isDisplayed());\n extentTest.pass(\"profile yazisi gorunuyor, Test PASSED\");\n\n\n\n\n }",
"private void logOutIfAlreadyLogInTest() {\n try {\n onView(withId(R.id.menuButtonImage)).perform(click());\n onView(withText(R.string.logout)).perform(click());\n onView(withId(R.id.google_sign_in_button)).check(matches(isDisplayed()));\n }\n catch (NoMatchingViewException e) {\n // was already logged out\n }\n }",
"public static void testcase1() {\n \r\n \tMainclass method = new Mainclass();\r\n\t\tLocators Loc = new Locators();\r\n\t\tmethod.launchwebapp(\"https://google.com\");\r\n\t\tmethod.sendkeys(Loc.test, \"Java Test\");\r\n\t\tmethod.Gettext(Loc.signin);\r\n\t\tmethod.click(Loc.signin);\r\n\t\t//method.sendkeys(Loc.username, \"[email protected]\");\r\n\t\t//method.click(Loc.Submit);\r\n\t\t//method.sendkeys(Loc.Password, \"Password@123\");\r\n\t\t//method.click(Loc.Submit);\r\n\t\t//method.click(Loc.Loctest);\r\n\t\t//method.sendkeys(Loc.test, \"Test\");\r\n\t\t//String Actual = method.Gettext(Loc.signin);\r\n\t\t//String expected = \"sign in\";\r\n\t\t\r\n\t\t\r\n\t}",
"@Test\n public void testLogout() {\n assertEquals(SAMPLE_ID, navigationBean.getSessionUser().getUserID());\n assertEquals(\"/facelets/open/index.xhtml?faces-redirect=true\", navigationBean.logout());\n assertEquals(0, navigationBean.getSessionUser().getUserID());\n }"
]
| [
"0.72230375",
"0.7112271",
"0.70620877",
"0.69724125",
"0.69419396",
"0.6893561",
"0.6851822",
"0.6851336",
"0.6833712",
"0.6819844",
"0.67564505",
"0.6748831",
"0.6744797",
"0.67282724",
"0.6686349",
"0.6679138",
"0.6674383",
"0.6665335",
"0.66569155",
"0.6626363",
"0.66217625",
"0.6611436",
"0.6582836",
"0.6555714",
"0.654811",
"0.65448844",
"0.653249",
"0.65318644",
"0.65276366",
"0.65222096",
"0.6515971",
"0.65046996",
"0.64966506",
"0.6494304",
"0.6486249",
"0.64823025",
"0.6476445",
"0.64674145",
"0.64442253",
"0.64309174",
"0.64299446",
"0.6426981",
"0.64070493",
"0.63972825",
"0.63793164",
"0.6378248",
"0.63723826",
"0.6367922",
"0.63678104",
"0.6364124",
"0.63635427",
"0.6362003",
"0.6359217",
"0.63523966",
"0.63523644",
"0.6351873",
"0.63507974",
"0.6348429",
"0.6346085",
"0.6339976",
"0.63381636",
"0.6336918",
"0.63267475",
"0.632659",
"0.6324329",
"0.6320414",
"0.6320066",
"0.63160604",
"0.6310797",
"0.63057184",
"0.63004667",
"0.62994295",
"0.62974715",
"0.6286417",
"0.6280035",
"0.62767124",
"0.6276158",
"0.62665516",
"0.6266439",
"0.62653464",
"0.6261428",
"0.6251559",
"0.624974",
"0.62476087",
"0.62342614",
"0.6227656",
"0.6226901",
"0.62255776",
"0.6225427",
"0.62250173",
"0.62197995",
"0.6206698",
"0.61959106",
"0.6187315",
"0.6186609",
"0.61846167",
"0.6184377",
"0.6182768",
"0.61783665",
"0.6178092",
"0.61780083"
]
| 0.0 | -1 |
Testing a login with positive credentials. | @Test(priority = 2)
public void testLoginPage() {
driver.navigate().to(Login.URL);
driver.manage().window().maximize();
Login.typeEmail(driver, "[email protected]");
Login.typePassword(driver, "lozinka");
WebDriverWait wait = new WebDriverWait(driver, 10);
Login.clickLoginButton(driver);
String currentUrl = driver.getCurrentUrl();
String expectedUrl = "https://www.humanity.com/app/";
SoftAssert sa = new SoftAssert();
sa.assertEquals(currentUrl, expectedUrl);
sa.assertAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}",
"@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}",
"@Test\r\n\tpublic void testLogin1() {\r\n\t\tassertFalse(t1.login(\"\", \"pass\"));\t\r\n\t}",
"@Test\n\tpublic void testLoginUser(){\n\t\t\n\t\tboolean passed = true;\n\t\t\n\t\ttry {\n\t\t\tps.loginUser(new UserLoginInput(\"Sam\", \"sam\"));\n\t\t} catch (ServerException e) {\n\t\t\te.printStackTrace();\n\t\t\tpassed = false;\n\t\t}\n\t\t\n\t\tassertTrue(passed);\n\t}",
"@Test\r\n\tpublic void testLogin5() {\r\n\t\tassertFalse(t1.login(\"userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\", \"passssssssssssssssssssssssssssssssssssssssss\"));\r\n\t}",
"@Test\r\n\tpublic void testLogin8() {\r\n\t\tassertTrue(t1.login(\"user\", \"pass\"));\r\n\t}",
"@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }",
"public void testLogin() throws Exception {\n super.login();\n }",
"public void testLogin() {\n login(datum.junit);\n\t}",
"@Test\n public void loginNegative() throws Exception{\n loginPage.login(ConfigurationReader.getProperty(\"sales_manager_username\"), ConfigurationReader.getProperty(\"invalidPassword!\"));\n\n //Error message\n String err = \"Invalid user name or password.\";\n Assert.assertTrue(loginPage.errorMessage.isDisplayed() && err.equals(err));\n\n //Page title and url\n Assert.assertEquals(driver.getTitle(), ConfigurationReader.getProperty(\"url\").contains(\"login\"));\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"@Test\n public void positiveTest() {\n\n loginPage.setUsername(\"admin\");\n loginPage.setPassword(\"123\");\n loginPage.clickOnLogin();\n Assert.assertEquals(driver.getTitle(), \"Players\", \"Wrong title after login\");\n Assert.assertNotEquals(driver.getCurrentUrl(), LoginPage.URL_login, \"You are still on login page.\");\n }",
"@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }",
"@Order(1)\n\t@Test\n\tpublic void Attempt_LoginSuccess() throws AuthException\n\t{\n\t\t//Test to make certain we login correctly.\n\t\tString user = \"null\", pass = \"andVoid\";\n\t\tboolean expected = true, actual = as.authenticateUser(user, pass);\n\t\tassertEquals(expected,actual,\"This is the correct login credentials for the System Admin\");\n\t}",
"@Test\n public void testLogin1() {\n System.out.println(\"login method tests empty string user input\");\n String accNo = \"\";\n String pinNo = \"\";\n assertEquals(\"Invalid entries should return false\",false, Account.login(accNo, pinNo));\n }",
"@Test\n public void bTestLogin(){\n given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .then()\n .statusCode(200);\n }",
"@Test\n public void wrongUsernamePassword() {\n assertEquals(false, testBase.signIn(\"user2\", \"testPassword\"));\n }",
"@Test\n public void wrongPassword() {\n assertEquals(false, testBase.signIn(\"testName\", \"false\"));\n }",
"@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}",
"@Test\n\tpublic void _01_loginWithInvalidCredentials() throws InterruptedException {\n\t\tlp = new LoginPage();\n\t\tThread.sleep(1000);\n\t\tsendText(lp.userName, \"effulgent\");\n\t\tlp.loginBtn.click();;\n\t\tsendText(lp.password, ConfigsReader.getProperty(\"password\"));\n\t\tlp.loginBtn.click();;\n\n\t\tThread.sleep(1000);//for demo purposes only\n\n\t\tAssertJUnit.assertTrue(lp.message.isDisplayed());\n\t\tString errorText = lp.message.getText().trim();\n\t\tAssertJUnit.assertEquals(\"Oops, that's not the right password. Please try again!\", errorText);\n\n\t}",
"@Test\n public void testLoginPassCheck(){\n loginIn(\"admin\", \"password\", R.string.login_success_message);\n }",
"@Test\n\tpublic void _02_loginWithValidCredentials() throws InterruptedException {\n\t\t\n\t\tlp = new LoginPage();\n\t\tThread.sleep(1000);\n\t\tlp.userName.clear();\n\t\tsendText(lp.userName, ConfigsReader.getProperty(\"username\"));\n\t\tlp.loginBtn.click();\n\t\tlp.password.clear();\n\t\tsendText(lp.password, ConfigsReader.getProperty(\"password\"));\n\t\tlp.loginBtn.click();\n\n\t\tThread.sleep(3000);//for demo purposes only\n\t\tpp = new ProfilePage();\n\t\tAssertJUnit.assertEquals(ConfigsReader.getProperty(\"username\"), pp.userName.getText());\n\t}",
"@Test\n public void test5() {\n userFury.login(\"45ab\");\n assertFalse(userFury.getLoggedIn());\n }",
"@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn false;\n\t}",
"public static boolean login(Context ctx) {\n\t\t\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\t\n\t\tSystem.out.println(username);\n\t\tSystem.out.println(password);\n\t\t\n\t\tif(username.equals(\"user\") && password.equals(\"pass\")) {\n\t\t\tctx.res.setStatus(204);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"McBobby\",true));\n\t\t\treturn true;\n\t\t}else {\n\t\t\t\n\t\t\tctx.res.setStatus(400);\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n//\t\tctx.queryParam(password); /authenticate?password=value\n//\t\tctx.pathParam(password); /authenticate/{password}\n\t}",
"@Test\n\tpublic void testingLoginUsername() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validUsername\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}",
"@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}",
"@Test\n public void positiveLoginTest(){\n Driver.getDriver().get(ConfigReader.getProperty(\"CHQAUrl\"));\n\n QAConcortPage qaConcortPage=new QAConcortPage();\n //login butonuna bas\n qaConcortPage.ilkLoginLinki.click();\n //test data username: manager ,\n qaConcortPage.usernameKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidUsername\"));\n //test data password : Manager1!\n qaConcortPage.passwordKutusu.sendKeys(ConfigReader.getProperty(\"CHQAValidPassword\"));\n qaConcortPage.loginButonu.click();\n //Degerleri girildiginde sayfaya basarili sekilde girilebildigini test et\n Assert.assertTrue(qaConcortPage.basariliGirisYaziElementi.isDisplayed());\n Driver.closeDriver();\n }",
"@Test\n\tpublic void authenticateTest() {\n\t\t\n\t\tassertEquals(true, true);\n\n\t}",
"@Test\n\tpublic void testLoginAdminAccountWithInvalidCredentials() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Username or password incorrect. Please try again.\", error);\n\t}",
"@Test\n\tpublic void login_customer2() {\n\t\tAssert.assertEquals(-1,x.Login(\"abd\",\"123\"));\n\t\tAssert.assertEquals(-1,x.Login(\"abc\",\"1233\"));\n\t}",
"@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}",
"LoginContext login(String username, String password) throws LoginException;",
"protected Response login() {\n return login(\"\");\n }",
"@When(\"^To Validathe Retail Login with Valid Credentials$\")\r\n\tpublic void to_Validathe_Retail_Login_with_Valid_Credentials() throws InterruptedException {\n\t\tdriver.findElement(By.className(\"sign-in\")).click();\r\n\t\tdriver.findElement(By.name(\"log\")).sendKeys(\"admin\");\r\n\t\tdriver.findElement(By.name(\"pwd\")).sendKeys(\"admin@123\");\r\n\t\tdriver.findElement(By.name(\"login\")).click();\r\n\t\t Thread.sleep(3000);\r\n\t\t \r\n\t}",
"@Override\n\tpublic boolean login(Credentials cred) {\n\t\treturn true;\n\t}",
"@Test\n\t void testCredentialsNonExpired() {\n\t\tassertTrue(user.isCredentialsNonExpired());\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Test(priority = 4)\n public void emptyUsernameLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, \"\");\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyUsernameError);\n }",
"@Test\n public void noUser() {\n assertEquals(false, testBase.signIn(\"wrong\", \"false\"));\n }",
"@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn true;\n\t}",
"@Test\n public void test001() {\n String login = \"admin\";\n String password = \"admin\";\n\n openBasicAuthPage(login, password);\n assertThatAuthenticated();\n\n }",
"@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Test(priority = 1)\n\tpublic void checkInvalidLogin() {\n\t\ttest = report.createTest(\"CheckInvalidLogin\");\n\t\t\n\t\tloginpage = loginpage.setLanguage(ChangeLanguageFields.ENGLISH);\n\t\ttest.log(Status.INFO, \"Set language\");\n\t\t\n\t\tloginpage = loginpage.unSuccessfullLogin(UserContainer.getInvalidData());\n\t\ttest.log(Status.INFO, \"Filled in invalid credentials and clicked 'Sig in'\");\n\t\t\n\t\tAssert.assertTrue(loginpage.getErrorMessage().getText().contains(\"Wrong login or password\"));\n\t\ttest.log(Status.PASS, \"Verified error message is correct\");\n\t}",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"@Test\n\tpublic void testAuthenticateUserNullLogin() {\n\t\t\n\t\tThrowable thrown = catchThrowable(() -> { authService.authenticateUser(new UserBuilder(USER).login(null).build()); } );\n\t\tassertThat(thrown).isNotNull().isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"Missing login and/or password\");\n\t}",
"@Test(priority = 3)\n public void emptyPasswordLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, \"\");\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyPasswordError);\n\n }",
"@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }",
"@Test\n public void loginAsEmptyUser(){\n Assert.assertEquals(createUserChecking.creationChecking(\"\",\"\"),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email were typed\");\n }",
"@Test(dataProvider = \"validDataProvider\")\n public void positiveLoginTest(String userEmail, String userPass) {\n HomePage homePage = loginPage.login(userEmail, userPass);\n\n Assert.assertTrue(homePage.isPageLoaded(), \"Home page is not loaded\");\n }",
"public void test_LoginToSystem5(){\n\t\tLogin l = new Login();\n\t\tl.LoginToSystem(\"\" , \"test\");\n\t\tassertFalse(l.GetSuccessfulLogin());\n\t}",
"@Test\n\tpublic void testingLoginWithEnter() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validUsername\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.sendKeys(Keys.ENTER);\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"@Test\n public void correctSignIn() {\n assertEquals(true, testBase.signIn(\"testName\", \"testPassword\"));\n }",
"@Test(priority = 1)\n\tpublic void login() {\n\t\tlp.loginToApp();\n\t}",
"@Test\r\n public void testCLogin() {\r\n System.out.println(\"login\");\r\n \r\n String userName = \"admin\";\r\n String contraseña = \"admin\";\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario result = instance.login(userName, contraseña);\r\n \r\n assertNotNull(result);\r\n }",
"private void login(String username,String password){\n\n }",
"public String isValidAgentLogin(String userName, String password);",
"@Test\n\tpublic void testIsCredentialsNonExpired() {\n\t\tassertTrue(user.isCredentialsNonExpired());\n\t}",
"void login(String user, String password);",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"void login(String userName) throws IllegalArgumentException, IOException;",
"@Test\n public void good_login() throws UnirestException {\n login();\n }",
"@Override\n public boolean userLogin(String username, String password) \n {\n User tmpUser = null;\n tmpUser = getUser(username);\n if(tmpUser == null) return false;\n if(tmpUser.getPassword().equals(password)) return true;\n return false;\n }",
"@Test\n public void testLoginFailCheck(){\n loginIn(\"Wrong Username\", \"12345\", R.string.login_fail_message);\n }",
"@Test(priority = 0, groups = \"test\")\r\n\tpublic void TestLogin()\r\n\t{\r\n\t\t// Step-1] Login using adminX credentials.\r\n\t login.AdminXLogin();\r\n\t extent.log(LogStatus.INFO, \"LoggedIn successfully.\");\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.linkText(\"PRODUCT\")));\r\n\t // Step-2] Open Add scheme page.\r\n\t Ops.OpenAddScheme();\r\n\t \r\n\t}",
"@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn userProviderService.login(username, password);\n\t}",
"@Test\n public void testLogin() {\n System.out.println(\"doLogin\");\n String username = \"AECobley\";\n String password = \"Cassandra\";\n LoginModel instance = new LoginModel();\n String[] expResult = null;\n String[] result = instance.generalLogin(username, password);\n LoginModel loginModel = new LoginModel();\n assertNull(\"= fail\",loginModel.generalLogin(username,password));\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"Login Succeeded with wrong details\");\n }",
"public void test_LoginToSystem7(){\n\t\tLogin l = new Login();\n\t\tl.LoginToSystem(\"\", \"\");\n\t\tassertFalse(l.GetSuccessfulLogin());\n\t}",
"@When(\"^User login into the app with username and password$\")\n\tpublic void user_login_to_the_app_with_username_and_password() {\n\t\tSystem.out.println(\"User is logged\");\n\t}",
"@Test\r\n public void testLogin1() throws Exception {\r\n String employee_account = \"D00198309\";\r\n String password = \"admin\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n Employee result = instance.login(employee_account, password);\r\n assertTrue(result != null);\r\n }",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}",
"@Test\n\tpublic void testLoginAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD2);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tassertNotNull(user);\t\t\t\n\t\tassertEquals(USERNAME2, user.getUsername());\n\t\tassertEquals(PASSWORD2, user.getPassword());\n\t\tassertEquals(NAME2, user.getName());\n\t}",
"void loginAttempt(String email, String password);",
"public User login(String loginName, String password) throws UserBlockedException;",
"@Given(\"Login Functionality\")\n public void Login_Functionality() {\n String url = ConfigurationReader.get(\"url\");\n Driver.get().get(url);\n //login with valid credentials\n loginPage.login();\n }",
"@Test(priority = 2)\n public void incorrectLoginWithUsername() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, incorrectMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }",
"private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }",
"public boolean loginUser();",
"@Test\n public void ossSignInInvalidPassTest() {\n OSSHome ossHome = new OSSHome();\n OSSSignIn ossSignIn =\n ossHome.header.navigateToOSSSignIn().signInto(\"[email protected]\", \"nosuchpassword\");\n assertThat(ossSignIn.errorMessage, displayed());\n }",
"public boolean login( String username, String password ) {\n\t\n\t\tif( ( null != setUsername( username ) ) && ( null != setPassword( password ) ) )\n\t\t\tif( null != clickLogin( ) )\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"RequestResult loginRequest() throws Exception;",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testLoginMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\tusuario.setEmail(\"[email protected]\");\n\t\tusuario.setSenha(\"admin\");\n\t\t\n\t\tusuario = usuarioService.login(usuario);\n\t\tAssert.assertEquals(usuario.getEmail(), \"[email protected]\");\n\t\tAssert.assertEquals(usuario.getSenha(), \"$2a$10$2Ew.Cha8uI6sat5ywCnA0elRRahr91v4amVoNV5G9nQwMCpI3jhvO\");\n\t}",
"@Test\n public void testDoLogin() {\n System.out.println(\"doLogin\");\n String username = \"AECobley\";\n String password = \"Cassandraisbae\";\n LoginModel instance = new LoginModel();\n String[] expResult = null;\n String[] result = instance.generalLogin(username, password);\n LoginModel loginModel = new LoginModel();\n \n assertNotNull(\"= Pass\",loginModel.generalLogin(username,password));\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"Login Failed\");\n }",
"boolean isLogin(String username, String password)\n {\n String endURL = \"login/\" + username + \"/\" + password;\n return (request(\"GET\", \"\", endURL).equals(\"SUCCESSFUL\"));\n }",
"@Test\n\tpublic void adminLogin2()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"4321\", ClientType.ADMIN);\n\t\tAssert.assertNull(af);\n\t}",
"public void testLoginPUK() {\r\n try {\r\n tokenHandler.loginPUK(pukCode);\r\n tokenHandler.logoutPUK();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"@Test\t\t\n\tpublic void Login()\t\t\t\t\n\t{\t\t\n\t driver.get(\"https://demo.actitime.com/login.do\");\t\t\t\t\t\n\t driver.findElement(By.id(\"username\")).sendKeys(\"admin\");\t\t\t\t\t\t\t\n\t driver.findElement(By.name(\"pwd\")).sendKeys(\"manager\");\t\t\t\t\t\t\t\n\t driver.findElement(By.xpath(\"//div[.='Login ']\")).click();\t\t\n\t driver.close();\n\t}",
"@Test\n\tpublic void testingLoginEmail() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validEmail\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}",
"@Then(\"^the user Login using username and password$\")\r\n\tpublic void the_user_Login_using_username_and_password() throws Throwable {\n\t w.details1();\r\n\t}",
"@Test\n public void shouldLogin() {\n }",
"public abstract boolean checkCredentials (String username, String password);",
"public void test_LoginToSystem6(){\n\t\tLogin l = new Login();\n\t\tl.LoginToSystem(\"tbonci\" , \"\");\n\t\tassertFalse(l.GetSuccessfulLogin());\n\t}",
"void login(String email, String password) throws InvalidCredentialsException, IOException;",
"@Test\n\tpublic void login_customer1() {\n\t\tAssert.assertEquals(1,x.Login(\"abc\",\"123\"));\n\t}",
"@Test(description = \"Login con credenciales correctas\", enabled = false)\n\tpublic void login() {\n\t\tPageLogin pageLogin = new PageLogin(driver);\n\t\tPageReservation pageReservation = new PageReservation(driver);\n\t\tpageLogin.login(\"mercury\", \"imercury\");\n\t\tpageReservation.assertPage();\n\t\t//****Este código se cambió por A****\n\t\t/*driver.findElement(By.name(\"userName\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"login\")).click();*/\n\t\t//******todo este código que se repite se cambió por B****\n\t\t/*try {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//****código B****\n\t\t/*Helpers helper = new Helpers();\n\t\thelper.sleepSeconds(4);*/\n\t\t//este codigo pasa a la Page Object(page reservation)\n\t\t//Assert.assertTrue(driver.findElement(By.xpath(\"/html/body/div/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[3]/td/font\")).getText().contains(\"Flight Finder to search\"));\n\t}",
"@Test\n public void testWebAuthnIDLessLogin() throws IOException {\n\n configureUser(username, false, true, true);\n initializeAuthenticator(true, true, true, true);\n setWebAuthnRealmSettings(false, false, true, true);\n\n // Trigger webauthn-passwordless setup (resident key)\n setUpUsernamePasswordFlow(\"username-password-flow\");\n String credentialId = usernamePasswordAuthWithAuthSetup(username, true, true);\n\n setUpIDLessOnlyFlow(\"idless-only-flow\");\n idlessAuthentication(username, credentialId, false, true);\n\n }",
"@org.junit.Test\r\n\tpublic void login() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"LoginServlet?action=login\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info\", \"jitl\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info2\", \"admin\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"info3\", \"admin\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t\tSystem.out.println(string);\r\n\t}"
]
| [
"0.803783",
"0.7791486",
"0.76771605",
"0.7648931",
"0.7483539",
"0.7476496",
"0.738243",
"0.73785424",
"0.7357879",
"0.7295239",
"0.72346556",
"0.72188205",
"0.7191751",
"0.7162095",
"0.7100003",
"0.7098514",
"0.70884323",
"0.70720357",
"0.70577335",
"0.704688",
"0.70263195",
"0.69930595",
"0.698103",
"0.69607764",
"0.69472736",
"0.6946613",
"0.69350326",
"0.691383",
"0.6904337",
"0.69024295",
"0.6896415",
"0.6889837",
"0.6883922",
"0.6872824",
"0.6857823",
"0.68568826",
"0.6843259",
"0.6842349",
"0.6842349",
"0.68371606",
"0.6836792",
"0.68337333",
"0.6825076",
"0.68081594",
"0.6806057",
"0.6804727",
"0.68006647",
"0.6796785",
"0.6792914",
"0.67824495",
"0.67785096",
"0.67770344",
"0.67648673",
"0.6755323",
"0.6741415",
"0.6735437",
"0.67251265",
"0.6720215",
"0.67173386",
"0.66871786",
"0.6676346",
"0.6668129",
"0.66658866",
"0.6654832",
"0.66504663",
"0.66453266",
"0.66436946",
"0.66387975",
"0.6637748",
"0.66375643",
"0.6628821",
"0.66260654",
"0.6617937",
"0.6609004",
"0.66066355",
"0.6605163",
"0.660362",
"0.6591782",
"0.6590266",
"0.6583899",
"0.6583305",
"0.6579524",
"0.6579195",
"0.65565",
"0.6544373",
"0.6544019",
"0.6543362",
"0.65374506",
"0.65371066",
"0.65356314",
"0.65341353",
"0.65338933",
"0.65330136",
"0.65300775",
"0.652697",
"0.6518754",
"0.65052605",
"0.65032464",
"0.64957213",
"0.6495717"
]
| 0.65568876 | 83 |
get the source object that called the AL | public void actionPerformed(ActionEvent ae){
Object source = ae.getSource();
if(source instanceof JButton){
// cast source back to a button
button = (JButton)source;
// get location/name of button (it's a string)
String s = ae.getActionCommand();
//*************************************************
//****************** FETCH ********************
//*************************************************
if(s.equalsIgnoreCase("fetch")){
Records recordList;
try {
recordList = (Records)recordTypeBox.getSelectedItem();
recordList.setUser((User)userBox.getSelectedItem());
recordList.update(signedin);
ArrayList<Record> recordArrayList = (ArrayList<Record>) recordList.getRecords();// this might cause bugs later...
// if no records - put a no records message in the table
if (recordArrayList.size() == 0) {
FacultyTableModel newModel;
String[] noRecordsHeader = {""};
//String[][] noRecordsMessage;
String userString = userBox.getSelectedItem().toString();
String[][] noRecordsMessage = {{"There are no " + recordTypeBox.getSelectedItem().toString()
+ " records for " + userBox.getSelectedItem().toString() + "."}};
newModel = new FacultyTableModel(noRecordsMessage, noRecordsHeader);
databasedata.setModel(newModel);
}
// if there are records
else {
// populate column headers
String[] attrNames = recordArrayList.get(recordArrayList.size() - 1).getAttrNames();
String[] columnNames;
if (recordTypeBox.getSelectedItem() instanceof Users) {
columnNames = new String[(attrNames.length)];// populate column headers for users - no UserID
columnNames[0] = "Record Object";
for (int i=1; i<attrNames.length; i++) {
columnNames[i] = attrNames[i];
}
}
else {
columnNames = new String[(attrNames.length - 1)];// popularte column headers for non-users - no UserID or recordID
columnNames[0] = "Record Object";
for (int i=2; i<attrNames.length; i++) {
columnNames[i - 1] = attrNames[i];
}
}
// populate table content
Object[][] dataArray = new Object[recordArrayList.size()][columnNames.length];
for (int i=0; i<recordArrayList.size(); i++) {// for each record
dataArray[i][0] = recordArrayList.get(i);
ArrayList<String> valueList = recordArrayList.get(i).getValues();
int offset = 1;
if (recordTypeBox.getSelectedItem() instanceof Users) { offset = 0; }
for (int j=1; j<(valueList.size() - offset); j++) {
// for Scholarships, check if it's a pub, and change the positions of the array itmes if it is
if (recordTypeBox.getSelectedItem() instanceof Scholarships && j == 4 && valueList.size() == 6) {
dataArray[i][j] = "";// amount is blank
dataArray[i][j+1] = valueList.get(j + offset);// put status in index 6 instead of index 5, to match grants
j = valueList.size() + 500;
}
else {
dataArray[i][j] = valueList.get(j + offset);
}
}
}
// make JTableModel
FacultyTableModel newModel = new FacultyTableModel(dataArray, (Object[])columnNames);
// put the model in the table
databasedata.setModel(newModel);
// hide object column
TableColumn objectColumn = databasedata.getColumnModel().getColumn(0);
objectColumn.setMinWidth(0);
objectColumn.setMaxWidth(0);
objectColumn.setPreferredWidth(0);
// setup column widths
TableColumn yearColumn = databasedata.getColumnModel().getColumn(1);
yearColumn.setPreferredWidth(1);
}
}
catch (Exception x){}
// update the jtable from the result set (check b_layer methods and array-casting options)
// after you update the table, use 'databasedata.doLayout()' so it'll fit in the table right
databasedata.doLayout();
// then tell maingui to pack() again so it'll resize the window
}
//*************************************************
//******************* NEW *********************
//*************************************************
else if(s.equalsIgnoreCase("new")){ // if you're making a new entry...
String recordtype = recordTypeBox.getSelectedItem().toString();
if(recordtype.equalsIgnoreCase("teaching")){ // and you're looking at courses
new DetailPage(DetailPage.COURSE, signedin);
}
else if(recordtype.equalsIgnoreCase("scholarship")){
// show an option pane asking whether grants, pubs, or back
String[] paneOptions={"Grant", "Publication", "Back"};
int choice = JOptionPane.showOptionDialog(null, "Do you want to create a new Grant or a new Publication?", "New Option", JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE, null, paneOptions, null);
// this returns a value depending on what is chosen.
if(choice == JOptionPane.YES_OPTION){ // grants
new DetailPage(DetailPage.GRANT, signedin);
}
else if(choice == JOptionPane.NO_OPTION){ // pubs
new DetailPage(DetailPage.PUB, signedin);
}
}
else if(recordtype.equalsIgnoreCase("service")){ // looking at services
new DetailPage(DetailPage.SERVICE, signedin);
}
else if(recordtype.equalsIgnoreCase("kudos")){ // looking at kudos
new DetailPage(DetailPage.KUDO, signedin);
}
else if(recordtype.equalsIgnoreCase("users")){ // looking at users
new DetailPage(DetailPage.USER, signedin);
}
}
//************************************************
//****************** EDIT ********************
//************************************************
else if(s.equalsIgnoreCase("edit")){ // if you're editing
// get the currently selected record
int row = databasedata.getSelectedRow();
try {
Record currentRecord = (Record)databasedata.getValueAt(row, 0);
//open detail view, editing allowed
new DetailPage(currentRecord, (true), signedin);
}
catch (ArrayIndexOutOfBoundsException e) {
JOptionPane.showMessageDialog(null, "Please select a record to view.", "", JOptionPane.WARNING_MESSAGE);
}
}
//************************************************
//****************** VIEW ********************
//************************************************
else if(s.equalsIgnoreCase("view")){ // if viewing records without making changes
// get the currently selected record
int row = databasedata.getSelectedRow();
try {
Record currentRecord = (Record)databasedata.getValueAt(row, 0);
//open detail view, no editing
new DetailPage(currentRecord, (false), signedin);
}
catch (ArrayIndexOutOfBoundsException e) {
JOptionPane.showMessageDialog(null, "Please select a record to view.", "", JOptionPane.WARNING_MESSAGE);
}
}
}
else if(source == exit){
System.exit(0);
}
else if(source == about){
// an option pane giving details about the program
JOptionPane.showMessageDialog(null, "Coded by David, Jessica Dopkant & Pawel \nFor Database Client Server Implementation", "About the Program", JOptionPane.INFORMATION_MESSAGE, null);
}
else if(source == howTo){
// an option pane explaining how to do specific things in the program
String help = "How to view a specific user's records:\nSelect the type of records you wish to view in the first drop-down box and\nthe particular user's records you wish to see in the second (if you are a \nfaculty, you will only see your own records), then press the 'View Records' button.\nIf there are no records of that type to view for that user, \nthen you will see a message saying so.\nYou may select a record and click the 'View Details' button in the bottom right\nto view more details about a specific record.\n\nHow to create a new record (Administration and Department Chair only):\nFirst view records of the specific type of record you wish to create, then click\nthe new button in the bottom right.\nSelect the user you wish to create a new record for from the drop-down box,\nand fill in the info into the specific fields. \nNote: There is a character limit for some info fields.\n\nHow to edit an existing record (Administration and Department Chair only):\nFirst view the records of the specific type and user you wish to edit, then click\nthe specific record you wish to change to select it,\nthen click the 'edit' button in the bottom right.";
JOptionPane.showMessageDialog(null, help, "How to...", JOptionPane.PLAIN_MESSAGE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object getSource();",
"public Object getSource() {return source;}",
"@objid (\"4e37aa68-c0f7-4404-a2cb-e6088f1dda62\")\n Instance getSource();",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public Object getSource() {\n return source;\n }",
"public Object getSource() { return this.s; }",
"public Object getSource()\n {\n return this;\n }",
"public Object getSource()\n {\n return this;\n }",
"public Object getObject() {\n return getSource();\n }",
"public abstract T getSource();",
"Object getTarget();",
"Object getTarget();",
"protected Source getSource() {\r\n return source;\r\n }",
"public String getSource ();",
"public T getSource() {\n return source;\n }",
"public abstract Source getSource();",
"public T getObjSource() {\n return objSource;\n }",
"public SourceIF source() {\n\t\treturn this.source;\n\t}",
"public String getSource() {\n\t\treturn (String) _object.get(\"source\");\n\t}",
"State getSource();",
"Type getSource();",
"public InteractionSource getSource ();",
"public String getSource();",
"public Object getSourceReference() { return this._sourceRef; }",
"public IEventCollector getSource();",
"public String getSource() {\r\n return source;\r\n }",
"public Actor getSource()\r\n\t{\r\n\t\treturn sourceActor;\t\r\n\t}",
"public abstract String getSource();",
"public int getSource(){\r\n\t\treturn this.source;\r\n\t}",
"public String getSource() {\r\n return Source;\r\n }",
"java.lang.String getAssociatedSource();",
"public int getSource() {\n\t\treturn source;\n\t}",
"public String getSource() {\n return source;\n }",
"public String getSource() {\n return this.source;\n }",
"public String getSource() {\n return source;\n }",
"public String getSource() {\n return source;\n }",
"public String getSource() {\n return source;\n }",
"public Class<?> getSource() {\r\n \t\treturn source;\r\n \t}",
"public java.lang.Object getSourceID() {\n return sourceID;\n }",
"public long getSource()\r\n { return src; }",
"String getSource();",
"public String getSource() {\n return mSource;\n }",
"java.lang.String getSourceContext();",
"public EndpointID source() {\r\n\t\treturn source_;\r\n\t}",
"@Override\n\tpublic String getSource() {\n\t\treturn source;\n\t}",
"WfExecutionObject source () throws BaseException, SourceNotAvailable;",
"WfExecutionObject source (SharkTransaction t) throws BaseException, SourceNotAvailable;",
"public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }",
"public TCSObjectReference<Point> getSourcePoint() {\n if (hops.isEmpty()) {\n return null;\n }\n else {\n return hops.get(0);\n }\n }",
"public String getSource() {\n return JsoHelper.getAttribute(jsObj, \"source\");\n }",
"public Vertex getSource() {\n return source;\n }",
"DelegateCaseExecution getSourceExecution();",
"public Object getTarget()\n {\n return __m_Target;\n }",
"public String get_source() {\n\t\treturn source;\n\t}",
"@Override\n\tpublic EList<SourceRef> getSource() {\n\t\treturn adaptee.getSource();\n\t}",
"public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}",
"public String getSource() {\n\n return source;\n }",
"@Override\n \tpublic String getSource() {\n \t\tif (super.source != refSource) {\n \t\t\tif (refSource == null) {\n \t\t\t\trefSource = super.source;\n \t\t\t} else {\n \t\t\t\tsuper.source = refSource;\n \t\t\t}\n \t\t}\n \t\treturn refSource;\n \t}",
"Object getFrom();",
"public EObject getTarget() {\n\t\treturn adaptee.getTarget();\n\t}",
"java.lang.String getSource();",
"java.lang.String getSource();",
"final RenderedImage getSource() {\n return sources[0];\n }",
"String getSourceID();",
"public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}",
"public URI getSource() {\n return source;\n }",
"Variable getSourceVariable();",
"@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();",
"String getCaller();",
"public InjectionSource getSource() {\n return source;\n }",
"public NativeEntity getSourceEntity() \n\t{\n\treturn fSource;\n\t}",
"@Override\n public Vertex getSource() {\n return sourceVertex;\n }",
"public String toString()\n\t{return getClass().getName()+\"[source=\"+source+\",id=\"+id+']';}",
"Source getSrc();",
"@Override\n public String getName() {\n return source.getName();\n }",
"@OutVertex\n ActionTrigger getSource();",
"public java.lang.String getSource() {\r\n return localSource;\r\n }",
"public abstract State getSourceState ();",
"public State getsourcestate(){\n\t\treturn this.sourcestate;\n\t}",
"public String toString() {\n return getClass().getName() + \"[source=\" + source + \"]\";\n }",
"public Town getSource() {\r\n\t\treturn this.source;\r\n\t}",
"public Living getTarget();",
"State getTarget();",
"@Override\n public String getSource() {\n return this.src;\n }",
"public String getSouce() {\n\t\treturn source;\n\t}",
"@InVertex\n Object getTarget();",
"public String getSourceId() {\n return sourceId;\n }",
"public Object getTargetObject() {\n return targetObject;\n }",
"public String getSource(String cat);",
"public String getSourceIdentifier() {\n return sourceIdentifier;\n }",
"@Override\n\tpublic VType getSource() {\n\t\t// TODO: Add your code here\n\t\treturn super.from;\n\t}",
"public HarvestSource getSource() {\n\t\treturn source;\n\t}",
"public Entity.ID getSourceID() {\n return sourceID;\n }",
"public Widget getSource() {\n\t\treturn _source;\n\t}",
"public Byte getSource() {\r\n return source;\r\n }",
"public Node source() {\n\t\treturn _source;\n\t}",
"String getTarget();",
"String getTarget();",
"public Node getSource() {\n return this.source;\n }",
"long getSourceId();"
]
| [
"0.741235",
"0.7314419",
"0.70868796",
"0.70347124",
"0.70347124",
"0.7020149",
"0.68821985",
"0.67733777",
"0.67733777",
"0.67485297",
"0.6728561",
"0.6643741",
"0.6643741",
"0.66413796",
"0.6633937",
"0.6630607",
"0.6602009",
"0.65922517",
"0.6575249",
"0.6526363",
"0.65088826",
"0.64560384",
"0.64522874",
"0.64134926",
"0.6365821",
"0.636567",
"0.63632405",
"0.6354049",
"0.6332555",
"0.6316875",
"0.63080364",
"0.6288266",
"0.62760895",
"0.626266",
"0.6262395",
"0.62458456",
"0.62458456",
"0.62458456",
"0.62420905",
"0.6238129",
"0.6229621",
"0.6178368",
"0.617235",
"0.614789",
"0.6147303",
"0.6138717",
"0.6131774",
"0.61183906",
"0.6105738",
"0.61001396",
"0.6095213",
"0.6070611",
"0.6065267",
"0.60642254",
"0.6057091",
"0.60511726",
"0.60368454",
"0.6022755",
"0.60022235",
"0.5994337",
"0.5969899",
"0.59689087",
"0.59689087",
"0.5961015",
"0.5930968",
"0.5920391",
"0.5914171",
"0.5911889",
"0.5905451",
"0.58943486",
"0.5858003",
"0.58318037",
"0.5831007",
"0.58296853",
"0.58084446",
"0.5806789",
"0.58040524",
"0.57988006",
"0.57848763",
"0.5770976",
"0.5758491",
"0.57584",
"0.57526517",
"0.5747621",
"0.5738036",
"0.5736899",
"0.5735263",
"0.5711911",
"0.57070476",
"0.5683696",
"0.56807697",
"0.5674384",
"0.5659832",
"0.5648383",
"0.56469893",
"0.56355846",
"0.5626392",
"0.56251884",
"0.56251884",
"0.56204474",
"0.5616764"
]
| 0.0 | -1 |
Displays the right arm. Returns false if the arm cannot be fully displayed. | public boolean displayRightArm() {
final List<Block> newBlocks = new ArrayList<>();
if (this.rightArmConsumed) {
return false;
}
final Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 1).add(0, 1.5, 0);
if (!this.canPlaceBlock(r1.getBlock())) {
this.right.clear();
return false;
}
if (!(this.getRightHandPos().getBlock().getLocation().equals(r1.getBlock().getLocation()))) {
this.addBlock(r1.getBlock(), GeneralMethods.getWaterData(3), 100);
newBlocks.add(r1.getBlock());
}
final Location r2 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);
if (!this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {
this.right.clear();
this.right.addAll(newBlocks);
return false;
}
this.addBlock(r2.getBlock(), Material.WATER.createBlockData(), 100);
newBlocks.add(r2.getBlock());
for (int j = 1; j <= this.initLength; j++) {
final Location r3 = r2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());
if (!this.canPlaceBlock(r3.getBlock()) || !this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {
this.right.clear();
this.right.addAll(newBlocks);
return false;
}
newBlocks.add(r3.getBlock());
if (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {
this.addBlock(r3.getBlock(), Material.ICE.createBlockData(), 100);
} else {
this.addBlock(r3.getBlock(), Material.WATER.createBlockData(), 100);
}
}
this.right.clear();
this.right.addAll(newBlocks);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean displayLeftArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.leftArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(l1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(l2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\t\tthis.left.clear();\r\n\t\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(l3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.left.clear();\r\n\t\tthis.left.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"protected abstract void showRightFace();",
"public void rightPressed() {\n System.out.println(\"rightPressed()\");\n current.translate(0, 1);\n display.showBlocks();\n }",
"@Override\n\tpublic void buildArmRight() {\n\t\tg.drawLine(70, 50, 100, 80);\n\t}",
"@Override\r\n\tpublic void BuildArmRight() {\n\t\tg.drawLine(70, 50, 90, 100);\r\n\t}",
"boolean isRight() {\r\n\t\tint maxlength;\r\n\t\tmaxlength = Math.max(Math.max(side1, side2), side3);\r\n\t\treturn (maxlength * maxlength == (side1 * side1) + (side2 * side2) + (side3 * side3) - (maxlength * maxlength));\r\n\t}",
"public boolean hasRight() {\r\n\t\treturn right != null;\r\n\t}",
"public boolean isRightSide() {\n return rightSide;\n }",
"public void display() {\n io.writeLine(\"The correct answer is \" + rightAnswers.get(0));\n }",
"public boolean moveRight() {\r\n\t\tif (this.x >= 1050 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x += 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public boolean isRight () {\r\n\t\tif (((Math.pow(startSide1, 2) + Math.pow(startSide2, 2) == Math.pow(startSide3, 2)) || \r\n\t\t\t(Math.pow(startSide2, 2) + Math.pow(startSide3, 2) == Math.pow(startSide1, 2)) ||\r\n\t\t\t(Math.pow(startSide3, 2) + Math.pow(startSide1, 2) == Math.pow(startSide2, 2)))\r\n\t\t\t&& isTriangle () == true && isEquilateral () == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"@Override\r\n\tpublic void canMoveArmLeg() {\n\t\tSystem.out.println(\"팔다리를 움직일 수 있습니다.\");\r\n\t}",
"public void rightPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.right();\n\t\t}\n\t}",
"public boolean hasRight(){\r\n\t\tif(getRight()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean isArm() {\r\n return getFamily() == Family.ARM32BIT;\r\n }",
"@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"This is a rectangle button!\");\r\n\t}",
"boolean isDisplay();",
"boolean isDisplay();",
"public void makeRightVisible() {\n makeCharVisible(getCursor().getRightLine(),getCursor().getRightColumn());\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"This is rectangle\");\n\t}",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"@Override\n\tpublic void buildArmLeft() {\n\t\tg.drawLine(60, 50, 30, 80);\n\t}",
"public boolean stepRight() {\n xMaze++;\n printMyPosition();\n return true; // should return true if step was successful\n }",
"private void showDisplay() {\n this.display.displayScreen();\n }",
"public abstract boolean facingRight();",
"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 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 }",
"@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"RedHeadDuck\");\r\n\t}",
"@Override\r\n\tpublic void onRight() {\n\t\tif (snakeView.smer != snakeView.ZAHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.VZHOD;\r\n\t\t}\r\n\t}",
"private boolean slideRight()\n {\n if (blankCol == 0) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol - 1];\n board[blankRow][blankCol - 1] = 0;\n blankCol -= 1;\n return true;\n }",
"@Override\r\n\tpublic boolean hasRightChild() {\n\t\treturn right!=null;\r\n\t}",
"public boolean hasDisplay() {\n return displayBuilder_ != null || display_ != null;\n }",
"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 boolean isRightDown() {\n return pm.pen.getButtonValue(PButton.Type.RIGHT);\n }",
"public boolean slideRight() {\n\t\tif (currentCol < COLS - 1) {\n\t\t\tboard[currentRow][currentCol] = board[currentRow][currentCol + 1];\n\t\t\tcurrentCol++;\n\t\t\tboard[currentRow][currentCol] = '0';\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private boolean isDisplay(JPiereIADTabpanel tabPanel)\n {\n String logic = tabPanel.getDisplayLogic();\n if (logic != null && logic.length() > 0)\n {\n boolean display = Evaluator.evaluateLogic(tabPanel, logic);\n if (!display)\n {\n log.info(\"Not displayed - \" + logic);\n return false;\n }\n }\n return true;\n }",
"protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }",
"private boolean moveRight() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() + rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() + rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}",
"public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}",
"public boolean isMoveRight() {\n return moveRight;\n }",
"private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}",
"public boolean isArm(int loc) {\n return (loc == Mech.LOC_LARM) || (loc == Mech.LOC_RARM);\n }",
"boolean isMenuShowing() {\n return game.r != null;\n }",
"public void display() {\r\n \tsetLocation((int)parent.getLocationOnScreen().getX() + (parent.getWidth()/2) - (getWidth()/2), (int)parent.getLocationOnScreen().getY() + (parent.getHeight()/2) - (getHeight()/2));\r\n \tsetVisible(true);\r\n }",
"public boolean isFacingRight() {\n return isFacingRight;\n }",
"@Override\n\tpublic boolean moveRight() {\n\t\tboolean rs = super.moveRight();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}",
"public boolean isDisplayed_click_Fuel_Rewards_Link(){\r\n\t\tif(click_Fuel_Rewards_Link.isDisplayed()) { return true; } else { return false;} \r\n\t}",
"public boolean okToDisplay() {\n return this.mDisplayId == 0 ? !this.mWmService.mDisplayFrozen && this.mWmService.mDisplayEnabled && this.mWmService.mPolicy.isScreenOn() : this.mDisplayInfo.state == 2;\n }",
"public boolean isShootRight() {\n return shootRight;\n }",
"public boolean isRightSideInverted() {\n return rightSideMultiplier == -1.0;\n }",
"protected abstract void showLeftFace();",
"public void drawRightTriangle(){\n\t for(int i = 0; i < height; i++)\n\t {\n\t \tfor(int j = 0; j < width - 1; j++)\n\t \t{\n\t \t\tSystem.out.print(\" \");\n\t \t}\n\t \twidth--;\n\t \tfor(int k = height; k > width; k--)\n\t \t{\n\t \t\tSystem.out.print(appearance);\n\t \t}\n\t \tSystem.out.println(\"\");\n\t }\n\t}",
"public void rightAnswer() {\n if (quizGeneralState.checkAndPerformAction(QuizGeneralState.QuizAction.RIGHT)) {\n quizStateChanger.rightAnswerGiven();\n }\n }",
"private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}",
"boolean hasHingeOnRightSide() throws RuntimeException;",
"public void rightPressed() \n\t{\n\t\tkeys.get(keys.put(Keys.RIGHT, true));\n\t}",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Rectangle()\");\n\t}",
"@Override\n public void display() {\n display.display();\n }",
"@java.lang.Override\n public boolean hasDisplay() {\n return display_ != null;\n }",
"public boolean canDisplay(){\n if(title.isEmpty() && body.isEmpty()){\n return false;\n }\n\n return true;\n }",
"public boolean isValid(){\n\t\treturn this.arm.isValid();\n\t}",
"public boolean checkRight()\n\t{\n\t\tif(col+1<=9)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public void display_game_screen() {\n\n myScreen.screenMode = myScreen.DISPLAY_GAME_SCREEN;\n\n pushMatrix();\n\n calc_screen_translation();\n\n imageMode(CORNER);\n image(backgroundImage, 0, 0);\n\n // draw_grid();\n\n draw_game_assets();\n\n pacman.update(isPacmanUp, isPacmanDown, isPacmanLeft, isPacmanRight);\n ghost.update(isGhostUp, isGhostDown, isGhostLeft, isGhostRight);\n\n pacman.display();\n ghost.display();\n\n score.run(pacman.xTile, pacman.yTile, ghost.xTile, ghost.yTile);\n\n popMatrix();\n }",
"@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }",
"public void display() {\r\n\t\tsetVisible(true);\r\n\t}",
"public boolean moveRight() {\n if (position.isLinked(position.getEast())) {\n position.getGameObjects().remove(this.type);\n position = position.getEast();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }",
"public void display() {\n drawLine();\n for(int i=0; i < nRows; i++) {\n System.out.print(\"|\");\n for(int j=0; j < nCols; j++) {\n if(used[i][j] && board[i][j].equals(\" \")) {\n System.out.print(\" x |\");\n }\n else {\n System.out.print(\" \" + board[i][j] + \" |\");\n }\n }\n System.out.println(\"\");\n drawLine();\n }\n }",
"protected void viewToPresentOrGoIrRefresh()\n {\n if(widgg.common.bFreeze){\n //assume that the same time is used for actual shown data spread as need\n //for the future.\n \n //int timeRight = timeValues[(ixDataShowRight >> shIxiData) & mIxiData];\n //int timeRightNew = timeRight + timeorg.timeSpread * 7/8;\n \n int ixdDataSpread = ixDataShowRight - ixDataShown[pixelOrg.xPixelCurve * 5/8];\n if((ixDataShowRight - widgg.ixDataWr)<0 && (ixDataShowRight - widgg.ixDataWr + ixdDataSpread) >=0){\n //right end reached.\n ixDataShowRight = widgg.ixDataWr;\n widgg.common.bFreeze = false;\n } else {\n ixDataShowRight += ixdDataSpread;\n }\n //ixDataShowRight += ixdDataSpread;\n //if((ixDataShowRight - ixDataWr) > 0 && (ixDataShowRight - ixDataWr) < ixdDataSpread * 2) {\n //right end reached.\n //ixDataShowRight = ixDataWr;\n //common.bFreeze = false;\n //ixDataShowRight1 = ixDataWr + ixdDataSpread;\n //}\n //ixDataShowRight += ixDataShown[0] - ixDataShown[nrofValuesShow-1]; \n widgg.redraw(100, 200);\n \n } else {\n setPaintAllCmd(); //refresh\n }\n //System.out.println(\"right-bottom\");\n }",
"public boolean hasRightChild() {\n\t\treturn rightChild != null;\n\t}",
"public boolean isRightRed() {\n return (right == BeaconColor.RED_BRIGHT || right == BeaconColor.RED);\n }",
"public void showArming();",
"public boolean fireRightJet()\r\n\t{\r\n\t\treturn fireJet(new Point(-0.3, 0));\r\n\t}",
"private boolean checkRightSpace(Position p, int len,\n int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int i = x; i < x + len; i += 1) {\n for (int j = y - rightWid; j < y + leftWid + 1; j += 1) {\n if (i >= worldWidth) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }",
"@Override\n\tprotected boolean isFinished() {\n\t\treturn Math.abs(Robot.lidar.getRange() - range) < 2.0f;\n\t}",
"public boolean isRightJustify() {\n return rightJustify;\n }",
"@Override\n protected boolean isFinished() {\n return Robot.arm.getArmLimitSwitch();\n }",
"private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}",
"@Override\n\t\tprotected boolean condition() {\n\t\t\tWhichSide whichSide = VisionUtil.getPositionOfGearTarget();\n\t\t\tSystem.err.println(\"Position of gear target: \"+whichSide);\n\t\t\tif (whichSide == WhichSide.RIGHT)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public boolean right() {\r\n if( col >= MAXCOLS-1) return false;\r\n ++col;\r\n return true;\r\n }",
"private boolean movingRight() {\n return this.velocity.sameDirection(Vector2D.X_UNIT);\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 void moveRight()\n\t{\n\t\tmoveRight = true;\n\t}",
"public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public boolean isDisplayed() \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\n\tprotected void end() {\n\t\tmyLowerArm.set(0.0);\n\t}",
"public boolean execDisplay(){\r\n\t\tboolean result = true;\r\n\t\t\r\n\t\tRuntime run = Runtime.getRuntime();\r\n\t\ttry {\r\n\t\t\tProcess p = run.exec(cmdDisplay);\r\n\t\t\t\r\n\t\t\t/**必须要处理外部命令的标准输入输出**/\r\n\t\t\tBufferedInputStream in = new BufferedInputStream(p.getInputStream()); \r\n BufferedReader inBr = new BufferedReader(new InputStreamReader(in)); \r\n String lineStr; \r\n while ((lineStr = inBr.readLine()) != null) \r\n System.out.println(lineStr);\r\n\t\t\t\r\n\t\t\tif(p.waitFor() != 0){\r\n\t\t\t\tresult = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"IOException when executing display cmd\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (InterruptedException e) {\r\n\t\t\tSystem.out.println(\"InterruptedException when executing display cmd\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public void right() {\n\t\tstate.right();\n\t}",
"public boolean moveRight() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnRight() && !mouseOnRight()) {\r\n\t\t\tif (!onRightBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX + 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveLeft();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public void display()\r\n\t{\r\n\t\t\r\n\t}",
"void right() {\n startAnimation(rightSubCubes(), Axis.X, Direction.CLOCKWISE);\n rightCubeSwap();\n }",
"protected boolean isFinished() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\n\t\tif(talonNum == 2 && Math.abs(RobotMap.chassisfrontLeft.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon2FL/SIM\");\n \t\tRobotMap.chassisfrontLeft.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 3 && Math.abs(RobotMap.chassisfrontRight.getEncVelocity()) < 30){\n\t\t\tlcd.home();\n \t\tlcd.print(\"Talon3FR/SIM\");\n \t\tRobotMap.chassisfrontRight.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 4 && Math.abs(RobotMap.chassisrearLeft.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon4RL/SIM\");\n \t\tRobotMap.chassisrearLeft.set(0);\n \t\t\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 5 && Math.abs(RobotMap.chassisrearRight.getEncVelocity()) < 30){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon5RR/SIM\");\n \t\tRobotMap.chassisrearRight.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 11 && RobotMap.climberclimbMotor.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon11Climber/SIM\");\n \t\tRobotMap.climberclimbMotor.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 12 && RobotMap.floorfloorLift.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon12Floor/SIM\");\n \t\tRobotMap.floorfloorLift.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else if(talonNum == 13 && RobotMap.acquisitionacquisitionMotor.getOutputCurrent() < 2){\n \t\tlcd.home();\n \t\tlcd.print(\"Talon13acq/SIM\");\n \t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\t\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t}",
"public void act() {\t\n\t\twhile (true) { \n\t\t\tleft(60); \n\t\t\t\n\t\t\t// draw a rectangle \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t}\n\t}",
"public boolean isRightKnown() {\n return right != BeaconColor.UNKNOWN;\n }",
"public void printRightView(){\n \n if(root == null)\n return;\n\n // Take a queue and enqueue root and null\n // every level ending is signified by null\n // since there is just one node at root we enqueue root as well as null\n // take a bool value printed = false\n Queue<Node<T>> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n Node<T> lastVal = null;\n\n while(queue.size() != 0){\n Node<T> node = queue.remove();\n if(node != null){\n\n // keep track of last node and dont print it\n lastVal = node;\n\n // Enqueue left and right child if they exist\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // print last node\n System.out.println(lastVal.data + \" ,\");\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n }",
"public boolean getRightButton() {\n\t\treturn getRawButton(RIGHT_BUTTON);\n\t}",
"@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }",
"public void setRight(boolean right) {\n\t\tthis.right = right;\n\t}",
"public void display() {\n\t\t\n\t}",
"public void display() {\n\t\t\n\t}"
]
| [
"0.647503",
"0.6274703",
"0.62187403",
"0.60557926",
"0.59574217",
"0.57867134",
"0.57850814",
"0.5731796",
"0.5708237",
"0.5702946",
"0.56839406",
"0.56706417",
"0.5611498",
"0.5571525",
"0.5544658",
"0.54618424",
"0.5452319",
"0.5452319",
"0.5429952",
"0.5427877",
"0.54047334",
"0.5402365",
"0.53735805",
"0.53649354",
"0.53509843",
"0.53470576",
"0.5339659",
"0.53348005",
"0.53297204",
"0.53217494",
"0.5313412",
"0.53127044",
"0.529967",
"0.52923536",
"0.52915925",
"0.52910155",
"0.5282356",
"0.52803",
"0.5270306",
"0.5264461",
"0.5260766",
"0.5255054",
"0.52504957",
"0.5238694",
"0.52308697",
"0.5224585",
"0.52174884",
"0.520472",
"0.52041644",
"0.5201592",
"0.51975095",
"0.51934546",
"0.51791406",
"0.5178184",
"0.51755553",
"0.51742744",
"0.51619375",
"0.515424",
"0.51534146",
"0.5152445",
"0.5148692",
"0.5133883",
"0.51280767",
"0.51228166",
"0.5117955",
"0.5109193",
"0.5097081",
"0.5093978",
"0.5092341",
"0.5088765",
"0.5087692",
"0.5086599",
"0.5081598",
"0.5078518",
"0.5073442",
"0.50606453",
"0.50578403",
"0.50569004",
"0.5055075",
"0.5050579",
"0.50497335",
"0.5049139",
"0.5048854",
"0.5045452",
"0.5042718",
"0.50418144",
"0.50394326",
"0.50364673",
"0.5030366",
"0.50238353",
"0.5022795",
"0.50171745",
"0.5015397",
"0.50142115",
"0.5013471",
"0.5011787",
"0.5010729",
"0.5006211",
"0.49954766",
"0.49954766"
]
| 0.7598404 | 0 |
Displays the left arm. Returns false if the arm cannot be fully displayed. | public boolean displayLeftArm() {
final List<Block> newBlocks = new ArrayList<>();
if (this.leftArmConsumed) {
return false;
}
final Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);
if (!this.canPlaceBlock(l1.getBlock())) {
this.left.clear();
return false;
}
if (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {
this.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);
newBlocks.add(l1.getBlock());
}
final Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);
if (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {
this.left.clear();
this.left.addAll(newBlocks);
return false;
}
this.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);
newBlocks.add(l2.getBlock());
for (int j = 1; j <= this.initLength; j++) {
final Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());
if (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {
this.left.clear();
this.left.addAll(newBlocks);
return false;
}
newBlocks.add(l3.getBlock());
if (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {
this.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);
} else {
this.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);
}
}
this.left.clear();
this.left.addAll(newBlocks);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean displayRightArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.rightArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getRightHandPos().getBlock().getLocation().equals(r1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(r1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(r1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location r2 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(r2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(r2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location r3 = r2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(r3.getBlock()) || !this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\t\tthis.right.clear();\r\n\t\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(r3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.right.clear();\r\n\t\tthis.right.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public void leftPressed() {\n System.out.println(\"leftPressed()\");\n current.translate(0, -1);\n display.showBlocks();\n }",
"@Override\n\tpublic void buildArmLeft() {\n\t\tg.drawLine(60, 50, 30, 80);\n\t}",
"public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}",
"public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"public boolean moveLeft() {\n if (position.isLinked(position.getWest())) {\n position.getGameObjects().remove(this.type);\n position = position.getWest();\n position.getGameObjects().add(this.type);\n return true;\n }\n return false;\n }",
"public void leftButtonPressed() {\n\t\tif(droneApp.myDrone.isConnected) {\n\t\t\tif(!on) {\n\t\t\t\t// Enable our steamer\n\t\t\t\tstreamer.enable();\n\t\t\t\t// Enable the sensor\n\t\t\t\tdroneApp.myDrone.quickEnable(qsSensor);\n\t\t\t\t\n\t\t\t\ton = true;\n\t\t\t\t\n\t\t\t\tint w = tvSensorValue.getWidth();\n\t\t\t\tint h = tvSensorValue.getHeight();\n\t\t\t\t\n\t\t\t\tif(firstTime) {\t\t\n\t\t\t\t\tfirstTime = false;\n\t\t\t\t\twarmUpWindow1 = new PopupWindow(layout2, w, h, true);\n\t\t\t\t\twarmUpWindow1.setOutsideTouchable(true);\n\t\t\t\t\twarmUpWindow1.setFocusable(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(warmedUp) {\n\t\t\t\t\twarmedUp = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshowWarmupWindow(h);\n\t\t\t\tcountdown1Handler.post(countdown1Runnable);\n\t\t\t} else {\n\t\t\t\tresetAllOperations();\n\t\t\t}\n\t\t}\n\t}",
"void left() {\n startAnimation(leftSubCubes(), Axis.X, Direction.ANTICLOCKWISE);\n leftCubeSwap();\n }",
"public void leftPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.left();\t\n\t\t}\n\t}",
"public void rightPressed() {\n System.out.println(\"rightPressed()\");\n current.translate(0, 1);\n display.showBlocks();\n }",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }",
"protected abstract void showLeftFace();",
"public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}",
"public boolean slideLeft() {\n\t\tif (currentCol > 0) {\n\t\t\tboard[currentRow][currentCol] = board[currentRow][currentCol - 1];\n\t\t\tcurrentCol--;\n\t\t\tboard[currentRow][currentCol] = '0';\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public boolean moveLeft() {\n\t\tif (check(col-1, row)) {\n\t\t\tHiVolts.board.squares[row][col] = 0;\n\t\t\tcol = col - 1;\n\t\t\tHiVolts.board.squares[row][col] = 2;\n\t\t\tsuper.moveLeft();\n\t\t}\n\t\treturn true;\n\t}",
"public boolean left() {\r\n if( col <= 0 ) return false;\r\n --col;\r\n return true;\r\n }",
"private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}",
"@Override\n\tpublic boolean moveLeft() {\n\t\tboolean rs = super.moveLeft();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t}",
"private boolean slideLeft()\n {\n if (blankCol == SIZE - 1) {\n return false;\n }\n board[blankRow][blankCol] = board[blankRow][blankCol + 1];\n board[blankRow][blankCol + 1] = 0;\n blankCol += 1;\n return true;\n }",
"public boolean refreshLeft(){\r\n\t\treturn refreshLeft;\r\n\t}",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public boolean isLeftRed() {\n return (left == BeaconColor.RED_BRIGHT || left == BeaconColor.RED);\n }",
"private boolean moveLeft() {\n\t\tint moduleSpeed = stats.getSPEED();\n\n\t\tgetTorax().setRotationg(getTorax().getRotationg() - rotationRate);\n\t\tgetLegs().setRotationg(getLegs().getRotationg() - rotationRate);\n\n\t\tgetSpeed().setX(Math.cos(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\t\tgetSpeed().setY(Math.sin(Math.toRadians(getTorax().getRotationg() - 90)) * moduleSpeed);\n\n\t\tincreaseInfection();\n\n\t\treturn true;\n\t}",
"public void leftPressed() {\n\t\tkeys.get(keys.put(Keys.LEFT, true));\n\t}",
"public boolean moveLeft() {\r\n\t\tif (this.x <= 0 == true) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis.x -= 5;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public boolean pageLeft() {\n if (this.mCurItem <= 0) {\n return false;\n }\n setCurrentItem(this.mCurItem - 1, true);\n return true;\n }",
"@Override\r\n\tpublic void onLeft() {\n\t\tif (snakeView.smer != snakeView.VZHOD) {\r\n\t\t\tsnakeView.naslednjaSmer = snakeView.ZAHOD;\r\n\t\t}\r\n\t}",
"@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }",
"@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }",
"@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}",
"void leftView()\n {\n leftViewUtil(root, 1);\n }",
"public void goLeft() {\n\t\tx -= dx;\n\t\tbgBack.setDx(true);\n\t\tbgBack.move();\n\t\tif(x < 200) {\n\t\t\tif(!bgBack.getReachBegin()) {\n\t\t\t\tx = 200;\n\t\t\t\tbgFront.setDx(true);\n\t\t\t\tbgFront.move();\n\t\t\t}\n\t\t\telse if(x < 50) {\n\t\t\t\tx = 50;\n\t\t\t}\n\t\t}\n\n\t}",
"public boolean isLeftKnown() {\n return left != BeaconColor.UNKNOWN;\n }",
"public void printLeftView(){\n if(root == null)\n return;\n\n // Take a queue and enqueue root and null\n // every level ending is signified by null\n // since there is just one node at root we enqueue root as well as null\n // take a bool value printed = false\n Queue<Node<T>> queue = new LinkedList<>();\n queue.add(root);\n queue.add(null);\n boolean printed = false;\n\n while(queue.size() != 0){\n Node<T> node = queue.remove();\n if(node != null){\n // if the first node is not printed print it and flip the bool value\n if(! printed){\n System.out.println(node.data);\n printed = true;\n }\n\n // add left and right child if they exist\n if(node.left != null)\n queue.add(node.left);\n if(node.right != null)\n queue.add(node.right);\n }else{\n // flip the printed bool value\n // break if the queue is empty else enqueue a null\n printed = false;\n if(queue.size() == 0)\n break;\n queue.add(null);\n }\n }\n }",
"boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}",
"public void left() {\n\t\tstate.left();\n\t}",
"public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }",
"public void moveLeft()\n\t{\n\t\tmoveLeft = true;\n\t}",
"public boolean isLeftDown() {\n return pm.pen.getButtonValue(PButton.Type.LEFT);\n }",
"public boolean moveLeft() \r\n\t{\r\n\t\tboolean moved = false;\r\n\t\tif ( maze [currentRow] [currentCol].isOpenLeft() )\r\n\t\t{\r\n\t\t\tmaze [currentRow] [currentCol].removeWalker(Direction.LEFT);\r\n\t\t\tif ( currentCol-1 < 0 || maze [currentRow] [currentCol-1].isOpenRight() )\r\n\t\t\t{\r\n\t\t\t\tcurrentCol--;\r\n\t\t\t\tmoved = true;\r\n\t\t\t}\r\n\t\t\tif ( currentCol >= 0 )\r\n\t\t\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t\t}\r\n\t\tSystem.out.println( \"Move Left: \" + moved );\r\n\t\treturn moved;\r\n\t}",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"void hasLeft();",
"private void animateLeft(){\n if(frame == 1){\n setImage(run1_l);\n }\n else if(frame == 2){\n setImage(run2_l);\n }\n else if(frame == 3){\n setImage(run3_l);\n }\n else if(frame == 4){\n setImage(run4_l);\n }\n else if(frame == 5){\n setImage(run5_l);\n }\n else if(frame == 6){\n setImage(run6_l);\n }\n else if(frame == 7){\n setImage(run7_l);\n }\n else if(frame == 8){\n setImage(run8_l);\n frame =1;\n return;\n }\n frame ++;\n }",
"private void printLeft() {\n System.out.println(\"left side:\");\n if(leftSide != null) {\n for (int person : leftSide) System.out.print(Integer.toString(person) + \" \");\n System.out.println();\n }\n }",
"public boolean cardsLeft() {\n\t\tif (cards.size() - completedCards > 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"void leftView() \n\t\t{ \n\t\t\tleftViewUtil(root, 1); \n\t\t}",
"public boolean isMoveLeft() {\n return moveLeft;\n }",
"public void refreshLeft();",
"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 }",
"public static void turnLeft() {\n LEFT_MOTOR.backward();\n RIGHT_MOTOR.forward();\n }",
"public void drawLeftTriangle(){\n\t //This loop draws the left triangle. It also decrements the width to make the triangle more distinct.\n\t for(int j = 0; j < height; j++)\n\t {\n\t \tfor(int k = 0; k < width; k++)\n\t \t{\n\t\t\t System.out.print(appearance);\n\t\t\t \n\t\t\t System.out.print(\"\");\n\t\t\t}\n\t\t\twidth--;//Decreases width.\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t System.out.println(\"\");\n\t}",
"private void makeLeftBox() {\n\t\tgamePanel = new JPanel();\n\t\tgamePanel.setLayout(new BorderLayout());\n\t\tgamePanel.setBackground(Color.GRAY);\n\t\tgamePanel.setOpaque(true);\n\t\tleft = new JPanel();\n\t\tleft.setLayout(new GridLayout(1,1));\n\t\tleft.setBackground(Color.GRAY);\n\t\tbanner = new JLabel(\"Jeopardy\", SwingConstants.CENTER);\n\t\tbanner.setBorder(new EmptyBorder(10,10,10,10));\n\t\tbanner.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tbanner.setForeground(Color.GRAY);\n\t\tbanner.setBackground(lightRed);\n\t\tbanner.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n\t\tbanner.setOpaque(true);\n\t\tmakeGameBoard();\n\t\t\n\t\tgamePanel.add(banner, BorderLayout.NORTH);\n\t\tgamePanel.add(board, BorderLayout.CENTER);\n\t\tleft.setOpaque(false);\n\t\tJPanel space = new JPanel();\n\t\tspace.setOpaque(false);\n\t\tgamePanel.add(space, BorderLayout.SOUTH);\n\t\tleft.add(gamePanel);\n\t\t\n\t}",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }",
"@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}",
"public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public boolean isLeftToRight() {\n return leftToRight;\n }",
"@Override\r\n\tpublic void canMoveArmLeg() {\n\t\tSystem.out.println(\"팔다리를 움직일 수 있습니다.\");\r\n\t}",
"public boolean moveLeft() throws EatableObjectOnPlaceException {\r\n\t\tif (!treeOnLeft() && !mouseOnLeft()) {\r\n\t\t\tif (!onLeftBorder(positionX)) {\r\n\t\t\t\tpositionX = positionX - 1;\r\n\t\t\t\teatPerformingStep();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn moveRight();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void setLeft(boolean left) {\n\t\tthis.left = left;\n\t}",
"public boolean isLeftButtonPressed() {\n // checks if the left button of the mouse is pressed\n\n if (leftButtonPressed && released) {\n released = false;\n pressed = true;\n } else if (leftButtonPressed && !released) {\n pressed = false;\n released = false;\n } else {\n released = true;\n pressed = false;\n }\n\n return pressed;\n }",
"public boolean fireLeftJet()\r\n\t{\r\n\t\treturn fireJet(new Point(0.3, 0));\r\n\t}",
"public boolean isFacingLeft(){\r\n\t\tif(facingLeft == true){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void leftBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_leftBtnActionPerformed\n if (rotateR == 0) {\n rotateR = 1;\n\n l.stop();\n r.start();\n } else {\n rotateR = 0;\n r.stop();\n }\n }",
"public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}",
"boolean isMenuShowing() {\n return game.r != null;\n }",
"public void setLeft() {\n\t\tstate = State.LEFT;\n\t}",
"@Override\n\tpublic boolean stopLeft() {\n\t\tboolean rs = super.stopLeft();\n\t\tif(rs == true && this.y_dir == STOP){\n\t\t}\n\t\treturn rs;\n\t}",
"public boolean moveLeft()\n {\n\tboolean update;\n\tboolean action = false;\n\t\t\n\tdo\n\t{\n update = false;\n\t\t\t\n for (int y=0; y<cases.length-1; y++)\n {\n for (int x=0; x<cases[y].length; x++)\n\t\t{\n boolean merge;\n boolean move;\n\t\t\t\t\t\n do\n {\n merge = merge(cases[x][y+1],cases[x][y]);\n move = move(cases[x][y+1],cases[x][y]);\n\t\t\tupdate = (update || merge || move);\n if(!action && update)\n {\n action = update; \n }\n } while (merge || move);\n }\n }\n } while (update);\n \n return action;\n }",
"private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}",
"void openLeftDoor()\n {\n openingLeft = true;\n leftDoorTimeline.play();\n }",
"private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}",
"private boolean checkLeftSpace(Position p, int len,\n int leftWid, int rightWid) {\n\n int x = p.x;\n int y = p.y;\n for (int i = x; i > x - len; i -= 1) {\n for (int j = y - leftWid; j < y + rightWid + 1; j += 1) {\n if (i < 0) {\n return false;\n }\n if (j < 0 || j >= worldHeight) {\n return false;\n }\n if (!world[i][j].equals(Tileset.NOTHING)) {\n return false;\n }\n }\n }\n return true;\n }",
"private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}",
"public void guessesLeft() {\n guessesLeft--;\n if (guessesLeft > 0) {\n String guessesLeftString = (\"You have \" + String.valueOf(guessesLeft) + \" guesses.\");\n guessesLeftView.setText(guessesLeftString);\n } else {\n// DO THIS IF OUT OF GUESSES OR LOSE\n gameFragmentLayout.setVisibility(View.VISIBLE);\n hideKeybord();\n LosingGameFragment LoseGameFragment = new LosingGameFragment();\n LoseGameFragment.getLosingFragInfo(this, randomNumber);\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.game_fragment, LoseGameFragment)\n .commit();\n }\n }",
"private void checkLeftWall(Invader invader) {\n\t\t\n\t\tif (invader.getX() <= 0) {\n\t\t\tInvader.setDirectionRight(false);\n\t\t\t\n\t\t\tadvanceInvaders();\n\t\t\t\n\t\t\tInvader.setDirectionRight(true);\n\t\t}\n\t}",
"public void slideLeft() {\n turnLeft();\n move();\n turnRight();\n }",
"private boolean hasLeftWall(View v){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\treturn !v.mayMove(Direction.WEST);\n\t\tcase SOUTH:\n\t\t\treturn !v.mayMove(Direction.EAST);\n\t\tcase WEST:\n\t\t\treturn !v.mayMove(Direction.SOUTH);\n\t\tcase EAST:\n\t\t\treturn !v.mayMove(Direction.NORTH);\n\t\tdefault: return false;\n\t\t}\n\t}",
"private boolean leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\n }",
"public void mousePressed(MouseEvent e) {\n if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { // left\n movelight();\n display();\n repaint();\n e.consume();\n }\n }",
"public void rotateLeft (View view){ //onClick for LEFT Button\n\n if (toyRobotIsActive) {\n\n robot.animate().rotationBy(-90f).setDuration(50); //turn toy robot LEFT\n\n rotateLeft--; //counter to determine orientation\n System.out.println(\"rotateLeft \" + rotateLeft);\n System.out.println(\"rotateLeft + rotateRight = \"\n + orientation(rotateLeft, rotateRight)); //chk params in Logs\n\n } else errorMessage(\"Please place toy robot\");\n }",
"void leftInv() {\n startAnimation(leftSubCubes(), Axis.X, Direction.CLOCKWISE);\n leftCubeSwap();\n leftCubeSwap();\n leftCubeSwap();\n }",
"public void ifLose() {\n LoseMenu.setVisible(true);\n }",
"private void turnLeft() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.NORTH;\n break;\n case WEST:\n direction = Position.Direction.SOUTH;\n break;\n case NORTH:\n direction = Position.Direction.WEST;\n break;\n case SOUTH:\n direction = Position.Direction.EAST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }",
"public void showLeftFoeMessage() {\n\t\tsetStatusBar(FOE_LEFT_MSG);\n\t}",
"protected abstract void showRightFace();",
"protected boolean isHorizontal() {\n\t\treturn true;\n\t}",
"private void displayLeftAndRight(Location center, Player player) {\n\t\tParticleManager particleManager = Navigator.getInstance().getParticleManager();\n\n\t\t// the lower left corner\n\t\tdouble cornerX = center.getX() - (sideLength / 2);\n\t\tdouble leftZ = center.getZ() - (sideLength / 2);\n\n\t\t// for the right side\n\t\tdouble rightZ = center.getZ() + (sideLength / 2);\n\n\t\tLocation location = center.clone();\n\t\tlocation.setX(cornerX);\n\t\tlocation.setZ(leftZ);\n\n\t\t// display left line, going from left down upwards\n\t\tfor (double x = cornerX, max = cornerX + sideLength; x < max; x += granularity) {\n\t\t\tlocation.setX(x);\n\n\t\t\t// left line\n\t\t\tparticleManager.displayEndMarkerParticle(location, player);\n\n\t\t\t// right line\n\t\t\tlocation.setZ(rightZ);\n\t\t\tparticleManager.displayEndMarkerParticle(location, player);\n\t\t\tlocation.setZ(leftZ);\n\t\t}\n\t}",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public void moveLeft(){\n\t\tif(GameSystem.TWO_PLAYER_MODE){\n\t\t\tif(Game.getPlayer2().dying){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(animation==ANIMATION.DAMAGED||Game.getPlayer().dying||channelling||charging) return;\n\t\tmoving=true;\n\t\tbuttonReleased=false;\n\t\torientation=ORIENTATION.LEFT;\n\t\tif(animation!=ANIMATION.MOVELEFT) {\n\t\t\tanimation=ANIMATION.MOVELEFT;\n\t\t\tif(run!=null) sequence.startSequence(run);\n\t\t}\n\t\tfacing=FACING.LEFT;\n\t\tdirection=\"left\";\n\t\tsetNextXY();\n\t\tsetDestination(nextX,nextY);\n\t\tvelX=-1*spd/2;\n\t\tvelY=0;\n\t}",
"public void goLeft() {\n if(page.left == null)\n {\n if(editText.getText().toString().equals(\"\")) {\n return;\n }\n page.addRelation(\"left\",editText.getText().toString());\n editText.setText(\"\");\n }\n\n page = page.left;\n addQueue();\n }",
"void setLeft(boolean left) {\n myLeft = left;\n }",
"public Location getLeftArmEnd() {\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"public boolean hasLeftChild() {\n\t\treturn leftChild != null;\n\t}"
]
| [
"0.67803586",
"0.66702837",
"0.6356",
"0.63509995",
"0.63266206",
"0.63151157",
"0.6199976",
"0.609593",
"0.60222626",
"0.60163563",
"0.6006137",
"0.59687954",
"0.5961422",
"0.59582233",
"0.59193367",
"0.59128124",
"0.5884747",
"0.58733666",
"0.5847533",
"0.5825701",
"0.5825186",
"0.58248997",
"0.5823942",
"0.5817135",
"0.5813644",
"0.5795553",
"0.57739824",
"0.57498264",
"0.5746943",
"0.57466227",
"0.57346404",
"0.5723871",
"0.57116187",
"0.5708924",
"0.56888574",
"0.5671291",
"0.5658764",
"0.56324065",
"0.5609245",
"0.5597709",
"0.5588947",
"0.55830246",
"0.5563509",
"0.55630535",
"0.5550107",
"0.55426764",
"0.55383855",
"0.55374944",
"0.5533728",
"0.5516291",
"0.5505681",
"0.5505437",
"0.55022514",
"0.5492442",
"0.5489886",
"0.5480247",
"0.5476522",
"0.5475461",
"0.54708886",
"0.5467456",
"0.54617894",
"0.5455983",
"0.545535",
"0.5450035",
"0.54481566",
"0.5445981",
"0.54451865",
"0.5431739",
"0.5423308",
"0.54227275",
"0.5408051",
"0.53986055",
"0.5390993",
"0.5385987",
"0.537534",
"0.53684515",
"0.5362601",
"0.5359195",
"0.53589433",
"0.53581566",
"0.53525895",
"0.5349152",
"0.5346006",
"0.53453547",
"0.5338548",
"0.5333447",
"0.53325516",
"0.53297246",
"0.53261435",
"0.5325588",
"0.5323416",
"0.53213346",
"0.5318997",
"0.53000915",
"0.5266105",
"0.5264177",
"0.52513635",
"0.52507603",
"0.52460015",
"0.52399635"
]
| 0.7803061 | 0 |
Calculate roughly where the player's right hand is. | private Location getRightHandPos() {
return GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public Location getRightArmEnd() {\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn r1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"public double getRightDistance() {\n return rightEnc.getDistance();\n }",
"public int getRight(){\n\t\treturn platformHitbox.x+width;\n\t}",
"protected long getRightPosition() {\n return rightPosition;\n }",
"private long opponent_winning_position() {\r\n return compute_winning_position(bitboard ^ mask, mask);\r\n }",
"public double getRightY() {\r\n\t\treturn adjustInput(driverRight.getY());\r\n\t}",
"public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"public Hand getRightHand()\n\t{\n\t\treturn hands[1];\n\t}",
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"private Point2D.Double rightSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() - Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() - Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public double getRight() {\n return this.xR;\n }",
"public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}",
"public float getDistanceToRightPivot() {\n return rightDist;\n }",
"public Location getLeftArmEnd() {\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}",
"public Bearing rightFrom() {\n return this.get(((this.bearing + 2) + 8) % 8);\n }",
"public int getRight () {\n\t\treturn right;\n\t}",
"private Location[] overrunRight () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == ONE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(myCanvasBounds.getWidth(), getY());\n nextCenter = new Location(0, getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading();\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(getHeading() - THREE_QUARTER_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation =\n new Location(myCanvasBounds.getWidth(), getY() +\n (myCanvasBounds.getWidth() - getX()) /\n Math.tan(angle));\n nextCenter =\n new Location(0, getY() + (myCanvasBounds.getWidth() - getX()) / Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }",
"public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }",
"@Override\r\n\tpublic double getThrustRightHand() {\n\t\treturn rechtThrust;\r\n\t}",
"protected double getWindowRightX() {\n\t\treturn this.m_windowRightX;\n\t}",
"public float getRight() {\r\n\t\treturn left + width;\r\n\t}",
"public int getXRight() {\n return getXLeft() + getXLength();\n }",
"@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"private int right(int row, int column, char check, char[][] rightBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 18 || traversedPoints.contains(new Point(column + 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (rightBoard[column + 1][row] != ' ' && rightBoard[column + 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column + 1;\n\t}",
"@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}",
"public double getRightEncoderDistance() {\n return this.rightEncoder.getDistance();\n }",
"public double getRightTrigger() {\n\t\treturn getRawAxis(RIGHT_TRIGGER);\n\t}",
"public String playerNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-200 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+250 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"public Point getdownRigth() {\n Point downRigth = new Point(this.upperLeft.getX() + this.getWidth(), this.upperLeft.getY() + this.getHeight());\n return downRigth;\n }",
"public double getRightCurrent() {\n return rightMotor.getOutputCurrent();\n }",
"public PVector getWristRawPosition(){\n\t\treturn this.leap.convert(this.arm.wristPosition());\n\t}",
"private Coordinate tileCoordinateForTileRightAbove(GuiTile tile) {\n\t\treturn new Coordinate(tile.getScreenBottomX() / GuiTile.getScale() + GuiTile.getHalfWidth() + 0.05 * GuiTile.getHalfWidth(),\n\t\t\t\ttile.getScreenBottomY() / GuiTile.getScale() - tile.getMid1Height() - GuiTile.getBaseHeight() - 0.05 * GuiTile.getHalfWidth());\n\t}",
"public int compareHandForWinner(Hand hand) {\n int thisRank = this.calcRank();\n int handRank = hand.calcRank();\n if (thisRank > handRank) return 1;\n if (thisRank < handRank) return -1;\n\n if( thisRank == 4 || thisRank == 7){\n if( getTripleIndex() > hand.getTripleIndex()) return 1;\n if( getTripleIndex() < hand.getTripleIndex()) return -1;\n }\n if( thisRank == 8){\n if( getSameValueCardOf4Index() > hand.getSameValueCardOf4Index()) return 1;\n if( getSameValueCardOf4Index() < hand.getSameValueCardOf4Index()) return -1;\n }\n if( thisRank == 7 || thisRank == 3 || thisRank == 2){\n int[] indexOfPair = getPairsIndexArray();\n int[] indexOfPair2 = hand.getPairsIndexArray();\n int pairOfIndexValue = indexOfPair[0] * 100 + indexOfPair[1];\n int pairOfIndexValue2 = indexOfPair2[0] * 100 + indexOfPair2[1];\n if( pairOfIndexValue > pairOfIndexValue2) return 1;\n if( pairOfIndexValue < pairOfIndexValue2) return -1;\n }\n return CardOperations.compareTwoArrays(getCardValuesInHand(), hand.getCardValuesInHand());\n }",
"public Coords getLowerRight()\r\n {\r\n return new Coords(x + width, y + height);\r\n }",
"public Pixel topRight() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.right;\n }\n }",
"public int getRight() {\n\t\treturn this.right;\n\t}",
"double getLeftY();",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public double awayWin() {\n\t\treturn this.bp.P2();\n\t}",
"public void right() {\n if (x + movementSpeed < 450) {\r\n x = x + movementSpeed;\r\n }\r\n }",
"int getRightMonster();",
"public double getPilotY(Hand hand) {\n if(Math.abs(pilot.getY(hand)) < Controller.DEADBAND) return 0;\n else return scaleJoystick(-pilot.getY(hand), JoystickSens.CUBED);\n }",
"public PVector getWristPosition(){\n\t\treturn this.leap.map(this.arm.wristPosition());\n\t}",
"public void moveRight() {\n if (xcoor <= Game.widthOfGameBoard - movingSpeed) {\n xcoor = xcoor + movingSpeed * 2;\n }\n }",
"public Entity getShoulderEntityRight ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityRight ( ) );\n\t}",
"public Player getRightNeigbour() {\n\t\treturn players.get((players.indexOf(current)+1)%players.size());\n\t}",
"@Test\n\tpublic final void nextPositionRightTest() {\n\t\tplayer.setRight(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), 2.0, 0.1);\n\t}",
"private static double upRightScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != state.getGrid()[row].length-1 && state.getGrid()[row-1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public int getRightWeight(){\r\n\t \treturn this.rightWeight;\r\n\t }",
"public Player getRightPlayer() {\r\n\t\tif(getWhoseTurn() - 2 < 0) {\r\n\t\t\treturn players.get(players.size() - 1);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn players.get(getWhoseTurn() - 2);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String moveRight() {\n\t\tif((0<=x && x<50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((40<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}",
"public double getRightJoyY() {\n return rightJoyY;\n }",
"public double getRightJoystickHorizontal() {\n\t\treturn getRawAxis(RIGHT_STICK_HORIZONTAL);\n\t}",
"public int getXTopRight() {\n return xTopRight;\n }",
"private static double downRightScore(char piece, State state, int row, int col) {\n\t\tif(row != state.getGrid().length-1 && col != state.getGrid()[row].length-1 && state.getGrid()[row+1][col+1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public Coords getUpperRight()\r\n {\r\n return new Coords(x + width, y);\r\n }",
"public BolName getRightHand() {\r\n\t\tif (handType == COMBINED) {\r\n\t\t\treturn rightHand;\r\n\t\t} else return null;\r\n\t}",
"public Direction right() {\n\t\treturn right;\n\t}",
"public int getKeyRight() {\r\n return Input.Keys.valueOf(keyRightName);\r\n }",
"public int getYTopRight() {\n return yTopRight;\n }",
"public double getUserFriendlyYPos(){\n return myGrid.getHeight()/ HALF-yPos;\n }",
"private int getRightSideTrackSize() {\n if (mR2L) {\n return mProgressTrackSize;\n }\n return mBackgroundTrackSize;\n }",
"public double getRightAcceleration() {\n return rightEnc.getAcceleration();\n }",
"private Long handScore() {\n\t\tif (checkFlush(current5)&&checkStraight(current5)) {\r\n\t\t\treturn Long.decode(\"0x9\"+getHandString(current5));\r\n\t\t} else if(checkFour(current5)) {\r\n\t\t\t//check four of a kind\r\n\t\t\treturn Long.decode(\"0x8\"+getHandString(current5));\r\n\t\t} else if(checkHouse(current5)) {\r\n\t\t\t//check full house\r\n\t\t\tif(current5.get(2).getValue()!=current5.get(1).getValue()) {\r\n\t\t\t\tcurrent5.add(current5.remove(0));\r\n\t\t\t\tcurrent5.add(current5.remove(0));\r\n\t\t\t}\r\n\t\t\treturn Long.decode(\"0x7\"+getHandString(current5));\r\n\t\t} else if (checkFlush(current5)) {\r\n\t\t\treturn Long.decode(\"0x6\"+getHandString(current5));\r\n\t\t} else if (checkStraight(current5)) {\r\n\t\t\treturn Long.decode(\"0x5\"+getHandString(current5));\r\n\t\t}\r\n\t\tlong kind3 = checkKind3(current5);\r\n\t\tif(Long.compare(kind3, 0)!=0) {\r\n\t\t\treturn kind3;\r\n\t\t}\r\n\t\tlong pair2 = checkPair2(current5);\r\n\t\tif(Long.compare(pair2, 0)!=0) {\r\n\t\t\treturn pair2;\r\n\t\t}\r\n\t\tlong pair = checkPair(current5);\r\n\t\tif(Long.compare(pair, 0)!=0) {\r\n\t\t\treturn pair;\r\n\t\t}\r\n\t\t\r\n\t\treturn Long.decode(\"0x1\"+getHandString(current5));\r\n\t}",
"public Integer getRightAnswer() {\n return rightAnswer;\n }",
"public int getRightMonster() {\n return rightMonster_;\n }",
"private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public Integer checkRight()\r\n\t{\r\n\t\treturn this.X + 1;\r\n\t}",
"public int getRightMonster() {\n return rightMonster_;\n }",
"protected String getRightMessage() {\n\t\treturn player1.getName() + \": \" + player1.getScore();\n\t}",
"public Point getupperRigth() {\n Point upperRigth = new Point(this.upperLeft.getX() + this.getWidth(), this.upperLeft.getY());\n return upperRigth;\n }",
"private void playerMoveRight()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() + 1);\n if (this.getCurrentX() < 11) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(this.getCurrentX() - 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }",
"private static int rightScore(char piece, State state, int row, int col) {\n\t\tif(col != state.getGrid().length-1 && state.getGrid()[row][col+1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }",
"public static Vector handMoves(){\r\n\t\tFrame currentFrame = LEAPCONTROLLER.frame();\r\n\t\tVector movement;\r\n\t\t\r\n\t\tif (currentFrame.interactionBox().isValid()) { // interaction is valid ?\r\n\t\t\tVector normMove = currentFrame.interactionBox().normalizePoint(currentFrame.hands().frontmost().palmPosition()); // get the normalized position of the hand\r\n\t\t\tif(!currentFrame.hands().isEmpty()){\r\n\t\t\t\tmovement = new Vector( (normMove.getX()-0.5f), (-normMove.getY()+0.5f), 0.0f);\r\n\t\t\t\treturn movement;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tmovement = new Vector (0.0f, 0.0f, 0.0f);\r\n\t\treturn movement;\r\n\t}",
"public Direction getCorrectRobotDirection();",
"public Pixel downRight() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.right;\n }\n }",
"public void right(){\n\t\tmoveX=1;\n\t\tmoveY=0;\n\t}",
"public int getWinner() {\n //checks corner cells\n if (getCorners() != -1)\n return getCorners();\n\n //checks border cells\n if (getBorders() != -1)\n return getBorders();\n\n //check middle cases\n if (getMiddle() != -1)\n return getMiddle();\n\n return -1;\n }",
"double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }",
"private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}",
"public Location getRight()\n\t{\n\t\tif(checkRight())\n\t\t{\n\t\t\treturn new Location(row,col+1);\n\t\t}\n\t\treturn this;\n\t}",
"public double getPilotTrigger(Hand hand) {\n return pilot.getTriggerAxis(hand);\n }",
"public static char getsRight() {\n\t\t\treturn sRight;\n\t\t}",
"public int getRightHandMarginColumn() {\n return canShowRightHandMargin ? rightHandMarginColumn : NO_MARGIN;\n }",
"public Integer getWinner() {\n if (isWinner(PLAYER_X)) {\n return (int) PLAYER_X;\n } else if (isWinner(PLAYER_O)) {\n return (int) PLAYER_O;\n } else if (getFreeFields().isEmpty()) {\n return 0;\n } else {\n return null;\n }\n }",
"public double getRightJoystick() {\n\t\treturn HumanInput.getXboxAxis(HumanInput.xboxController, XboxButtons.XBOX_RIGHT_Y_AXIS);\n\t}",
"@Override\r\n\tpublic Trajectory getRightTrajectory() {\n\t\treturn right;\r\n\t}",
"double rightmost_alien_x() {\n double max_x = 0;\n for (Alien alien : aliens) {\n if (alien.x_position > max_x) {\n max_x = alien.x_position;\n }\n }\n return max_x;\n }",
"private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}",
"public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"Point3D getRightLowerFrontCorner();",
"public int getCurrentPlayerRealPosition();",
"public int getMouthPosition()\n {\n return (mouthPosition);\n }",
"private int right(int parent) {\n\t\treturn parent*2+2;\n\t}",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }"
]
| [
"0.70143235",
"0.6755049",
"0.67532635",
"0.6747098",
"0.6613235",
"0.6593647",
"0.6536043",
"0.65134346",
"0.6506528",
"0.6393655",
"0.6373956",
"0.6364971",
"0.6333938",
"0.63172114",
"0.6288866",
"0.62852997",
"0.6281824",
"0.6266806",
"0.623248",
"0.6200686",
"0.62004846",
"0.61793214",
"0.617595",
"0.61692244",
"0.6153472",
"0.61470425",
"0.60984373",
"0.60886365",
"0.6065804",
"0.6061463",
"0.60573256",
"0.60398036",
"0.600306",
"0.5992488",
"0.59886336",
"0.5967016",
"0.5966043",
"0.5958607",
"0.5957922",
"0.59561086",
"0.59545857",
"0.59288234",
"0.59238046",
"0.5903307",
"0.5900685",
"0.5866306",
"0.5865325",
"0.5865134",
"0.58615255",
"0.5860992",
"0.5854093",
"0.58536017",
"0.5837968",
"0.5837087",
"0.58369535",
"0.58319783",
"0.58209646",
"0.58179647",
"0.581736",
"0.581244",
"0.5807143",
"0.5806757",
"0.58047324",
"0.5804517",
"0.5801524",
"0.57998675",
"0.57983035",
"0.5787966",
"0.57773393",
"0.5775985",
"0.5770783",
"0.57585925",
"0.5750355",
"0.574838",
"0.57468015",
"0.5741261",
"0.57411677",
"0.57400227",
"0.57319194",
"0.57275414",
"0.5723952",
"0.5718233",
"0.57174146",
"0.5715456",
"0.5708019",
"0.57049453",
"0.5693821",
"0.5689658",
"0.5683906",
"0.5681656",
"0.5681609",
"0.5672728",
"0.56682765",
"0.56624377",
"0.56611073",
"0.56570363",
"0.56546116",
"0.5647849",
"0.5643254",
"0.56397706"
]
| 0.82539195 | 0 |
Calculate roughly where the player's left hand is. | private Location getLeftHandPos() {
return GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Location getLeftArmEnd() {\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public double getLeftDistance() {\n return leftEnc.getDistance();\n }",
"public int leftPosion (double degLon){\n double scale = pictureSizePixels/worlSizeMeters;\n return (int) Math.round(xCoordinate(degLon)\n *scale\n +(pictureSizePixels/2));\n }",
"public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}",
"private int movesLeft() {\n\t\treturn movesLeft.size() - 1; // don't count quit\n\t}",
"public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"public double getLeftX(){\r\n\t\treturn adjustInput(driverLeft.getX());\r\n\t}",
"private long opponent_winning_position() {\r\n return compute_winning_position(bitboard ^ mask, mask);\r\n }",
"public int getLeftEnc() {\n\t\treturn TalLM.getSelectedSensorPosition(0)-initEncL;\n\t}",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public double getLeftDistance() {\n\t\treturn left.getDistance();\n\t}",
"public int getPrayerLeft() {\n\t\treturn Integer.parseInt(methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 4).getText());\n\t}",
"public Player getLeftNeighbor() {\n\t\tif(players.indexOf(current)==0) {\n\t\t\treturn players.get(players.size()-1);\n\t\t}\n\t\telse {\n\t\t\treturn players.get(players.indexOf(current)-1);\n\t\t}\n\t}",
"public double getLeftY() {\r\n\t\treturn adjustInput(driverLeft.getY());\r\n\t}",
"protected long getLeftPosition() {\n return leftPosition;\n }",
"public String playerNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-200 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+250 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"public double getLeft() {\r\n\t\treturn -left.getRawAxis(1);\r\n\t}",
"public double getLeft() {\n return this.xL;\n }",
"public int getBallDistanceLeft(int playerIndex) {\n return distanceLeft[playerIndex];\n }",
"private static double getLeftStick() {\n\t\treturn (OI.getInstance().leftStick.getY()) * speed;\n\t}",
"private Location[] overrunLeft () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(0, getY());\n nextCenter = new Location(myCanvasBounds.getWidth(), getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading() - ONE_QUARTER_TURN_DEGREES;\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(THREE_QUARTER_TURN_DEGREES - getHeading());\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(0, getY() + getX() / Math.tan(angle));\n nextCenter = new Location(myCanvasBounds.getWidth(), getY() + getX() /\n Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }",
"public int getXLeft() {\n return xLeft;\n }",
"public int getKeyLeft() {\r\n return Input.Keys.valueOf(keyLeftName);\r\n }",
"public Point getLocalPosition() {\n return getLocalLowerLeft();\n }",
"public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }",
"public Hand getLeftHand()\n\t{\n\t\treturn hands[0];\n\t}",
"public Point getdownLeft() {\n Point downLeft = new Point(this.upperLeft.getX(), this.upperLeft.getY() + this.getHeight());\n return downLeft;\n }",
"private void playerMoveLeft()\n {\n \n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentX(getCurrentX() - 1);\n if (this.getCurrentX() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentX(this.getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else {\n this.setCurrentX(getCurrentX() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n }",
"public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}",
"public float getDistanceToLeftPivot() {\n return leftDist;\n }",
"double leftmost_alien_x() {\n double min_x = scene_width;\n for (Alien alien : aliens) {\n if (alien.x_position < min_x) {\n min_x = alien.x_position;\n }\n }\n return min_x;\n }",
"double getLeftY();",
"@Override\n\tpublic String calculateLeftTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"public double getLeftCurrent() {\n return leftMotor.getOutputCurrent();\n }",
"public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }",
"private int left(int row, int column, char check, char[][] leftBoard, ArrayList<Point> traversedPoints)\n\t{\n\t\tif (column == 0 || traversedPoints.contains(new Point(column - 1, row)))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse if (leftBoard[column - 1][row] != ' ' && leftBoard[column - 1][row] != check)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\treturn column - 1;\n\t}",
"public BolName getLeftHand() {\r\n\t\tif (handType == COMBINED) {\r\n\t\t\treturn leftHand;\r\n\t\t} else return null;\r\n\t}",
"protected double getWindowLeftX() {\n\t\treturn this.m_windowLeftX;\n\t}",
"public int getGuessesLeft() {\r\n return 0;\r\n }",
"public double getLeftDistanceInches() {\n return leftEncoder.getDistance();\n }",
"public Player getLeftPlayer() {\r\n\t\tif(getWhoseTurn() > players.size() - 1) {\r\n\t\t\treturn players.get(0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn players.get(getWhoseTurn());\r\n\t\t}\r\n\t}",
"public float getLeftX() {\n\t\treturn leftX;\n\t}",
"public Bearing leftFrom() {\n return this.get(((this.bearing - 2) + 8) % 8);\n }",
"public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"public Coords getLowerLeft()\r\n {\r\n return new Coords(x, y + height);\r\n }",
"@Test\n\tpublic final void nextPositionLeftTest() {\n\t\tplayer.setLeft(true);\n\t\tplayer.setMovSpeed(3.0);\n\t\tplayer.setMaxSpeed(2.0);\n\t\tplayer.getNextXPosition();\n\t\tassertEquals(player.getDx(), -2.0, 0.1);\n\t}",
"public double getLeftAcceleration() {\n return leftEnc.getAcceleration();\n }",
"public BigInteger getNumLeft() {\n return numLeft;\n }",
"private static int moveLeft()\n {\n int num_chocolates = choArr[baby.row][baby.column-1];\n // change both the choArr and baby position\n baby.column=baby.column-1;\n choArr[baby.row][baby.column]=0;\n return num_chocolates;\n }",
"protected String getLeftMessage() {\n\t\treturn player2.getName() + \": \" + player2.getScore();\n\t}",
"public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }",
"public BigInteger getNumLeft () {\n\t return numLeft;\n\t }",
"public Entity getShoulderEntityLeft ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityLeft ( ) );\n\t}",
"public void left () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.WEST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public FPointType calculateUpperLeft() {\n fRectBound = getBounds2D();\n FPointType fptUpperLeft = new FPointType(fRectBound.x, fRectBound.y);\n calculate(fptUpperLeft);\n \n rotateRadian = 0.0f;\n \n return fptUpperLeft;\n }",
"public int getLiftPosition() {\n //Do some math on getting the encoder positions\n return liftStageOne.getCurrentPosition() + liftStageTwo.getCurrentPosition();\n }",
"public BigInteger getNumLeft()\n\t{\n\t\treturn numLeft;\n\t}",
"public int getLeftNumber() {\n return leftNumber;\n }",
"public double getLeftEncoderDistance() {\n return this.leftEncoder.getDistance();\n }",
"public int getLeft() {\n\t\treturn left;\n\t}",
"private static int leftScore(char piece, State state, int row, int col) {\n\t\tif(col != 0 && state.getGrid()[row][col-1] == piece) {\n\t\t\treturn NEXT_TO;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"private float getHoldingArrowX()\n {\n return xPos + getCurrentFrameWidth() / 2;\n }",
"protected void left() {\n move(positionX - 1, positionY);\n orientation = BattleGrid.RIGHT_ANGLE * 2;\n }",
"public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}",
"public Pixel topLeft() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.left;\n }\n }",
"public double getLeftTrigger() {\n\t\treturn getRawAxis(LEFT_TRIGGER);\n\t}",
"private static double upLeftScore(char piece, State state, int row, int col) {\n\t\tif(row != 0 && col != 0 && state.getGrid()[row-1][col-1] == piece) {\n\t\t\treturn DIAGONAL;\n\t\t}\n\t\telse {\n\t\t\treturn ZERO;\n\t\t}\n\t}",
"public Object getLocation() {\n return leftSide.getLocation();\n }",
"private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }",
"double getLeft(double min);",
"private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"String getLawnPosition();",
"private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}",
"public double getLeftDistanceInches()\n {\n return rotationsToInches(mLeftMaster.getSensorPositionRotations());\n }",
"private Vector2D leftVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime * -1, 0);\n }",
"public Location left() {\n return new Location(row, column - 1);\n }",
"public double getLeft(double min) {\n return Math.min(min, min + (this.length * Math.sin(Math.toRadians(this.theta)))\n ); \n }",
"public void left(){\n\t\tmoveX=-1;\n\t\tmoveY=0;\n\t}",
"public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}",
"public Point getUpperLeft() {\n return this.upperLeft;\n }",
"public int getCurrentPlayerRealPosition();",
"public float getLowerLeftX()\n {\n return ((COSNumber)rectArray.get(0)).floatValue();\n }",
"double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }",
"public int getLeftMonsterIndex() {\n return leftMonsterIndex_;\n }",
"private void RightLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\t\n \t\t\n \t\n \t}\n \t}",
"public double getLeftDistanceFeet() {\n return leftEncoder.getDistance() / 12;\n }",
"public void moveLeft() {\n if (xcoor >= movingSpeed) {\n xcoor = xcoor - movingSpeed * 2;\n }\n }",
"public float getX(){\n return hitBox.left;\n }",
"public int getLeftWeight(){\r\n\t \treturn this.leftWeight;\r\n\t }",
"private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}",
"int getLeftMonsterIndex();",
"public static char getsLeft() {\n\t\t\treturn sLeft;\n\t\t}",
"public double getLeftJoystickHorizontal() {\n\t\treturn getRawAxis(LEFT_STICK_HORIZONTAL);\n\t}",
"public Component leftWorld() {\n return MiniMessage.get().parse(voteHeader + leftWorld);\n }",
"public void adjustLeft() {\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 }",
"boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}",
"private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}"
]
| [
"0.6889382",
"0.6850089",
"0.6840706",
"0.6831532",
"0.6819157",
"0.67696935",
"0.6753151",
"0.6731121",
"0.671214",
"0.66974276",
"0.66574556",
"0.66533107",
"0.6620413",
"0.6596492",
"0.6584644",
"0.6583315",
"0.657645",
"0.6566676",
"0.6553356",
"0.65316075",
"0.6523941",
"0.64723545",
"0.6468783",
"0.643442",
"0.64315534",
"0.64187616",
"0.64081746",
"0.63974226",
"0.6354489",
"0.6328916",
"0.6325463",
"0.6323206",
"0.6322449",
"0.63209873",
"0.63194156",
"0.63123107",
"0.6311712",
"0.6274505",
"0.62717307",
"0.6266483",
"0.62655216",
"0.6258572",
"0.6248462",
"0.6247534",
"0.62434554",
"0.62401545",
"0.61939156",
"0.6178965",
"0.61757433",
"0.6164705",
"0.6161892",
"0.6161813",
"0.6157732",
"0.61527395",
"0.6150707",
"0.6150588",
"0.6144031",
"0.6136502",
"0.61131144",
"0.61128926",
"0.61090237",
"0.6108421",
"0.610664",
"0.61059886",
"0.608933",
"0.608832",
"0.60738194",
"0.60730416",
"0.6068463",
"0.60662365",
"0.6064202",
"0.6062737",
"0.60568213",
"0.6055143",
"0.6033891",
"0.60251",
"0.60167694",
"0.5976445",
"0.5971923",
"0.5968914",
"0.59682554",
"0.59590596",
"0.59532654",
"0.59513134",
"0.5949223",
"0.5935746",
"0.5927613",
"0.5927064",
"0.592075",
"0.591696",
"0.5913379",
"0.5910265",
"0.5907403",
"0.59048164",
"0.5897385",
"0.5894006",
"0.589277",
"0.58907396",
"0.5887983",
"0.58840066"
]
| 0.8273378 | 0 |
Returns the location of the tip of the right arm, assuming it is fully extended. Use the displayRightArm() check to see if it is fully extended. | public Location getRightArmEnd() {
final Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);
return r1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public Location getLeftArmEnd() {\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"protected long getRightPosition() {\n return rightPosition;\n }",
"@Override\n\tpublic void buildArmRight() {\n\t\tg.drawLine(70, 50, 100, 80);\n\t}",
"public int getRight(){\n\t\treturn platformHitbox.x+width;\n\t}",
"@Override\r\n\tpublic void BuildArmRight() {\n\t\tg.drawLine(70, 50, 90, 100);\r\n\t}",
"public double getRight() {\n return this.xR;\n }",
"private Point2D.Double rightSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() - Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() - Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public float getRight() {\r\n\t\treturn left + width;\r\n\t}",
"public int getXRight() {\n return getXLeft() + getXLength();\n }",
"public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}",
"public Line getRightLine() {\n\n return new Line(this.getupperRigth(), this.getdownRigth());\n\n }",
"public int getRightX() {\n\t\treturn 0;\r\n\t}",
"private Coordinate tileCoordinateForTileRightAbove(GuiTile tile) {\n\t\treturn new Coordinate(tile.getScreenBottomX() / GuiTile.getScale() + GuiTile.getHalfWidth() + 0.05 * GuiTile.getHalfWidth(),\n\t\t\t\ttile.getScreenBottomY() / GuiTile.getScale() - tile.getMid1Height() - GuiTile.getBaseHeight() - 0.05 * GuiTile.getHalfWidth());\n\t}",
"@Override\r\n\tpublic Trajectory getRightTrajectory() {\n\t\treturn right;\r\n\t}",
"public Location getRight()\n\t{\n\t\tif(checkRight())\n\t\t{\n\t\t\treturn new Location(row,col+1);\n\t\t}\n\t\treturn this;\n\t}",
"public int getRight () {\n\t\treturn right;\n\t}",
"public Point getBottomRight() {\n return location.bottomRight();\n }",
"public float getDistanceToRightPivot() {\n return rightDist;\n }",
"public boolean displayRightArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.rightArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getRightHandPos().getBlock().getLocation().equals(r1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(r1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(r1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location r2 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\tthis.right.clear();\r\n\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(r2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(r2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location r3 = r2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(r3.getBlock()) || !this.canPlaceBlock(r2.getBlock()) || !this.canPlaceBlock(r1.getBlock())) {\r\n\t\t\t\tthis.right.clear();\r\n\t\t\t\tthis.right.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(r3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(r3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.right.clear();\r\n\t\tthis.right.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public double getRightY() {\r\n\t\treturn adjustInput(driverRight.getY());\r\n\t}",
"public Location right() {\n return new Location(row, column + 1);\n\n }",
"private Coordinate tileCoordinateForTileRight(GuiTile tile) {\n\t\treturn new Coordinate(tile.getScreenBottomX() / GuiTile.getScale() + GuiTile.getHalfWidth() * 2 + tileSepWidth(),\n\t\t\t\ttile.getScreenBottomY() / GuiTile.getScale());\n\t}",
"public String getPageRight()\n {\n return \"\";\n }",
"public Location getRangeTopRight() {\n\t\treturn rangeTopRight;\n\t}",
"public int getXTopRight() {\n return xTopRight;\n }",
"public int getRight() {\n\t\treturn this.right;\n\t}",
"@Override\n\tpublic void buildLegRight() {\n\t\tg.drawLine(70, 100, 90, 140);\n\t}",
"@Override\n\t\tpublic PrintNode getRight() {\n\t\t\treturn this.right;\n\t\t}",
"public int getYTopRight() {\n return yTopRight;\n }",
"@Override\r\n\tpublic void BuildLegRight() {\n\t\tg.drawLine(70, 100, 85, 150);\r\n\t}",
"public double getRightDistance() {\n return rightEnc.getDistance();\n }",
"public org.drip.exposure.regression.PillarVertex rightPillar()\n\t{\n\t\treturn _rightPillar;\n\t}",
"public Pixel topRight() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.right;\n }\n }",
"public double getUpperArm() {\n return upperArm;\n }",
"public Ellipse getRightButton() {\n return rightButton;\n }",
"public Coords getLowerRight()\r\n {\r\n return new Coords(x + width, y + height);\r\n }",
"EObject getRight();",
"public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}",
"private Point middleRight() {\n return this.topLeft.add(this.width, this.height / 2).asPoint();\n }",
"public Direction right() {\n\t\treturn right;\n\t}",
"@Override\r\n\tpublic String moveRight() {\n\t\tif((0<=x && x<50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((0<=x && x<50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\telse if((40<=x && x<50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}",
"public double getRightTrigger() {\n\t\treturn getRawAxis(RIGHT_TRIGGER);\n\t}",
"public double getTopRightLat() {\r\n return topRightLat;\r\n }",
"public static Coordinates getTopRightCorner() {\n\t\treturn topRightCorner;\n\t}",
"private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public Object getLocation() {\n return leftSide.getLocation();\n }",
"@Override\r\n\tpublic MoveRightCommand getRight() {\n\t\treturn null;\r\n\t}",
"protected RectF getRightHandleRect() {\n return mRightHandle;\n }",
"public Coords getUpperRight()\r\n {\r\n return new Coords(x + width, y);\r\n }",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"public IAVLNode getRight() {\n\t\t\treturn this.right; // to be replaced by student code\n\t\t}",
"@Override\n\tpublic INode getRight() {\n\t\treturn right;\n\t}",
"public AVLNode<E> getRight() {\r\n\t\treturn right;\r\n\t}",
"private Location[] overrunRight () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == ONE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(myCanvasBounds.getWidth(), getY());\n nextCenter = new Location(0, getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading();\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(getHeading() - THREE_QUARTER_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation =\n new Location(myCanvasBounds.getWidth(), getY() +\n (myCanvasBounds.getWidth() - getX()) /\n Math.tan(angle));\n nextCenter =\n new Location(0, getY() + (myCanvasBounds.getWidth() - getX()) / Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }",
"public int getRightNumber() {\n return rightNumber;\n }",
"public double getRightJoystick() {\n\t\treturn HumanInput.getXboxAxis(HumanInput.xboxController, XboxButtons.XBOX_RIGHT_Y_AXIS);\n\t}",
"@Override\n\tpublic void buildArmLeft() {\n\t\tg.drawLine(60, 50, 30, 80);\n\t}",
"public static char getsRight() {\n\t\t\treturn sRight;\n\t\t}",
"public AST getRight() {\n\t\treturn right;\n\t}",
"public Vector2f getBottomRightCorner() {\n return bottomRightCorner;\n }",
"public Bearing rightFrom() {\n return this.get(((this.bearing + 2) + 8) % 8);\n }",
"private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public double getRightCurrent() {\n return rightMotor.getOutputCurrent();\n }",
"protected double getWindowRightX() {\n\t\treturn this.m_windowRightX;\n\t}",
"public abstract Position<E> getRightRoot();",
"public float getRight() {\n return internalGroup.getRight();\n }",
"public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}",
"public int getRightHandMarginColumn() {\n return canShowRightHandMargin ? rightHandMarginColumn : NO_MARGIN;\n }",
"public double getRightXAxis() {\n\t\treturn getRawAxis(Axis_RightX);\n\t}",
"public Direction right() {\r\n\t\tint newDir = this.index + 1;\r\n\r\n\t\tnewDir = (this.index + 1 == 5) ? 1 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }",
"public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}",
"public abstract String getRightButtonText();",
"public final Vector3d getRight()\n {\n return myDir.cross(myUp).getNormalized();\n }",
"public int getClipRight() {\n return mClipRect.right;\n }",
"public Node getRight () {\r\n\t\treturn right;\r\n\t}",
"public Shape rotateRight()\n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, -y(i));\n\t\t\tresult.setY(i, x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Override\n\tpublic String calculateRightTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"public double getRightJoystickHorizontal() {\n\t\treturn getRawAxis(RIGHT_STICK_HORIZONTAL);\n\t}",
"public Piece[] getRightLine() {\n Piece[] rightLine = new Piece[3];\n for (int i = 0; i < this._board.length; i += 1) {\n rightLine[i] = _board[2][2-i];\n }\n return rightLine;\n }",
"public Entity getShoulderEntityRight ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityRight ( ) );\n\t}",
"public Pixel downRight() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.right;\n }\n }",
"public double getRightJoystickVertical() {\n\t\treturn getRawAxis(RIGHT_STICK_VERTICAL) * -1;\n\t}",
"public LocalAbstractObject getRightPivot() {\n return rightPivot;\n }",
"double getLeftY();",
"public TreeNode getRight() {\n\t\treturn right;\n\t}",
"LogicExpression getRight();",
"public int getSafeInsetRight() {\n if (SDK_INT >= 28) {\n return ((DisplayCutout) mDisplayCutout).getSafeInsetRight();\n } else {\n return 0;\n }\n }",
"public String getRightOperandString()\r\n {\r\n return rightOperand;\r\n }",
"@Override\n\tpublic double getMountedYOffset() {\n\t\treturn (isSitting() ? 1.7f : 2.2f) * getScale();\n\t}",
"public Point getRobotLocation();",
"protected void right() {\n move(positionX + 1, positionY);\n orientation = 0;\n }",
"private int getRightSideTrackSize() {\n if (mR2L) {\n return mProgressTrackSize;\n }\n return mBackgroundTrackSize;\n }",
"public Node getRight() {\n return right;\n }",
"public Node getRight() {\n return right;\n }",
"public Node getRight() {\n return right;\n }",
"public void right () {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return;\n Location loc = getLocation();\n Location next = loc.getAdjacentLocation(Location.EAST);\n if (canMove(next)) {\n moveTo(next);\n }\n }",
"public CellIDExpression getRightCell() {\n\t\treturn rightCell;\n\t}",
"@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}"
]
| [
"0.6960958",
"0.6615943",
"0.6452474",
"0.63081473",
"0.62537235",
"0.6235926",
"0.6200072",
"0.6157059",
"0.6111943",
"0.6091565",
"0.60545623",
"0.6047859",
"0.60348123",
"0.602556",
"0.5970497",
"0.59076416",
"0.5907179",
"0.58950424",
"0.5882902",
"0.5865629",
"0.584867",
"0.5844053",
"0.58081055",
"0.5768849",
"0.576087",
"0.5741863",
"0.5736552",
"0.57209826",
"0.5720227",
"0.5704552",
"0.5675612",
"0.56729954",
"0.5667345",
"0.56593",
"0.56466955",
"0.5644847",
"0.5622571",
"0.55993724",
"0.55727094",
"0.55647236",
"0.55534786",
"0.55515814",
"0.5544645",
"0.5542627",
"0.55373865",
"0.5531963",
"0.55084795",
"0.5499554",
"0.5497808",
"0.5492769",
"0.5484727",
"0.5481659",
"0.5467781",
"0.5465555",
"0.54479384",
"0.54376787",
"0.54293627",
"0.5418756",
"0.5411055",
"0.5406042",
"0.5396888",
"0.53933775",
"0.5386674",
"0.5384216",
"0.53771055",
"0.5369621",
"0.5364974",
"0.53626055",
"0.5362381",
"0.53559774",
"0.53505784",
"0.53466123",
"0.53447783",
"0.5342962",
"0.53383344",
"0.5336375",
"0.5316793",
"0.53136396",
"0.530845",
"0.5296503",
"0.52875483",
"0.52837455",
"0.5281705",
"0.52800053",
"0.52688426",
"0.5265444",
"0.5262167",
"0.5260524",
"0.52557606",
"0.5251646",
"0.5245682",
"0.5241228",
"0.5234089",
"0.52266026",
"0.5219807",
"0.5219807",
"0.5219807",
"0.52168137",
"0.52167964",
"0.52161676"
]
| 0.71322626 | 0 |
Returns the location of the tip of the left arm assuming it is fully extended. Use the displayLeftArm() check to see if it is fully extended. | public Location getLeftArmEnd() {
final Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);
return l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"@Override\r\n\tpublic void BuildArmLeft() {\n\t\tg.drawLine(60, 50, 40, 100);\r\n\t}",
"@Override\n\tpublic void buildArmLeft() {\n\t\tg.drawLine(60, 50, 30, 80);\n\t}",
"private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }",
"public double getLeft() {\n return this.xL;\n }",
"public double getLeft() {\r\n\t\treturn -left.getRawAxis(1);\r\n\t}",
"public boolean displayLeftArm() {\r\n\t\tfinal List<Block> newBlocks = new ArrayList<>();\r\n\t\tif (this.leftArmConsumed) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 1).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!(this.getLeftHandPos().getBlock().getLocation().equals(l1.getBlock().getLocation()))) {\r\n\t\t\tthis.addBlock(l1.getBlock(), GeneralMethods.getWaterData(3), 100);\r\n\t\t\tnewBlocks.add(l1.getBlock());\r\n\t\t}\r\n\r\n\t\tfinal Location l2 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\tif (!this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\tthis.left.clear();\r\n\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.addBlock(l2.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\tnewBlocks.add(l2.getBlock());\r\n\r\n\t\tfor (int j = 1; j <= this.initLength; j++) {\r\n\t\t\tfinal Location l3 = l2.clone().toVector().add(this.player.getLocation().clone().getDirection().multiply(j)).toLocation(this.player.getWorld());\r\n\t\t\tif (!this.canPlaceBlock(l3.getBlock()) || !this.canPlaceBlock(l2.getBlock()) || !this.canPlaceBlock(l1.getBlock())) {\r\n\t\t\t\tthis.left.clear();\r\n\t\t\t\tthis.left.addAll(newBlocks);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tnewBlocks.add(l3.getBlock());\r\n\t\t\tif (j >= 1 && this.selectedSlot == this.freezeSlot && this.bPlayer.canIcebend()) {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.ICE.createBlockData(), 100);\r\n\t\t\t} else {\r\n\t\t\t\tthis.addBlock(l3.getBlock(), Material.WATER.createBlockData(), 100);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.left.clear();\r\n\t\tthis.left.addAll(newBlocks);\r\n\r\n\t\treturn true;\r\n\t}",
"public Line getLeftLine() {\n\n return new Line(this.getUpperLeft(), this.getdownLeft());\n }",
"protected long getLeftPosition() {\n return leftPosition;\n }",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }",
"public Object getLocation() {\n return leftSide.getLocation();\n }",
"public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}",
"public double getLeftX(){\r\n\t\treturn adjustInput(driverLeft.getX());\r\n\t}",
"public Coords getLowerLeft()\r\n {\r\n return new Coords(x, y + height);\r\n }",
"private Location[] overrunLeft () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(0, getY());\n nextCenter = new Location(myCanvasBounds.getWidth(), getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading() - ONE_QUARTER_TURN_DEGREES;\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(THREE_QUARTER_TURN_DEGREES - getHeading());\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(0, getY() + getX() / Math.tan(angle));\n nextCenter = new Location(myCanvasBounds.getWidth(), getY() + getX() /\n Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }",
"public Location getLeft()\n\t{\n\t\tif(checkLeft())\n\t\t{\n\t\t\treturn new Location(row,col-1);\n\t\t}\n\t\treturn this;\n\t}",
"public Location left() {\n return new Location(row, column - 1);\n }",
"@Override\r\n\tpublic Trajectory getLeftTrajectory() {\n\t\treturn left;\r\n\t}",
"public float getLeftRectF () { return atomSpriteBoundary.left; }",
"public Point getLocalPosition() {\n return getLocalLowerLeft();\n }",
"public org.drip.exposure.regression.PillarVertex leftPillar()\n\t{\n\t\treturn _leftPillar;\n\t}",
"@DISPID(-2147417104)\n @PropGet\n int offsetLeft();",
"private static double getLeftStick() {\n\t\treturn (OI.getInstance().leftStick.getY()) * speed;\n\t}",
"public double getLeftDistance() {\n\t\treturn left.getDistance();\n\t}",
"public Lane getLeft() {\r\n\t\treturn left;\r\n\t}",
"@Override\n\tpublic void buildLegLeft() {\n\t\tg.drawLine(60, 100, 40, 140);\n\t}",
"public int getLeftEnc() {\n\t\treturn TalLM.getSelectedSensorPosition(0)-initEncL;\n\t}",
"public float getLeftX() {\n\t\treturn leftX;\n\t}",
"@Override\r\n\tpublic void BuildLegLeft() {\n\t\tg.drawLine(60, 100, 45, 150);\r\n\t}",
"public int getXLeft() {\n return xLeft;\n }",
"@Override\r\n\tpublic String moveLeft() {\n\r\n\t\tif((0<x && x<=50) && (0<=y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (40<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (0<=y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=10) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((0<x && x<=50) && (0<=y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\telse if((40<x && x<=50) && (0<=y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\tx--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}",
"public double getLeftY() {\r\n\t\treturn adjustInput(driverLeft.getY());\r\n\t}",
"public double getLeftDistance() {\n return leftEnc.getDistance();\n }",
"double getLeftY();",
"public MeasurementCSSImpl getLeft()\n\t{\n\t\treturn left;\n\t}",
"public int leftPosion (double degLon){\n double scale = pictureSizePixels/worlSizeMeters;\n return (int) Math.round(xCoordinate(degLon)\n *scale\n +(pictureSizePixels/2));\n }",
"public float getLowerLeftX()\n {\n return ((COSNumber)rectArray.get(0)).floatValue();\n }",
"public double getLeftDistanceInches()\n {\n return rotationsToInches(mLeftMaster.getSensorPositionRotations());\n }",
"@Override\n\tpublic String calculateLeftTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}",
"public double getLeftTrigger() {\n\t\treturn getRawAxis(LEFT_TRIGGER);\n\t}",
"public Point getdownLeft() {\n Point downLeft = new Point(this.upperLeft.getX(), this.upperLeft.getY() + this.getHeight());\n return downLeft;\n }",
"public double getLeft(double min) {\n return Math.min(min, min + (this.length * Math.sin(Math.toRadians(this.theta)))\n ); \n }",
"public IAVLNode getLeft() {\n\t\t\treturn this.left; // to be replaced by student code\n\t\t}",
"public static Pose getHab1CenterLeftStartPose() { rightSide = false; return centerLeftStartPose; }",
"public Pixel topLeft() {\n if (this.up == null) {\n return null;\n }\n else {\n return this.up.left;\n }\n }",
"public XYPoint getSnakeHeadStartLocation();",
"private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }",
"public Point2D getLeftCenterPoint()\n {\n double x = mainVBox.getTranslateX();\n double y = mainVBox.getTranslateY() + (mainVBox.getHeight() / 2);\n return new Point2D(x, y);\n }",
"public double getLeftDistanceInches() {\n return leftEncoder.getDistance();\n }",
"public Shape rotateLeft() \n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, y(i));\n\t\t\tresult.setY(i, -x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public double getLeftCurrent() {\n return leftMotor.getOutputCurrent();\n }",
"protected String getPageLeft()\n {\n return \"\";\n }",
"String getLawnPosition();",
"public double getLeftXAxis() {\n\t\treturn getRawAxis(Axis_LeftX);\n\t}",
"public FPointType calculateUpperLeft() {\n fRectBound = getBounds2D();\n FPointType fptUpperLeft = new FPointType(fRectBound.x, fRectBound.y);\n calculate(fptUpperLeft);\n \n rotateRadian = 0.0f;\n \n return fptUpperLeft;\n }",
"public int getLeftNumber() {\n return leftNumber;\n }",
"public Piece[] getLeftLine() {\n Piece[] leftLine = new Piece[3];\n for (int i = 0; i < this._board.length; i += 1) {\n leftLine[i] = _board[0][2 - i];\n }\n return leftLine;\n }",
"public float getDistanceToLeftPivot() {\n return leftDist;\n }",
"public Entity getShoulderEntityLeft ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityLeft ( ) );\n\t}",
"protected RectF getLeftHandleRect() {\n return mLeftHandle;\n }",
"@Override\r\n\tpublic MoveLeftCommand getLeft() {\n\t\treturn null;\r\n\t}",
"public int getLeft() {\n\t\treturn left;\n\t}",
"public MigAcceptancePolicy getLeftComponent() {\n return leftComponent;\n }",
"public double getLeftJoystickHorizontal() {\n\t\treturn getRawAxis(LEFT_STICK_HORIZONTAL);\n\t}",
"public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}",
"public BigDecimal getLeftAmt() {\n return leftAmt;\n }",
"public AVLNode<E> getLeft() {\r\n\t\treturn left;\r\n\t}",
"public float getLowerLeftY()\n {\n return ((COSNumber)rectArray.get(1)).floatValue();\n }",
"public BigInteger getNumLeft () {\n\t return numLeft;\n\t }",
"public int getPrayerLeft() {\n\t\treturn Integer.parseInt(methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 4).getText());\n\t}",
"public Point getElevatorPosition() {\n return this.elevator.getOrigin();\n }",
"String getPosX();",
"public int getElementHorizontalalAlignmentLeft(WebDriver driver, String xpathUpper, String xpathLower) throws NumberFormatException, IOException {\n\t\tint X = driver.findElement(By.xpath(xpathUpper)).getLocation().getX();\n\t\tint x = driver.findElement(By.xpath(xpathLower)).getLocation().getX();\n\t\tint alignment = Math.abs(X - x);\n\t\tfileWriterPrinter(\"\\n\" + \"HORIZONTAL ALIGNMENT = \" + alignment);\n\t\treturn alignment;\n\t\t}",
"EObject getLeft();",
"@Test\n\t public void processLeftCommands()\n\t {\n\t Rover rover = createFrontFacingRoverAt(0, 0);\n\t rover.executeCommands(\"l\");\n\t assertTrue(0 == rover.facing.x);\n\t assertTrue(-1 == rover.facing.y);\n\n\t }",
"public boolean isleft(){\n\t\tif (x>0 && x<Framework.width && y<Framework.height )//bullet can in the air(no boundary on the top. )\n\t\t\treturn false; \n\t\telse \n\t\t\treturn true; \n\t}",
"public String getItemAmountLeft() {\n return _context.getResources().getString(_context.getResources().getIdentifier(\"item_amount_left\", \"string\", _context.getPackageName()), getItemsLeft(), getTotalItems());\n\n }",
"double leftmost_alien_x() {\n double min_x = scene_width;\n for (Alien alien : aliens) {\n if (alien.x_position < min_x) {\n min_x = alien.x_position;\n }\n }\n return min_x;\n }",
"@Override\n\t\tpublic PrintNode getLeft() {\n\t\t\treturn this.left;\n\t\t}",
"public double getLeftAcceleration() {\n return leftEnc.getAcceleration();\n }",
"public Location getRightArmEnd() {\r\n\t\tfinal Location r1 = GeneralMethods.getRightSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn r1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}",
"public void rotateLeft() {\n // I fucked up? Rotations are reversed, just gonna switch em\n// tileLogic = getRotateLeft();\n tileLogic = getRotateRight();\n// rotateLeftTex();\n rotateRightTex();\n }",
"public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }",
"@Override\n public MPPointF getOffset() {\n return new MPPointF(-(getWidth() / 2.0f), -getHeight() - (getHeight() / 4.0f));\n }",
"private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}",
"public LocalAbstractObject getLeftPivot() {\n return leftPivot;\n }",
"public TableSpec getLeftTable() {\n\t\treturn this.leftTable;\n\t}",
"public int getSizeLeft() {\n return datasPointer - headerPointer;\n }",
"private void rotateLeft() {\n robot.leftBack.setPower(-TURN_POWER);\n robot.leftFront.setPower(-TURN_POWER);\n robot.rightBack.setPower(TURN_POWER);\n robot.rightFront.setPower(TURN_POWER);\n }",
"public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}",
"public int getArmorPoint ()\r\n {\r\n return armorPoint;\r\n }",
"public AlignX getAlignmentX() { return AlignX.Left; }",
"public String playerRealNear(){\r\n\t\tif(AdventureManager.toon.x + 25 > x-50 && AdventureManager.toon.x +25 < x) return \"left\";\r\n\t\telse if(AdventureManager.toon.x +25 < x+100 && AdventureManager.toon.x +25 > x) return \"right\";\r\n\t\telse return \"n\";\r\n\t}",
"public double Left(){\n\t\treturn (x);\n\t}",
"public CellIDExpression getLeftCell() {\n\t\treturn leftCell;\n\t}",
"public Direction left() {\n\t\treturn left;\n\t}",
"public Ellipse getLeftButton() {\n return leftButton;\n }",
"public Point getUpperLeft() {\n return this.upperLeft;\n }",
"public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}"
]
| [
"0.66094446",
"0.63219625",
"0.6301687",
"0.625296",
"0.6090066",
"0.6027619",
"0.6017757",
"0.601579",
"0.5990905",
"0.5988568",
"0.59254676",
"0.5913918",
"0.5862233",
"0.58189017",
"0.5818196",
"0.5800241",
"0.5770938",
"0.5757658",
"0.57510316",
"0.57154673",
"0.57126147",
"0.56860584",
"0.5685373",
"0.56792563",
"0.5677769",
"0.5655248",
"0.56535995",
"0.56533146",
"0.5647455",
"0.5638698",
"0.56320477",
"0.56301963",
"0.5627031",
"0.56099916",
"0.55943185",
"0.55922806",
"0.55822986",
"0.5566589",
"0.5554441",
"0.5535762",
"0.5527582",
"0.5498648",
"0.5490612",
"0.54769635",
"0.54648983",
"0.54532284",
"0.5449289",
"0.54492104",
"0.54415256",
"0.5436822",
"0.5425004",
"0.54167295",
"0.54095817",
"0.5409174",
"0.5407478",
"0.5388583",
"0.5386129",
"0.5379068",
"0.53789073",
"0.5376631",
"0.5361935",
"0.5353963",
"0.5350276",
"0.53456616",
"0.5317849",
"0.53002185",
"0.529397",
"0.5292836",
"0.5292327",
"0.52907807",
"0.5286567",
"0.52822447",
"0.5263859",
"0.5263625",
"0.52607167",
"0.5258788",
"0.5258706",
"0.5258232",
"0.52563995",
"0.52540505",
"0.524749",
"0.52465653",
"0.5233516",
"0.52307165",
"0.52263373",
"0.52243984",
"0.5223036",
"0.52111703",
"0.5207875",
"0.52035767",
"0.52026397",
"0.5196272",
"0.5196159",
"0.51934576",
"0.5189788",
"0.5183209",
"0.5178581",
"0.51745677",
"0.5166037",
"0.5161345"
]
| 0.71581954 | 0 |
Switches the active arm of a player. | public void switchActiveArm() {
if (this.activeArm.equals(Arm.RIGHT)) {
this.activeArm = Arm.LEFT;
} else {
this.activeArm = Arm.RIGHT;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"public void changeActivePlayer() {\n\t\tif(this.getActivePlayer().equals(this.getPlayer1())) {\n\t\t\tthis.setActivePlayer(this.getPlayer2());\n\t\t} else {\n\t\t\tthis.setActivePlayer(this.getPlayer1());\n\t\t}\n\t}",
"public void switchTurns()\n\t{\n\t\tif(current.equals(playerA))\n\t\t\tcurrent = playerB;\n\t\telse\n\t\t\tcurrent = playerA;\n\t}",
"public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }",
"public boolean switchPlayer() {\n\t\t\n\t\t// If player01 is currently active..\n\t\tif(player01.getIsCurrentlyPlaying()){\n\t\t\t\n\t\t\tplayer01.setIsCurrentlyPlaying(false);\n\t\t\tplayer02.setIsCurrentlyPlaying(true);\n\t\t\treturn true;\n\t\t\t// If player02 is currently active..\n\t\t}else {\n\t\t\t\n\t\t\tplayer01.setIsCurrentlyPlaying(true);\n\t\t\tplayer02.setIsCurrentlyPlaying(false);\n\t\t\treturn false;\n\t\t}\n\t}",
"public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}",
"private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }",
"public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }",
"public void exchangeActivePlayer() {\r\n\t\tif (activePlayer.equals(\"black\")) {\r\n\t\t\tdisablePlayer(\"black\");\r\n\t\t\tenablePlayer(\"white\");\r\n\t\t\tt.setText(\"white turn\");\r\n\t\t} else {\r\n\t\t\tdisablePlayer(\"white\");\r\n\t\t\tenablePlayer(\"black\");\r\n\t\t\tt.setText(\"black turn\");\r\n\t\t}\r\n\t}",
"private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }",
"public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}",
"public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }",
"public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }",
"public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }",
"void playerTurn(Player actualPlayer) {\n aiPlayer.chooseAction(actualPlayer);\n actualPlayer.setTheirTurn(false);\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}",
"public void liftArm(){armLifty.set(-drivePad.getThrottle());}",
"private void setArmorPoint (int arm)\r\n {\r\n if (arm < 1 || arm >25)\r\n {\r\n armorPoint = 1;\r\n }\r\n else\r\n {\r\n armorPoint = arm;\r\n }\r\n }",
"public void setActivePlayer(Piece.COLOR activePlayer) {\n this.activePlayer = activePlayer;\n }",
"public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }",
"public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }",
"public void updateSwitches(){\r\n if(this.ar){\r\n this.augmentedReality.setChecked(true);\r\n }else{\r\n this.augmentedReality.setChecked(false);\r\n }\r\n\r\n if(this.easy){\r\n this.easyMode.setChecked(true);\r\n }else{\r\n this.easyMode.setChecked(false);\r\n }\r\n }",
"protected void setArmState(int arm) {\r\n if(arm == KSGripperStates.ARM_UP)\r\n armState = arm;\r\n else if(arm == KSGripperStates.ARM_DOWN)\r\n armState = arm;\r\n }",
"private void changeTurn(){ \r\n\t\tif (currentTurn == 1)\r\n\t\t\tcurrentTurn = 0; \r\n\t\telse\r\n\t\t\tcurrentTurn = 1; \r\n\t}",
"public void setActive(Player p, boolean value) {\n this.getInstance(p).setActive(value);\n }",
"void setPlayerTurn() throws RemoteException;",
"public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }",
"public void changeStatus()\n {\n if(this.isActivate == false)\n {\n this.isActivate = true;\n switchSound.play();\n //this.dungeon.updateSwitches(true); \n }\n else{\n this.isActivate = false;\n switchSound.play(1.75, 0, 1.5, 0, 1);\n //this.dungeon.updateSwitches(false); \n }\n notifyObservers();\n\n }",
"public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}",
"public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}",
"public void arm_up() {\n arm_analog(RobotMap.Arm.arm_speed);\n }",
"private void setPlayerTurn(int turn, Controller controller){\n this.activePlayer = controller.getMainGameModel().getPlayerList().get(turn);\n }",
"public void setActivePlayer(int activePlayer)\n\t{\n\t\tthis.activePlayer = activePlayer;\n\t}",
"public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}",
"public void turnRight() { turn(\"RIGHT\"); }",
"public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"public void changePlayerMode(PlayerMode p) {\n\t\t\r\n\t\tplayerMode = p;\r\n\t\tif (playerMode != PlayerMode.manual) decideMakeAutomaicMove();\r\n\t\t\r\n\t\t\r\n\t}",
"public void turnToPlay(Player opponent) {\n\n }",
"void togglePlay();",
"public void pausePlayer(){\n this.stopRadio();\n }",
"public void turn()\n {\n turn(90);\n }",
"public void enable() {\n TalonHelper.configNeutralMode(Arrays.asList(armMotor, armMotorSlave), NeutralMode.Brake);\n }",
"private void switchPlayer(Player opponentPlayer, Match match) {\r\n if(opponentPlayer.getPlayerId().equals(match.getPlayer1().getPlayerId())){\r\n setCurrentPlayer(match, 1);\r\n } else if (opponentPlayer.getPlayerId().equals(match.getPlayer2().getPlayerId())){\r\n setCurrentPlayer(match, 2);\r\n } else {\r\n LOGGER.error(\"Player not found\");\r\n }\r\n }",
"public void changeTurn(){\n\t\tif (this.turn ==\"blue\")\n\t\t{\n\t\t\tthis.turn = \"red\";\n\t\t\t\n\t\t}else{\n\t\t\tthis.turn =\"blue\";\n\t\t}\n\t}",
"@Override\n\tprotected void execute() {\n\t\tmyLowerArm.set(-0.25);\n\t}",
"public void turnLeft();",
"public void Switch()\n {\n if(getCurrentPokemon().equals(Pokemon1))\n {\n // Change to pokemon2\n setCurrentPokemon(Pokemon2);\n }\n // if my current pokemon is the same as pokemon2\n else if(getCurrentPokemon().equals(Pokemon2))\n {\n // swap to pokemon1\n setCurrentPokemon(Pokemon1);\n }\n }",
"public void arcadeDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t} else {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t}\n\t}",
"public void enableKillSwitch(){\n isClimbing = false;\n isClimbingArmDown = false;\n Robot.isKillSwitchEnabled = true;\n }",
"private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }",
"public void changeTurn() {\n\t\t\n\t\tif(currentTurn == white) {\n\t\t\t\n\t\t\tcurrentTurn = black;\n\t\t}\n\t\telse if(currentTurn == black){\n\t\t\t\n\t\t\tcurrentTurn = white;\n\t\t}\n\t}",
"public void turnLeft() { turn(\"LEFT\"); }",
"public Player switchPlayer(){\n Player player = getGame().getCurrentPlayer();\n\n List<Card> cards = new ArrayList<>();\n\n for(Card card: getGame().getCards()){\n if(card.rule.isValid(getGame().getDices())){\n cards.add(card);\n }\n }\n\n //get the best card\n if(!cards.isEmpty()){\n Card card = takeTheBestCard(cards);\n\n //add it to the player\n player.getCardsWon().add(card);\n getGame().getCards().remove(card);\n\n System.out.println(player.getName() + \" won \" + card.getExplaination());\n getGame().addAction(new Action(player.getName() + \" won \" + card.getExplaination()));\n }\n\n if(getGame().getCards().isEmpty()){\n game.setStatus(Game.GameStatus.COMPLETED);\n getGame().addAction(new Action(bestPlayer().getName() + \" WON THE GAME!!!\"));\n }\n //turn\n getGame().setCountOfTrialForPlayer(0);\n\n game.setIndexOfCurrentPlayer(game.getIndexOfCurrentPlayer()+1);\n\n if(game.getIndexOfCurrentPlayer() == getGame().getPlayers().size()){\n game.setIndexOfCurrentPlayer(0);\n }\n\n game.setCountOfTrialForPlayer(0);\n game.setDices(new ArrayList<>());\n\n return getGame().getCurrentPlayer();\n }",
"public void togglePlay() { }",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"public abstract void turnLeft();",
"public void playerMissedBall(){ active = false;}",
"public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }",
"public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}",
"private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}",
"private void turnClockwise() {\n\t\torientation = TurnAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(orientation);\n\t}",
"@Override\n\tpublic void changeTurn() {\n\t\tcomputerCall();\n\t\tplayerTurn = 1;\n\t}",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public boolean activeFor(String player);",
"protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }",
"public void playTurn() {\r\n\r\n }",
"@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}",
"public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void rotateServos() {\n if (gamepad1.x) { //change to y and x\n left.setPosition(.69); //.63 with other arms\n right.setPosition(.24); //.3 with other arms\n }\n \n if (gamepad1.y) {\n left.setPosition(0);\n right.setPosition(1);\n }\n }",
"public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }",
"@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}",
"public void switchTurn(Player player) {\n\t\t// debugMove(player.color, board);\n\n\t\t// If one player can't make a move, switch who's turn it is...\n\t\tif (noWinnerCount == 1) {\n\t\t\t// This player can't make a move so set it's turn to false\n\t\t\tplayer.setTurn(true);\n\n\t\t\t// Now set the other player's turn to true\n\t\t\tif (player.color == player1.color) {\n\t\t\t\tplayer2.setTurn(false);\n\t\t\t} else {\n\t\t\t\tplayer1.setTurn(false);\n\t\t\t}\n\t\t} else if (noWinnerCount == 3) {\n\t\t\t// If both players can't move, end the game\n\t\t\tif (player2.getScore() > player1.getScore()) {\n\t\t\t\tSystem.out.println(\"Black wins!\");\n\t\t\t} else if (player2.getScore() < player1.getScore()) {\n\t\t\t\tSystem.out.println(\"White wins!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Draw!\");\n\t\t\t}\n\t\t} else {\n\t\t\t// Switch turns\n\t\t\tif (player1.hasTurn()) {\n\t\t\t\tplayer1.setTurn(false);\n\t\t\t\tplayer2.setTurn(true);\n\t\t\t} else {\n\t\t\t\tplayer1.setTurn(true);\n\t\t\t\tplayer2.setTurn(false);\n\t\t\t}\n\t\t}\n\t}",
"public void arm_down() {\n arm_analog(-RobotMap.Arm.arm_speed);\n }",
"private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }",
"public static void runArm() {\r\n\t\t\tsynchronized(ArmClawInfo.clawLock) {\r\n\t\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\t\tPrtYn flag = PrtYn.N;\r\n\t\t\t\t\t\tif(Tm744Opts.isInSimulationMode()) { flag = PrtYn.Y; }\r\n\t\t\t\t\t\tString stg1StatusStr;\r\n//\t\t\t\t\t\tString stg2StatusStr;\r\n\t\t\t\t\t\tDsNamedControlsEntry ent = armStage1.jsNamedControl.getEnt();\r\n\t\t\t\t\t\tdouble jsRdg = ent.getAnalog();\r\n\t\t\t\t\t\tif(Math.abs(jsRdg)>0.1) {\r\n\t\t\t\t\t\t\tint junk = 5; //good breakpoint\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tstg1StatusStr = stageStatusStr(armStage1);\r\n//\t\t\t\t\t\tstg2StatusStr = stageStatusStr(armStage2);\r\n\t\t\t\t\t\tif( ! (stg1StatusStr.equals(prevStg1StatusStr) )) { //&& stg2StatusStr.equals(prevStg2StatusStr))) {\r\n\t\t\t\t\t\t\tP.println(flag, \"(A)stg1: \" + stg1StatusStr);\r\n//\t\t\t\t\t\t\tP.println(flag, \"(A)stg2: \" + stg2StatusStr);\r\n\t\t\t\t\t\t\tprevStg1StatusStr = stg1StatusStr;\r\n//\t\t\t\t\t\t\tprevStg2StatusStr = stg2StatusStr;\r\n\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tTmSdMgr.putString(SdKeysE.KEY_ARM_STAGE1_OPERATING_MODE, armStage1.operatingMode.name());\r\n\t\t\t\t\t\tswitch(armStage1.operatingMode) {\r\n\t\t\t\t\t\tcase JOYSTICK:\r\n\t\t\t\t\t\t\trunLiftStageFromJoystick(armStage1);\r\n\t\t\t\t\t\t\tif(true) {\r\n\t\t\t\t\t\t\t\t//nearTop and nearBottom methods check useEncoder flag\r\n\t\t\t\t\t\t\t\tif(armStage1.isMotorPercentOutMovingUpRapidly() && armStage1.isEncoderNearTop()) {\r\n\t\t\t\t\t\t\t\t\tArmServices.idleAllLiftMotors();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(armStage1.isMotorPercentOutMovingDownRapidly() && armStage1.isEncoderNearBottom()) {\r\n\t\t\t\t\t\t\t\t\tArmServices.idleAllLiftMotors();\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\tbreak;\r\n\t\t\t\t\t\tcase SERVO:\r\n\t\t\t\t\t\t\tif(armStage1.useEncoder || m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\t\trunStageInServoMode(armStage1, Cnst.ARM_STAGE1_ENCODER_ADJUSTMENT_COUNT);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tarmStage1.operatingMode = ArmOperate.OperatingModesE.JOYSTICK;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IDLE:\r\n\t\t\t\t\t\tcase STOPPED:\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t//assume 'request' methods set the motors to the appropriate values\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tstg1StatusStr = stageStatusStr(armStage1);\r\n\t\t\t\t\t\t//\t\t\t\t\t\tstg2StatusStr = stageStatusStr(armStage2);\r\n\t\t\t\t\t\tif( ! (stg1StatusStr.equals(prevStg1StatusStr) )) { //&& stg2StatusStr.equals(prevStg2StatusStr))) {\r\n\t\t\t\t\t\t\tP.println(flag, \"(B)stg1: \" + stg1StatusStr);\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tP.println(flag, \"(B)stg2: \" + stg2StatusStr);\r\n\t\t\t\t\t\t\tprevStg1StatusStr = stg1StatusStr;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tprevStg2StatusStr = stg2StatusStr;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\tswitch(ArmClawInfo.clawCurrentState) {\r\n\t\t\t\t\t\t\tcase BY_JOYSTICK:\r\n\t\t\t\t\t\t\t\tif(m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\t\t\tdouble percOut = 0.0;\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrLeft.set(ControlMode.PercentOutput, percOut);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrRight.set(ControlMode.PercentOutput, -percOut);\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse if(m_tds.isEnabledTeleop()) {\r\n\t\t\t\t\t\t\t\t\tdouble joystickRdg = DsNamedControlsE.ARM_CLAW_RUN_WITH_JOYSTICK_INPUT.getEnt().getAnalog();\r\n\t\t\t\t\t\t\t\t\tif(joystickRdg == 0.0) {} //just a good debug breakpoint\r\n\r\n\t\t\t\t\t\t\t\t\t//squaring makes joysticks easier to use\r\n\t\t\t\t\t\t\t\t\tdouble percOut = - Math.copySign(joystickRdg*joystickRdg, joystickRdg);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrLeft.set(ControlMode.PercentOutput, percOut);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrRight.set(ControlMode.PercentOutput, -percOut);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase GRABBING:\r\n\t\t\t\t\t\t\tcase RELEASING:\r\n\t\t\t\t\t\t\tcase OFF:\r\n\t\t\t\t\t\t\t\t//assume 'request' methods set the motors to the appropriate values\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trunArmClawLiftWheelsTeleop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tpostLimitSwitchRdgsToSd();\r\n\t\t\t\t\t\t//\t\t\t\t\t} //sync for stg2\r\n\t\t\t\t} //sync for stg1\r\n\t\t\t} // sync claw\r\n\t\t}",
"public void switchOn();",
"private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }",
"public void setArmPower(double power) {\n armMotor.setPower(power);\n }",
"@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }",
"public void setActiveLevel(PlayerLevel toSet){\r\n\t\tthis.activeLevel = toSet;\r\n\t}",
"public void playCard(IPlayer owner){\n // Wont play card unless a player has it\n if(command == \"Move1\"){\n owner.Move(owner.getPlayerDir());\n }\n else if(command == \"Move2\"){\n for (Integer i=0; i < 2; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if(command == \"Move3\"){\n for (Integer i=0; i < 3; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if (command == \"MoveBack\"){\n owner.Move(dirCtrl.invertDirection(owner.getPlayerDir()));\n }\n else if(command == \"TurnRight\"){\n owner.Turn(TurnDirection.RIGHT);\n }\n else if(command == \"TurnLeft\"){\n owner.Turn(TurnDirection.LEFT);\n }\n else if(command == \"Turn180\"){\n owner.Turn(TurnDirection.BACKWARDS);\n }\n }",
"@Override\n public void start() {\n\n\n // IF YOU ARE NOT USING THE AUTO MODE\n\n /*\n\n runtime.reset();\n\n ElapsedTime time = new ElapsedTime();\n\n time.reset();\n\n while (time.time() < 1) {\n\n armMotor.setPower(0.5);\n\n }\n\n armMotor.setPower(0);\n\n // get the grabbers ready to grip the blocks\n leftGrab.setPosition(0.9);\n rightGrab.setPosition(0.1);\n\n /*\n time.reset();\n\n while(time.time() < 0.6) {\n\n armMotor.setPower(-0.5);\n\n }\n\n */\n\n\n }",
"boolean setPlayer(String player);",
"public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }",
"private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"public void lift(){\n\t\twhile(Math.abs(robot.lift1.getCurrentPosition()-robot.startingHeight)<3900&&opModeIsActive()){\n\t\t\trobot.lift1.setPower(1);\n\t\t\trobot.lift2.setPower(1);\n\t\t}\n\t\tlift(\"stop\");\n\t}",
"public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }",
"@Override\r\n public void restartAIController() {\r\n this.setController(new ChaserAI(this));\r\n }",
"public abstract void activatedBy(Player player);",
"public void arm_kill() {\n arm_analog(0);\n }",
"public void switchWeapon() {\n\t\tif (type == 0) {\n\t\t\ttype = 1;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} else {\n\t\t\ttype = 0;\n\t\t\tthis.setImage(getFilename(type, held));\n\t\t\tsetFocus();\n\t\t} // end else\n\t}",
"public void changeActiveMonster(){\n //todo\n }",
"public void arm_analog(double speed) {\n if (!get_enabled()) {\n return;\n }\n spark_left_arm.set(RobotMap.Arm.arm_speed_multiplier*speed);\n spark_right_arm.set(RobotMap.Arm.arm_speed_multiplier*speed);\n }",
"public void setCurrentPlayerWord(String currentActivePlayer, String word) {\n\t\t\n\t\tif(currentActivePlayer.equals(\"Player 01: \")) {\n\t\t\t\n\t\t\tplayer01.setCurrentWord(word);\n\t\t}else {\n\t\t\t\n\t\t\tplayer02.setCurrentWord(word);\n\t\t}\n\t\t\n\t}",
"public void play(Player p) {\n\t\tthis.player=p;\n\t\tplayer.setActualRoom(this.currentRoom);\n\t\twhile (!this.isFinished()) {\n\t\t\tthis.currentRoom=p.getActualRoom();\n\t\t\tif (this.GameOver()) {\n\t\t\t\tSystem.out.println(\"You LOOSE !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (this.isFinished()) {\n\t\t\t\tSystem.out.println(\"You WIN !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tp.act();\n\t\t}\n\t\tif (this.isFinished()) {\n\t\t\tSystem.out.println(\"You WIN !\");\n\t\t}\n\t\n\t\t\n\t}",
"private void updateActivePlayer() {\n indexOfActivePlayer++;\n if (indexOfActivePlayer == players.size()) {\n String previousPlayer = players.get(indexOfActivePlayer - 1).getName();\n Collections.shuffle(players);\n while (players.get(0).getName() == previousPlayer) {\n Collections.shuffle(players);\n }\n indexOfActivePlayer = 0;\n }\n }"
]
| [
"0.6512988",
"0.6317291",
"0.6307103",
"0.6120996",
"0.611928",
"0.6088446",
"0.60702765",
"0.59555143",
"0.5946247",
"0.59373266",
"0.5924953",
"0.5859844",
"0.5801573",
"0.5785851",
"0.57549095",
"0.57451403",
"0.5706767",
"0.56890935",
"0.5687892",
"0.5679889",
"0.56716686",
"0.56547713",
"0.5615774",
"0.5608109",
"0.5584638",
"0.5573421",
"0.5571915",
"0.55624497",
"0.5552535",
"0.5547197",
"0.55390716",
"0.55164087",
"0.55099934",
"0.5501003",
"0.54907924",
"0.54591465",
"0.54506904",
"0.54359007",
"0.54201883",
"0.5414402",
"0.54039234",
"0.54006505",
"0.54004866",
"0.5394027",
"0.5391261",
"0.5381629",
"0.5380221",
"0.53683233",
"0.53626543",
"0.53373474",
"0.53289014",
"0.5312991",
"0.53107446",
"0.5310152",
"0.5309094",
"0.53068894",
"0.53048205",
"0.5303586",
"0.53013724",
"0.52988434",
"0.5294235",
"0.5292312",
"0.5291805",
"0.5287886",
"0.5285427",
"0.5280488",
"0.52791077",
"0.52700615",
"0.526772",
"0.52625036",
"0.52458924",
"0.52357394",
"0.5235721",
"0.5218333",
"0.51959944",
"0.51886016",
"0.51881754",
"0.5187791",
"0.51837164",
"0.5183664",
"0.5173266",
"0.517045",
"0.5168684",
"0.5168582",
"0.51425046",
"0.51379395",
"0.5134848",
"0.5130582",
"0.5122322",
"0.51213294",
"0.51107574",
"0.51049095",
"0.50991046",
"0.5098314",
"0.50896037",
"0.5088362",
"0.5087727",
"0.50875825",
"0.50777286",
"0.50769144"
]
| 0.785271 | 0 |
Bullets on top of node > store Other bullets > tick stored bullets > process and output all bullets > check | public void tick() {
boolean shouldHaltAfterTick = false;
List<Pair<Movement, Bullet>> movements = new ArrayList<>();
//Bullets on nodes
Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);
capturedBullets.keySet().retainAll(nodes.keySet());
//Bullets not on nodes
Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);
freeBullets.keySet().removeAll(capturedBullets.keySet());
//Generate movements for free bullets
for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {
Bullet bullet = entry.getValue();
Coordinate coord = entry.getKey();
Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);
movements.add(new Pair<>(new Movement(coord, newCoord), bullet));
}
//Update captured bullets
for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {
Coordinate coordinate = entry.getKey();
INode node = nodes.get(coordinate);
// special case
if (node instanceof NodeHalt)
shouldHaltAfterTick = true;
//TODO this brings great shame onto my family
Direction bulletDirection = entry.getValue().getDirection();
Direction dir = Direction.UP;
while (dir != node.getRotation()) {
dir = dir.clockwise();
bulletDirection = bulletDirection.antiClockwise();
}
Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());
Map<Direction, BigInteger> bulletParams = node.run(bullet);
for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {
//TODO this too
bulletDirection = newBulletEntry.getKey();
dir = Direction.UP;
while (dir != node.getRotation()) {
dir = dir.clockwise();
bulletDirection = bulletDirection.clockwise();
}
Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());
Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);
Movement movement = new Movement(coordinate, newCoordinate);
movements.add(new Pair<>(movement, newBullet));
}
}
//Remove swapping bullets
List<Movement> read = new ArrayList<>();
Set<Coordinate> toDelete = new HashSet<>();
for (Pair<Movement, Bullet> pair : movements) {
Movement movement = pair.getKey();
Coordinate from = movement.getFrom();
Coordinate to = movement.getTo();
boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));
if (foundSwaps) {
toDelete.add(from);
toDelete.add(to);
}
read.add(movement);
}
movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));
//Remove bullets that end in the same place
read.clear();
toDelete.clear();
for (Pair<Movement, Bullet> pair : movements) {
Movement movement = pair.getKey();
Coordinate to = movement.getTo();
boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));
if (foundSameFinal) {
toDelete.add(to);
}
read.add(movement);
}
movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));
//Move bullets
Map<Coordinate, Bullet> newBullets = new HashMap<>();
for (Pair<Movement, Bullet> pair : movements) {
Movement movement = pair.getKey();
Bullet bullet = pair.getValue();
newBullets.put(movement.getTo(), bullet);
}
bullets.clear();
bullets.putAll(newBullets);
if (shouldHaltAfterTick)
halt();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}",
"public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }",
"public void drawBullet(){\n if (classOfObejct == 0){\n colorMode(RGB,255,255,255);\n noStroke();\n fill(255,100,30);\n ellipse(posX, posY, 6, 9);\n fill(255,153,51);\n ellipse(posX,posY, 4, 6);\n fill(255,255,100);\n ellipse(posX,posY, 2, 3);\n fill(255,255,200);\n ellipse(posX,posY, 1, 1);\n stroke(1);\n }\n else{\n colorMode(RGB,255,255,255);\n noStroke();\n fill(51,153,255);\n ellipse(posX, posY, 8, 8);\n fill(102,178,255);\n ellipse(posX,posY, 6, 6);\n fill(204,229,255);\n ellipse(posX,posY, 4, 4);\n fill(255,255,255);\n ellipse(posX,posY, 2, 2);\n stroke(1);\n }\n }",
"public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }",
"public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}",
"public boolean IsBullet()\r\n {\r\n return this.isBullet;\r\n }",
"private void quickFireBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Pink\"));\n\t}",
"public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }",
"void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}",
"public void setBullet (boolean flag) {\n\t\tbody.setBullet(flag);\n\t}",
"void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}",
"public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}",
"public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }",
"private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }",
"@Override\n\tpublic void onCreateBulletEvent() {\n\t\tcreateBullet();\n\t}",
"public void shoot(ArrayList<Bullet> alienBullets)\r\n\t{\r\n\t\t//do nothing usually\r\n\t}",
"boolean testBulletExplode(Tester t) {\n return t.checkExpect(\n new Bullet(2, Color.PINK, new MyPosn(50, 50), new MyPosn(0, -8), 1).explode(),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new MyPosn(50, 50), new MyPosn(8, 0), 2),\n new ConsLoGamePiece(new Bullet(4, Color.PINK, new MyPosn(50, 50), new MyPosn(-8, 0), 2),\n this.mt)))\n && t.checkExpect(\n new Bullet(4, Color.PINK, new MyPosn(100, 100), new MyPosn(0, 4), 2).explode(),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(4, 0), 3),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(-2, 3), 3),\n new ConsLoGamePiece(\n new Bullet(6, Color.PINK, new MyPosn(100, 100), new MyPosn(-2, -3), 3),\n this.mt))))\n && t.checkExpect(\n new Bullet(2, Color.PINK, new MyPosn(50, 50), new MyPosn(0, -8), -1).explode(),\n new MtLoGamePiece());\n }",
"public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }",
"public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }",
"public void setBullet(Bullet bullet) {\r\n\t\tthis.bullet = bullet;\r\n\t}",
"public void setBulletsFired(ArrayList<Bullet> bullets) {\n if(!bulletsFired.isEmpty()) {\n //System.out.println(bullets.get(0).getxPos() != bulletsFired.get(0).getxPos());\n this.bulletsFired = bullets;\n }\n }",
"@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }",
"public void moveBullets() {\n bController.increment();\n }",
"boolean testDrawBullet(Tester t) {\n return t.checkExpect(bullet1.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink))\n && t.checkExpect(bullet2.draw(), new CircleImage(2, OutlineMode.SOLID, Color.pink));\n }",
"public void fireBullet(){\n\t\tBullet bullet = new Bullet(ship);\n\t\tbullets.add(bullet);\n\t\tsoundMan.playBulletSound();\n\t}",
"@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }",
"protected void cleanBullets() {\n Set<Bullet> recyclable = new HashSet<Bullet>();\n for (Bullet bullet : this.bullets) {\n bullet.update();\n if (bullet.getPositionY() < SEPARATION_LINE_HEIGHT\n || bullet.getPositionY() > this.height)\n recyclable.add(bullet);\n }\n this.bullets.removeAll(recyclable);\n //BulletPool.recycle(recyclable);\n }",
"public void cleanUpBullets() {\n for (int i = 0; i < this.bullets.size(); i++) {\n if (!this.bullets.get(i).visible) {\n this.bullets.remove(i);\n }\n }\n }",
"public void setBulletintype(Integer bulletintype) {\n this.bulletintype = bulletintype;\n }",
"boolean testPlaceBullet(Tester t) {\n return t.checkExpect(bullet1.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 250, 300))\n && t.checkExpect(bullet2.place(this.em),\n em.placeImageXY(new CircleImage(2, OutlineMode.SOLID, Color.PINK), 600, 600));\n }",
"public void detectCollisionPerBullet() {\n//\t\tfor (Bullet bullet : bulletList) {\n\t\tfor (int i=0; i<bulletList.size(); i++) {\n\t\t\tBullet bullet = bulletList.get(i);\n\t\t\tif (bullet != null && !bullet.isDead()) {\n\t\t\t\tdetectCollision(bullet);\n\t\t\t}\n\t\t}\n\t}",
"public void fireBullet(int direction , int posX, int posY ){\n if ( clockBullet.getElapsedTime().asMilliseconds() > 100 ){\n int lowestbulletNo = 10;\n for( int i = 9; i > 0; i-- ){\n if ( bulletSpace.get(i).isEnabled() == false){\n lowestbulletNo = i;//find the first bullet in the gun barrol\n }\n }\n\n if ( lowestbulletNo < 10 ){\n bulletSpace.get(lowestbulletNo).setDirection(direction);\n bulletSpace.get(lowestbulletNo).setDistance(0);\n bulletSpace.get(lowestbulletNo).setPosX(posX - map.getX()) ;\n bulletSpace.get(lowestbulletNo).setPosY(posY - map.getY()) ;\n bulletSpace.get(lowestbulletNo).enabled(true);\n bulletSpace.get(lowestbulletNo).setRotation(direction+1);\n }\n }\n clockBullet.restart();\n }",
"boolean testPlaceAllBullets(Tester t) {\n return t.checkExpect(this.lob3.placeAll(this.em),\n em.placeImageXY(bullet1.draw(), 250, 300).placeImageXY(bullet8.draw(), 50, 50)\n .placeImageXY(bullet9.draw(), 50, 50))\n && t.checkExpect(this.mt.placeAll(this.em), this.em);\n }",
"private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}",
"@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}",
"public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}",
"private void killBullet() {\r\n this.dead = true;\r\n }",
"public Bullet() {\n super();\n }",
"public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }",
"public boolean isBullet () {\n\t\treturn body.isBullet();\n\t}",
"public void mousePressed(MouseEvent e){\n\t\t\t t.bullets.add(new Bullet(t.theta, t.lx, t.ly));\t\n\t\t}",
"@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }",
"public static void checkAvatarBulletCollision(List<Node> aB, Node fE, Node sE, Node tE, Node foE, Node fiE, Node siE, Node seE, Node eiE, Node niE, Node tenE, Node eleE, Node tweE, Node thE, Node fouE, Node fifE, Pane p)\r\n\t{\r\n\t\tfor(Node avatarBullet : aB)\r\n\t\t{\r\n\t\t\tif(fE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\t//remove enemy\r\n\t\t\t\tfE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fE);\r\n\t\t\t\tsetEnemyOne(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(sE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tsE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(sE);\r\n\t\t\t\tsetEnemyTwo(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tE);\r\n\t\t\t\tsetEnemyThree(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(foE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfoE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(foE);\r\n\t\t\t\tsetEnemyFour(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fiE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fiE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(siE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tsiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(siE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(seE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tseE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(seE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(eiE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\teiE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(eiE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(niE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tniE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(niE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tenE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttenE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tenE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(eleE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\teleE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(eleE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(tweE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\ttweE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(tweE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(thE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tthE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(thE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fouE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfouE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fouE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t\tif(fifE.getBoundsInParent().intersects(avatarBullet.getBoundsInParent()))\r\n\t\t\t{\r\n\t\t\t\tfifE.setTranslateX(-200);\r\n\t\t\t\tp.getChildren().remove(fifE);\r\n\t\t\t\tsetEnemyFive(true);\r\n\t\t\t\tplayerScore++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void clearBullet()\n {\n if(playerBullets.size() > 0)\n {\n for(int i = 0; i < playerBullets.size(); ++i)\n {\n int x = playerBullets.get(i).getRectangle().centerX(), y = playerBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n playerBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n if(enemyBullets.size() > 0)\n {\n for(int i = 0; i < enemyBullets.size(); ++i)\n {\n int x = enemyBullets.get(i).getRectangle().centerX(), y = enemyBullets.get(i).getRectangle().centerY();\n if (y <= 0 || y >= Constants.SCREEN_HEIGHT || x <= 0 || x >= Constants.SCREEN_WIDTH)\n {\n enemyBullets.remove(i);\n --i;\n SFX_Manager.impact();\n }\n }\n }\n }",
"@Test\r\n public void testCheckCollisionBulletsBlocks() {\r\n\r\n ArrayList<Bullet> bullets = new ArrayList<>();\r\n bullets.add(new Bullet(10, 10, 0, true));\r\n assertEquals(bullets.get(0).vis, true);\r\n CollisionUtility.checkCollisionBulletsBlocks(bullets, inblocks);\r\n assertEquals(bullets.get(0).vis, false);\r\n assertEquals(inblocks.get(0).vis, false);\r\n inblocks.add(new Steel(20, 20));\r\n bullets.add(new Bullet(20, 20, 0, false));\r\n CollisionUtility.checkCollisionBulletsBlocks(bullets, inblocks);\r\n assertEquals(bullets.get(1).vis, false);\r\n assertEquals(inblocks.get(1).vis, true);\r\n\r\n }",
"private void placeBullet(double x, double y) {\r\n\t\tb = new Bullet(x, y);\r\n\t\taddParticipant(b);\r\n\t\tb.setVelocity(BULLET_SPEED, ship.getRotation());\r\n\t\tnew ParticipantCountdownTimer(b, \"expire\", BULLET_DURATION);\r\n\t}",
"public void createBullet(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player != null) {\r\n Bullet bullet = new Bullet(x, y);\r\n bullet.player = name;\r\n playAudio(\"shoot\");\r\n }\r\n }",
"@Test\n\tpublic void bullet_test_02() {\n\t\tString text = \"* bullet\\n* bullet\";\n\t\tassertEquals(\"<html><ul><li>bullet</li><li>bullet</li></ul></html>\", createHTML(text));\n\t}",
"public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }",
"public void afficherBulletins() {\n\t\tSystem.out.println(\"===== Historique des bulletins meteo =====\\n\");\n\t\tfor (BulletinMeteo bulletin : this.bulletinsMeteo) { // this.bulletinsMeteo est la collection d'objets\n\t\t\tSystem.out.println(bulletin.toString()); // element joue\n\t\t}\n\t}",
"public StockEvent setShowBullet(Boolean showBullet) {\n this.showBullet = showBullet;\n return this;\n }",
"@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tshootBullet(arg0);\r\n\t\t\t}",
"public void placeAlienBullet() {\r\n\t\tif (alien != null) {\r\n\t\t\t// If the alien is large fires a bullet in a random direction\r\n\t\t\tif (alien.getSize() == 1 && ship != null) {\r\n\r\n\t\t\t\t// Create the alien bullet\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\r\n\t\t\t\t// give the alien bullet a random direction and the bullet speed velocity,\r\n\t\t\t\t// then add as participant\r\n\t\t\t\tdouble r = (2 * Math.PI) * RANDOM.nextDouble();\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, r);\r\n\t\t\t\taddParticipant(ab);\r\n\r\n\t\t\t\t// Sets the alien bullet to expire when it reaches the bullet duration time\r\n\t\t\t\t// limit\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\r\n\t\t\t// If the alien is small fires a bullet aimed directly at the ship\r\n\t\t\tif (alien.getSize() == 0 && ship != null) {\r\n\t\t\t\tab = new AlienBullet(alien.getX(), alien.getY());\r\n\t\t\t\tab.setSpeed(BULLET_SPEED);\r\n\r\n\t\t\t\t// Aims the alien bullet directly at the ship\r\n\t\t\t\tdouble A = ship.getY() - alien.getY();\r\n\t\t\t\tdouble B = ship.getX() - alien.getX();\r\n\t\t\t\tdouble angle = Math.atan2(A, B);\r\n\t\t\t\tab.setVelocity(BULLET_SPEED, angle);\r\n\r\n\t\t\t\t// Add the alien bullet as a participant and then set it to expire when it\r\n\t\t\t\t// reaches the bullet duration time limit\r\n\t\t\t\taddParticipant(ab);\r\n\t\t\t\tnew ParticipantCountdownTimer(ab, \"expire\", BULLET_DURATION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n public int fire() {\r\n if (this.getBulletsCount() == 0) {\r\n return 0;\r\n }\r\n this.setBulletsCount(this.getBulletsCount() - 10);\r\n return 10;\r\n }",
"public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }",
"public Bullet getBullet() {\n\t\treturn bullet;\n\t}",
"public Bullet() {\n\t\t\n\t\tx = 0;\n\t\ty = 0;\n\t\timgBullet = new ImageIcon(getClass().getResource(\"lu.png\"));\n\t\twidth=imgBullet.getIconWidth();\n\t\theight=imgBullet.getIconHeight();\n\t\tshot = false;\n\t\n\t}",
"public void setBullet(Bullet _bul) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n bul = _bul;\n }",
"protected ArrayList<Bullet> getBullets()\r\n\t{\r\n\t\treturn bullets;\r\n\t}",
"@Override\n public List<Bullet> tick(List<Creep> creeps, boolean levelInProgress) {\n timeToNextShot--;\n List<Bullet> fired = null;\n if(imageRotates || timeToNextShot <= 0) {\n // The creeps are sorted by the default creep comparator in Clock, so that they don't\n // have to be resorted for any tower left on the default (which is often most of them)\n if(!creepComparator.getClass().equals(DEFAULT_CREEP_COMPARATOR.getClass())) {\n // Make a copy so it can be sorted\n creeps = new ArrayList<Creep>(creeps);\n Collections.sort(creeps, creepComparator);\n }\n // If the image rotates, this needs to be done to find out the direction to rotate to\n fired = fireBullets(creeps);\n }\n if (timeToNextShot <= 0 && fired != null && fired.size() > 0) {\n timeToNextShot = fireRate;\n // Use bulletsToAdd as some towers launch bullets between ticks\n bulletsToAdd.addAll(fired);\n }\n List<Bullet> bulletsToReturn = bulletsToAdd;\n bulletsToAdd = new ArrayList<Bullet>();\n return bulletsToReturn;\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tArrayList msDOWN = GameCraft.getBulletDOWN();\r\n\t\tfor (int i = 0; i < msDOWN.size(); i++) {\r\n\t\t\tBulletDOWN m = (BulletDOWN) msDOWN.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveDOWN();\r\n\t\t\telse msDOWN.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msUP = GameCraft.getBulletUP();\r\n\t\tfor (int i = 0; i < msUP.size(); i++) {\r\n\t\t\tBulletUP m = (BulletUP) msUP.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveUP();\r\n\t\t\telse msUP.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msLEFT = GameCraft.getBulletLEFT();\r\n\t\tfor (int i = 0; i < msLEFT.size(); i++) {\r\n\t\t\tBulletLEFT m = (BulletLEFT) msLEFT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveLEFT();\r\n\t\t\telse msLEFT.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msRIGHT = GameCraft.getBulletRIGHT();\r\n\t\tfor (int i = 0; i < msRIGHT.size(); i++) {\r\n\t\t\tBulletRIGHT m = (BulletRIGHT) msRIGHT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveRIGHT();\r\n\t\t\telse msRIGHT.remove(i);\r\n\t\t}\r\n\t\t\r\n\t\tArrayList msEnemys = GameCraft.getEnemys();\r\n\t\tif(moveamount >= 150){\r\n\t\t\tfor (int i = 0; i < msEnemys.size(); i++) {\r\n\t\t\t\tEnemys m = (Enemys) msEnemys.get(i);\r\n\t\t\t\tif (m.isVisible()){\r\n\t\t\t\t\tm.moveMe();\r\n\t\t\t\t}else{ \r\n\t\t\t\t\tmsEnemys.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmoveamount = 0;\r\n\t\t}\r\n\t\tmoveamount++;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int a = 0; a < msDOWN.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletDOWN bdown = (BulletDOWN) msDOWN.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bdown.getX();\r\n\t\t\t\tint ybul = bdown.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msRIGHT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletRIGHT bright = (BulletRIGHT) msRIGHT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bright.getX();\r\n\t\t\t\tint ybul = bright.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msLEFT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletLEFT bleft = (BulletLEFT) msLEFT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bleft.getX();\r\n\t\t\t\tint ybul = bleft.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int a = 0; a < msUP.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletUP bup = (BulletUP) msUP.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bup.getX();\r\n\t\t\t\tint ybul = bup.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tEnemy 500 500\r\n\t\tBullet 510 510\r\n\t\t510 < 500 && 480 < 500 || 500 > 510 && 500 > 480\r\n\t\t500 > 320 && 500 > 380\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t////////////\r\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tGameCraft.move();\r\n\t\trepaint(); \r\n\t}",
"boolean testPlaceAllAccBullets(Tester t) {\n return t.checkExpect(this.lob3.placeAllAcc(this.em),\n em.placeImageXY(bullet1.draw(), 250, 300).placeImageXY(bullet8.draw(), 50, 50)\n .placeImageXY(bullet9.draw(), 50, 50))\n && t.checkExpect(\n this.lob1.placeAllAcc(\n this.em.placeImageXY(bullet8.draw(), 50, 50).placeImageXY(bullet9.draw(), 50, 50)),\n em.placeImageXY(bullet1.draw(), 250, 300).placeImageXY(bullet8.draw(), 50, 50)\n .placeImageXY(bullet9.draw(), 50, 50))\n && t.checkExpect(this.mt.placeAllAcc(new WorldScene(400, 800)), new WorldScene(400, 800));\n }",
"public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }",
"@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }",
"public void emptyBullets() {\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n bossBullets.remove(i);\n }\n }",
"public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }",
"public Bullet getBullet() {\r\n\t\treturn this.bullet;\r\n\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void drawListEntity(ArrayList list) {\n\t\tArrayList listRemove = new ArrayList();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tEntity ent = (Entity) list.get(i);\n\t\t\t\n\t\t\tdrawEntity(ent);\n\t\t\t\n\t\t\t// if the entity is still in the screen, update its position\n\t\t\tif (ent.continueDrawing()) {\n\t\t\t\tif (ent instanceof Bullet) {\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"enemy_bullet\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 8);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"laser\")) {\n\t\t\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"boss_bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Enemy) {\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 5);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 3);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\t\t\tif (ent.getX() <= 0)\n\t\t\t\t\t\t\tbossMovement = 3;\n\t\t\t\t\t\tif (ent.getX() >= displayWidth - ((Enemy) ent).getSprite().getWidth())\n\t\t\t\t\t\t\tbossMovement = -3;\n\t\t\t\t\t\tif (ent.getY() <= 30)\n\t\t\t\t\t\t\tent.setY(ent.getY() + 1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tent.setX(ent.getX() + bossMovement);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Explosion) {\n\t\t\t\t\tif (((Explosion) ent).getName().equals(\"player_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX());\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY());\n\t\t\t\t\t} else if (((Explosion) ent).getName().equals(\"enemy_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX() - 5);\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY() - 5);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Powerup) {\n\t\t\t\t\tent.setY(ent.getY() + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if the entity is outside of the screen, remove it\n\t\t\telse {\n\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\n\t\t\t\t// handles the boss explosions\n\t\t\t\thandleBossExplosions(list, listRemove, i);\n\t\t\t}\n\t\t\t\n\t\t\t// if the player is dead, notify the player of death\n\t\t\tif (stopDrawingPlayer || gameWon) {\n\t\t\t\tnotifyGameOver();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < listRemove.size(); i++) {\n\t\t\tlist.remove(listRemove.get(i));\n\t\t}\n\t\tlistRemove.clear();\n\t}",
"public ImageIcon getBullet() {\n\t\treturn imgBullet;\n\t}",
"void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }",
"public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }",
"private void doLists () {\n char lastListChar = ' ';\n char thisListChar = ' ';\n\n // Determine how deeply lists are nested\n int listDepth = context.lastListChars.length();\n if (listChars.length() > listDepth) {\n listDepth = listChars.length();\n }\n\n // Determine how deeply we are maintaining existing lists with new line\n int listCharsMatchingDepth = 0;\n for (int i = 0; i < listDepth; i++) {\n thisListChar = charAt (listChars.toString(), i);\n lastListChar = charAt (context.lastListChars, i);\n if (thisListChar == lastListChar) {\n listCharsMatchingDepth = i + 1;\n }\n }\n\n // Where list characters don't match, end any lists in progress\n for (int i = listDepth - 1; i >= listCharsMatchingDepth; i--) {\n lastListChar = charAt (context.lastListChars, i);\n if (lastListChar == '*') {\n lineInsert (\"</li>\");\n lineInsert (\"</ul>\");\n }\n else\n if (lastListChar == '#') {\n lineInsert (\"</li>\");\n lineInsert (\"</ol>\");\n }\n else\n if (lastListChar == ';') {\n lineInsert (closeDefinitionTag(lastDefChar));\n lastDefChar = ' ';\n lineInsert (\"</dl>\");\n }\n }\n\n // Where list characters don't match, start any new lists needed\n for (int i = listCharsMatchingDepth; i < listDepth; i++) {\n thisListChar = charAt (listChars.toString(), i);\n StringBuffer listStart = new StringBuffer();\n if (thisListChar == '*') {\n listStart.append (\"ul\");\n }\n else\n if (thisListChar == ';') {\n listStart.append (\"dl\");\n } else {\n listStart.append (\"ol\");\n }\n if (klass.length() > 0) {\n listStart.append (\" class=\\\"\" + klass + \"\\\"\");\n }\n if (thisListChar == '*') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == '#') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == ';') {\n lineInsert (\"<\" + listStart.toString() + \">\");\n lineInsert (openDefinitionTag(thisListChar));\n }\n }\n\n // If List characters all match, then continue list in process\n if (listCharsMatchingDepth == listDepth && listDepth > 0) {\n if (thisListChar == ';') {\n lineInsert (closeDefinitionTag(lastDefChar));\n lastDefChar = ' ';\n lineInsert (\"<dt>\");\n } else {\n lineInsert (\"</li>\");\n lineInsert (\"<li>\");\n }\n }\n\n // If some lists ended, but some continuing, start new list item\n if (listCharsMatchingDepth > 0\n && listCharsMatchingDepth < listDepth) {\n thisListChar = charAt (listChars.toString(), listCharsMatchingDepth - 1);\n if (thisListChar == '*') {\n lineInsert (\"<li>\");\n }\n else\n if (thisListChar == '#') {\n lineInsert (\"<li>\");\n } else\n if (thisListChar == ';') {\n lineInsert (openDefinitionTag(thisListChar));\n }\n }\n\n // Save latest list characters\n context.lastListChars = listChars.toString();\n }",
"@Override\n public void draw(Bullet b){\n Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, b.fin());\n Fill.circle(b.x, b.y, 3f * b.fout());\n Draw.reset();\n }",
"@Override\r\n public void init(GameContainer gc) throws SlickException {\r\n\r\n \tbulletsToRemove = new ArrayList<Body>();\r\n \tbulletsToAdd = new ArrayList<Float[]>();\r\n \tbulletList = new ArrayList<Bullet>();\r\n \t\r\n \t//Set camera coordinates and size.\r\n viewport = new Rectangle(0, 0, 1024, 600);\r\n \r\n //Load our map. (Made in a program called TILED)\r\n map1 = new TiledMap(\"data/2.tmx\");\r\n \r\n \r\n //Create our World, enter a gravity (100 default, bullets have a gravity variable of this*0.05)\r\n Vec2 gravity = new Vec2(0, 100);\r\n world = new World(gravity);\r\n \r\n //Create 2 players.\r\n //Player 1\r\n player1 = new Player(5, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player1.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n //Player 2\r\n player2 = new Player(15, 180, 4, 12, 11, 40, 40, \"data/temp2.png\", 50);\r\n player2.getAnimation(Player.IDLE_LEFT).start();\r\n \r\n hpbar = new Image(\"data/healthbar.png\");\r\n \r\n //If we want multiplayer, connect to the server.\r\n if(multiplayer) {\r\n \t//Connecting to someone\r\n \tisHosting = false;\r\n \tmyPlayer = player2;\r\n \thisPlayer = player1;\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Connected to server\";\r\n }\r\n else {\r\n \t//Connecting to ourselfs\r\n \tisHosting = true;\r\n \tmyPlayer = player1;\r\n \thisPlayer = player2;\r\n \tnew BFServer(true);\r\n \tthisClient = new BFClient(myPlayer, hisPlayer, host, port);\r\n \tstatus = \"Local server online\";\r\n }\r\n \r\n //Set player2's friction to only about half of ours, this will reduce \"lag\" and simulate running better.\r\n FixtureDef fd = hisPlayer.getFixture();\r\n fd.friction = 2;\r\n hisPlayer.getBody().createFixture(fd);\r\n \r\n //Get collision layer from map\r\n int collisionLayerIndex = map1.getLayerIndex(\"collision\");\r\n\r\n //Create our collision blocks in the physics engine.\r\n for(int row=0; row<map1.getWidth(); row++) {\r\n \tfor(int col=0; col<map1.getHeight(); col++) {\r\n \t\tif(map1.getTileId(row, col, collisionLayerIndex)==1) {\r\n \t\t\tBodyDef groundBodyDef = new BodyDef();\r\n \t\t\tgroundBodyDef.position.set(row*2, col*2);\r\n \t\t\tBody groundBody = world.createBody(groundBodyDef);\r\n \t\t\tPolygonShape groundBox = new PolygonShape();\r\n \t\t\tgroundBox.setAsBox(1, 1, new Vec2(1, 1), 0);\r\n \t\t\tgroundBody.createFixture(groundBox, 0);\r\n \t\t}\r\n \t}\r\n }\r\n \r\n\r\n //Setup physics world\r\n timeStep = 1.0f/60.0f;\r\n velocityIterations = 6;\r\n positionIterations = 2;\r\n \r\n //Add a new collision listener to our world.\r\n world.setContactListener(new BFContactListener());\r\n \r\n //Add Keylistener to our GameContainer.\r\n gc.getInput().addKeyListener(keylistener);\r\n \r\n //Physics debug draw. (DEPRECATED. I'm using JBox2d-2.3.0 SNAPSHOT, this debugdraw hasn't been updated for it yet)\r\n \r\n //Slick2dDebugDraw sDD = new Slick2dDebugDraw(gc.getGraphics(), gc);\r\n //sDD.setFlags(0x0001); //Setting the debug draw flags, draw polygons, no joints.\r\n //world.setDebugDraw(sDD);\r\n }",
"private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void update() {\n\t\tif(isMove) {\n\t\t\tspriteMoveToPoint(player, (int) mouseX, (int) mouseY);\n\t\t}\n\t\t\n\t\t//bullet\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\tspriteMoveToPoint(bullet, bullet.getX(), bullet.getY() - bullet.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\t\tif(bullet.getY() < 10) {\n\t\t\t\t\tremoveBullet(bullet);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t//enemy\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tspriteMoveToPoint(enemy, enemy.getX(), enemy.getY() + enemy.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tif(enemy.getY() > layerheight) {\n\t\t\t\tremoveEnemy(enemy);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tEnemy enemy = enemyList.get(i);\n\t\t\tfor(int j = 0; j < bulletList.size(); j++) {\n\t\t\t\tBullet bullet = bulletList.get(j);\n\t\t\t\tcollisionCheckForBulletAndEnemy(enemy, bullet);\n\t\t\t}\n\t\t}\n\t}",
"public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }",
"public void visualise() {\n\n // Conditional if statement to check if SLList is empty\n if(pum == pum.NIL)\n {\n // Print statement to show \n System.out.println(\"Empty List\");\n // Return statement\n return;\n }\n\n // Conditional if statement to check for loops in SLList\n if(loopExists(pum)) \n {\n // Print statement to say loop has been found \n System.out.println(\"Loop detected\");\n // Return statement\n return;\n }\n // Else conditional statement if no loop has been found\n else \n {\n\n // Print statement for no loop detected\n System.out.println(\"No Loop Detected\");\n }\n\n\n // Variable 'len' used to store the length of the SLList pum\n int len = pum.length();\n\n // Conditional if statement to check if the SLList length is greater than 5\n if(len > 5 || large_num(pum))\n {\n // For loop to iterate through SLList pum\n for(int h = 0; h < len; h++) \n {\n // Conditional to check if at the last element\n if(SLList.NIL == pum.rest()) \n {\n // Print statement for last element\n System.out.println(\"[\"+pum.first+\"|/]\");\n } \n // Conditional else statement for all other elements\n else \n {\n // Prints format for other elements (excludes final element)\n System.out.print(\"[\"+pum.first+\"|*]->\");\n // set the SLList to the rest of its SLList\n pum = pum.rest();\n }\n } \n }\n // Else condition\n else \n {\n // Print statment so that the linked list starts a 'tab' space to the right each time\n System.out.print(\"\\t\");\n\n // For loop going through the elements of the SLList pum\n for (int i = 0; i < len; i++) \n {\n // Conditional if statement to check if we are iterating the last element\n if (i == len-1) \n {\n // Prints out the specific last instance box for the linked list\n System.out.println(\"[*|/]\");\n } \n // Conditionl else statement for all other instances except for the last element\n else \n {\n // Prints visual for all other elements in linked list (excludes last element)\n System.out.print(\"[*|*]-->\");\n }\n }\n\n\n // For loop going through the elements of the SLList pum\n for (int j = 0; j < len; j++) \n {\n // Conditional if statement to check if we are iterating the last element\n if (j == len-1) \n {\n // Prints the case for the last element in the linked list\n System.out.println(\"\\t |\");\n }\n // Conditional else statement for all other elements (excluding the last element)\n else \n {\n // Prints the case for all other instances\n System.out.print(\"\\t |\");\n }\n }\n\n\n // Assign the SLList searchList with the SLList pum\n searchList = pum;\n\n // For loop going through the elements of the SLList pum\n for (int k = 0; k < len; k++) \n {\n // Conditional if statement to check if we are iterating the last element\n if (k == len-1) \n {\n // Prints the case for the last element in the linked list\n // Last element will be the first in the new SLList\n System.out.println(\"\\t \" + searchList.first());\n }\n // Else statement for all other elements (excluding the last element)\n else \n {\n // Prints the case for all other instances\n // Prints first element of each SLList, then modifies searchList to contain the rest of the SLList\n System.out.print(\"\\t \" + searchList.first());\n searchList = searchList.rest();\n }\n }\n }\n \n\n }",
"boolean testMoveBullet(Tester t) {\n return t.checkExpect(bullet1.move(),\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1))\n && t.checkExpect(bullet2.move(),\n new Bullet(2, Color.PINK, new MyPosn(650, 650), new MyPosn(50, 50), 1));\n }",
"public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }",
"public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }",
"public boolean hit(Bullet bullet) {\n //System.out.println(\"A golyo nem csapodott meg be semmibe.\");\n return false;\n }",
"private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}",
"boolean testOnTick(Tester t) {\n return t\n .checkExpect(new NBullets(0).onTickTester(), new NBullets(new MtLoGamePiece(),\n new MtLoGamePiece(), 0, 0, 1))\n && t.checkExpect(new NBullets(lob2, los3, 8, 12, 23, new Random(2)).onTickTester(),\n new NBullets(\n new ConsLoGamePiece(\n new Bullet(2, Color.PINK, new MyPosn(250, 292), new MyPosn(0, -8), 1),\n new ConsLoGamePiece(\n new Bullet(4, Color.PINK, new MyPosn(51, 50), new MyPosn(1, 0), 2),\n new ConsLoGamePiece(\n new Bullet(4, Color.PINK, new MyPosn(51, 50), new MyPosn(-1, 0), 2),\n new MtLoGamePiece()))),\n new ConsLoGamePiece(new Ship(10, Color.CYAN, new MyPosn(4, 239), new MyPosn(4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(496, 248), new MyPosn(-4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(50, 200), new MyPosn(50, 50)),\n new MtLoGamePiece()))),\n 8, 14, 24))\n && t.checkExpect(new NBullets(lob5, los3, 8, 12, 23, new Random(2)).onTickTester(),\n new NBullets(new MtLoGamePiece(), new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(4, 239), new MyPosn(4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(496, 248), new MyPosn(-4, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(51, 50), new MyPosn(1, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(51, 50), new MyPosn(1, 0)),\n new ConsLoGamePiece(\n new Ship(10, Color.CYAN, new MyPosn(50, 200), new MyPosn(50, 50)),\n new MtLoGamePiece()))))),\n 8, 12, 24));\n }",
"void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }",
"private void moveBullet() {\r\n\t\tif(bullet != null) {\r\n\t\t\tbullet.move(bulletVelocity, 0);\r\n\t\t}\r\n\t}",
"public Integer getBulletintype() {\n return bulletintype;\n }",
"public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }",
"public void addBullet(Bullet bullet) {\n\t\tif(bulletList.size() < GameParameters.getInstance().maxBulletAllowed) {\n//\t\t\tsynchronized (bulletList) {\n\t\t\t\tbulletList.add(bullet);\n//\t\t\t}\n\t\t}\n\n\t\t// Log.e(null, \"size of bulletList: \" + bulletList.size());\n\t}",
"private void speedBulletFire() {\n\n\t\tbulletArrayList.add(\n\t\t\t\tnew Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition, bulletWidth, bulletHeight, \"Yellow\"));\n\n\t\tfor (int i = 0; i < bulletArrayList.size(); i++) {\n\t\t\tbulletArrayList.get(i).setSpeed(5);\n\t\t}\n\t}",
"boolean testIsTouchingBulletBullet(Tester t) {\n return t.checkExpect(bullet3.isTouchingBullet(bullet6), false)\n && t.checkExpect(bullet6.isTouchingBullet(bullet6), false);\n }",
"@Override\n public Bullet getBullet() {\n return new EnemyGunBullet1();\n }",
"@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}",
"public ArrayList<Bullet> getBulletsFired(){\n return this.bulletsFired;\n }",
"public List<AProjectile> getBullets() {\n return bullets;\n }",
"public void shoot(int bulletLeft) {\n float xValue = canon.getX();\n float yValue = canon.getY();\n bullets.get(bulletLeft).setVisibility(View.VISIBLE);\n shootingMotion(bullets.get(bulletLeft), xValue, yValue);\n\n }",
"public Image getBulletsImage() {\n return bulletsImage;\n }",
"public void Update()\r\n {\r\n /*\r\n else if(level == 2){\r\n list_star.add(new CollisionItem(refLink, 670, 360, 50, 50));\r\n list_star_blue.add(new CollisionItem(refLink, 250, 50, 50, 50));\r\n\r\n list_fire.add(new CollisionItem(refLink, 220, 120, 60, 20));\r\n\r\n\r\n /*list_static_element.add(new CollisionItem(refLink, 452, 433, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 650, 410, 104, 15));\r\n\r\n list_static_element.add(new CollisionItem(refLink, 15, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 119, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 223, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 327, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 431, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 535, 140, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 639, 140, 104, 15));\r\n\r\n //list_static_element.add( new CollisionItem(refLink, 15, 250, 104, 15) );\r\n //list_static_element.add( new CollisionItem(refLink, 119, 250, 104, 15) );\r\n list_static_element.add(new CollisionItem(refLink, 223, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 327, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 431, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 535, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 639, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 743, 270, 104, 15));\r\n list_static_element.add(new CollisionItem(refLink, 847, 270, 104, 15));\r\n\r\n\r\n //list_static_element.add( new CollisionItem(refLink, 0, 0, 960, 15) );\r\n //list_static_element.add( new CollisionItem(refLink, 0, 465, 960, 15) );\r\n\r\n\r\n ///incarca harta de start. Functia poate primi ca argument id-ul hartii ce poate fi incarcat.\r\n\r\n LoadWorld();\r\n\r\n return;\r\n }*/\r\n\r\n }",
"boolean bulletGrow(Tester t) {\n return t.checkExpect(this.bullet2.grow(), 4) && t.checkExpect(this.bullet4.grow(), 8);\n }",
"@Override\n public void draw(Graphics2D g2d) {\n g2d.drawImage(getBulletImg(), this.getX(), this.getY(), null);\n \n }"
]
| [
"0.65874326",
"0.65457517",
"0.6380639",
"0.6374498",
"0.625299",
"0.61710215",
"0.6159539",
"0.6115099",
"0.6067967",
"0.6025079",
"0.60250705",
"0.59853226",
"0.5980545",
"0.59721756",
"0.59252286",
"0.59207183",
"0.5914744",
"0.5890263",
"0.5812775",
"0.5812497",
"0.5775448",
"0.5759287",
"0.57462156",
"0.5745517",
"0.5740748",
"0.57217157",
"0.5693752",
"0.56935245",
"0.5690163",
"0.56823796",
"0.56782955",
"0.56600744",
"0.56537974",
"0.56451684",
"0.563146",
"0.55981606",
"0.55980146",
"0.5597524",
"0.55839133",
"0.55645615",
"0.55448097",
"0.5543648",
"0.5537774",
"0.5536189",
"0.5526834",
"0.549123",
"0.5483395",
"0.5464981",
"0.54423887",
"0.54209346",
"0.5419534",
"0.54005176",
"0.53657264",
"0.5342433",
"0.53415376",
"0.5340031",
"0.5323296",
"0.5293196",
"0.52915615",
"0.5286566",
"0.5284186",
"0.5274907",
"0.5273501",
"0.5257017",
"0.52542585",
"0.5246539",
"0.52356386",
"0.52202386",
"0.52127993",
"0.5210602",
"0.5186849",
"0.51694715",
"0.5166902",
"0.516682",
"0.51624316",
"0.5137459",
"0.51265585",
"0.5124973",
"0.51228786",
"0.5102857",
"0.51008856",
"0.5100813",
"0.5092713",
"0.5090849",
"0.5088883",
"0.5088148",
"0.5087466",
"0.50781685",
"0.5076667",
"0.5076291",
"0.506604",
"0.5060875",
"0.5056273",
"0.5054921",
"0.5042354",
"0.50383925",
"0.50323784",
"0.50289893",
"0.5019707",
"0.5011702"
]
| 0.6910653 | 0 |
Due to refactoring not applicable anymore | private List<AnchorCandidate> mockCandidates(List<Integer[]> features, int[] nCandidates, int[] positives) {
List<AnchorCandidate> result = new ArrayList<>();
for (int i = 0; i < features.size(); i++) {
AnchorCandidate candidate = createFakeParentCandidate(Arrays.asList(features.get(i)));
candidate.registerSamples(nCandidates[i], positives[i]);
result.add(candidate);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_4270() {}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tprotected void interr() {\n\t}",
"private void poetries() {\n\n\t}",
"public abstract void mo70713b();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"public void mo38117a() {\n }",
"private Util() { }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private CanonizeSource() {}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@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 jugar() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n protected void init() {\n }",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n protected void prot() {\n }",
"private ProcessorUtils() { }",
"private JacobUtils() {}",
"@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\r\n\tpublic void rozmnozovat() {\n\t}",
"public abstract void mo27385c();",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {}",
"public abstract void mo6549b();",
"Reproducible newInstance();",
"public abstract void mo56925d();",
"public void mo1531a() {\n }",
"private void level7() {\n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private BuilderUtils() {}",
"public void mo4359a() {\n }",
"private Infer() {\n\n }",
"public abstract Object mo1771a();",
"protected Map method_1552() {\n return super.method_1552();\n }",
"public final void mo91715d() {\n }",
"public void method_191() {}",
"OptimizeResponse() {\n\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void strin() {\n\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public abstract String mo13682d();",
"private FaceConversionUtil() {\n\n\t}",
"public abstract Object mo26777y();",
"public abstract void mo27386d();",
"@Override\n public void apply() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"public abstract void mo42331g();",
"public abstract void mo30696a();",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private OMUtil() { }",
"private void getStatus() {\n\t\t\n\t}",
"public void m23075a() {\n }",
"protected Problem() {/* intentionally empty block */}"
]
| [
"0.5576494",
"0.55481756",
"0.5535632",
"0.5525427",
"0.5306923",
"0.53051114",
"0.5288325",
"0.5251133",
"0.5241982",
"0.5222601",
"0.5207427",
"0.51999253",
"0.5181556",
"0.5178402",
"0.515193",
"0.51398003",
"0.5133834",
"0.51295257",
"0.51228774",
"0.51101035",
"0.51101035",
"0.5093628",
"0.5089179",
"0.50717926",
"0.5066136",
"0.5041324",
"0.5040143",
"0.502438",
"0.50222707",
"0.5007183",
"0.5006401",
"0.50055355",
"0.50055355",
"0.49994603",
"0.4997791",
"0.49870554",
"0.49846599",
"0.49835238",
"0.49748507",
"0.49724305",
"0.49634224",
"0.49603137",
"0.4952244",
"0.4942522",
"0.49369472",
"0.49306002",
"0.4930448",
"0.49198246",
"0.49171755",
"0.49149814",
"0.49130452",
"0.49096903",
"0.49068597",
"0.4906056",
"0.4906056",
"0.4906056",
"0.4906056",
"0.4906056",
"0.4906056",
"0.49000943",
"0.4898372",
"0.4897243",
"0.4895811",
"0.48940215",
"0.48939073",
"0.48788574",
"0.48780853",
"0.4867244",
"0.48651248",
"0.48523483",
"0.48511463",
"0.48424253",
"0.48386225",
"0.48231608",
"0.482284",
"0.4821459",
"0.48096228",
"0.48061815",
"0.4801867",
"0.4801063",
"0.4800004",
"0.47957212",
"0.47923928",
"0.47923928",
"0.47911304",
"0.4786657",
"0.4781344",
"0.47765043",
"0.477146",
"0.47679654",
"0.4760019",
"0.4757072",
"0.4753864",
"0.47491258",
"0.4747636",
"0.47457403",
"0.47452468",
"0.47435313",
"0.47380823",
"0.47330123",
"0.47293693"
]
| 0.0 | -1 |
Creates the font with the given name, height and style. | public OneFont(String fontName, int fontHeight, int fontStyle) {
name = fontName;
height = fontHeight;
style = fontStyle;
font = new Font(Display.getDefault(), fontName, fontHeight, fontStyle);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"FONT createFONT();",
"public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }",
"Font createFont();",
"public Font(String name, int style, int size) {\n\tthis.name = (name != null) ? name : \"Default\";\n\tthis.style = (style & ~0x03) == 0 ? style : 0;\n\tthis.size = size;\n this.pointSize = size;\n }",
"public FontFactory(String font, int size, String text) {\n this.font = new Font(font, Font.BOLD, size);\n ttf = new TrueTypeFont(this.font, true);\n this.text = text;\n }",
"public Font deriveFont(int style, float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font deriveFont(int style){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public FreeMindWriter font( String name, String size ) {\n tagClose();\n out.println( \"<font NAME='\" + name + \"' SIZE='\" + size + \"'/>\" );\n return this; \n }",
"public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}",
"public Font createFont() {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }",
"public static void main(String[] args) {\n if(args.length >= 3) {\n try {\n File tableFile = new File(args[0]);\n String fontName = args[1];\n int fontSize = Integer.parseInt(args[2]);\n Font font = new Font(fontName, Font.PLAIN, fontSize);\n String fontFileName = args[3];\n FontCreator creator = new FontCreator();\n creator.setVisible(true);\n creator.pack();\n creator.create(tableFile, font, fontFileName);\n creator.setVisible(false);\n System.exit(0);\n } catch(Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n } else {\n printUsage();\n }\n }",
"private static native Font createFont(String name, GFontPeer peer, int gdkfont);",
"public Font deriveFont(float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font getFont(String family, int style, float size, float dpi)\n\t{\n\t\tfloat scale = dpi/72.0f;\n\t\treturn FontUtil.newFont(family, style, scale*size);\n\t}",
"public Font deriveFont(int style, AffineTransform trans){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplyTransform(trans, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"static Font getFont(int style, int size) {\n\t\treturn new Font(\"Monospaced\", style, size);\n\t}",
"public static Font create(Doc paramDoc, int paramInt) throws PDFNetException {\n/* 128 */ return __Create(Create(paramDoc.__GetHandle(), paramInt, false), paramDoc);\n/* */ }",
"public static Font create(Doc paramDoc, Font paramFont, String paramString) throws PDFNetException {\n/* 157 */ return __Create(Create(paramDoc.__GetHandle(), paramFont.a, paramString), paramDoc);\n/* */ }",
"public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}",
"public static Font create(Doc paramDoc, String paramString1, String paramString2) throws PDFNetException {\n/* 171 */ return __Create(Create(paramDoc.__GetHandle(), paramString1, paramString2), paramDoc);\n/* */ }",
"public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}",
"public static Font create(Doc paramDoc, int paramInt, boolean paramBoolean) throws PDFNetException {\n/* 143 */ return __Create(Create(paramDoc.__GetHandle(), paramInt, paramBoolean), paramDoc);\n/* */ }",
"public WritingFont() {\n\t\tproperties.set(NAME, \"Untitled\");\n\t\tproperties.set(MEDIAN, .6f);\n\t\tproperties.set(DESCENT, .3f);\n\t\tproperties.set(LEADING, .1f);\n\t}",
"public OneFont(FontData fd) {\r\n\t\tname = fd.getName();\r\n\t\theight = fd.getHeight();\r\n\t\tstyle = fd.getStyle();\r\n\t\tfont = new Font(Display.getDefault(), fd);\r\n\t}",
"public Font GetFont(String name) { return FontList.get(name); }",
"private void createFont(boolean created) {\n\t\tVertexTex[] vertices = new VertexTex[text.length() * 4];\n\t\t\n\t\tint[] indices = new int[text.length() * 6];\n\t\t\n\t\tfloat cursor = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tif(c == null)\n\t\t\t\tc = font.getChar('?');\n\t\t\t\n\t\t\t\n\t\t\tfloat x = cursor + c.X_OFFSET;\n\t\t\tfloat y = -c.Y_OFFSET;\n\t\t\t\n\t\t\tvertices[0 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x, y, 0),\n\t\t\t\tnew Vector2f(c.T_X / texture.getWidth(), c.T_Y / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[1 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x + c.T_WIDTH, y, 0),\n\t\t\t\tnew Vector2f((c.T_X + c.T_WIDTH) / texture.getWidth(), c.T_Y / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[2 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x + c.T_WIDTH, y - c.T_HEIGHT, 0),\n\t\t\t\tnew Vector2f((c.T_X + c.T_WIDTH) / texture.getWidth(), (c.T_Y + c.T_HEIGHT) / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[3 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x, y - c.T_HEIGHT, 0),\n\t\t\t\tnew Vector2f(c.T_X / texture.getWidth(), (c.T_Y + c.T_HEIGHT) / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tcursor += c.X_ADVANCE;\n\t\t\t\n\t\t\tindices[0 + i * 6] = 3 + i * 4;\n\t\t\tindices[1 + i * 6] = 0 + i * 4;\n\t\t\tindices[2 + i * 6] = 1 + i * 4;\n\t\t\tindices[3 + i * 6] = 3 + i * 4;\n\t\t\tindices[4 + i * 6] = 1 + i * 4;\n\t\t\tindices[5 + i * 6] = 2 + i * 4;\n\t\t}\n\t\t\n\t\tif(created)\n\t\t\tmesh.reallocateData(GL15.GL_STATIC_DRAW, vertices, indices);\n\t\telse\n\t\t\tmesh = new Mesh(vertices, indices);\n\t}",
"public XSSFFontFormatting createFontFormatting(){\n CTDxf dxf = getDxf(true);\n CTFont font;\n if(!dxf.isSetFont()) {\n font = dxf.addNewFont();\n } else {\n font = dxf.getFont();\n }\n\n return new XSSFFontFormatting(font, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }",
"private Text initNameText(){\n Text name = new Text(Values.NAME);\n name.setStyle(\"-fx-font-weight: bold;\" + \"-fx-font-size: 24;\");\n return name;\n }",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public FontRenderer(float x, float y, String text, FontType font, float size) {\n\t\tthis.text = text;\n\t\tthis.font = font;\n\t\tthis.size = size;\n\t\tcolor = new Vector4f(1, 1, 1, 1);\n\t\t\n\t\ttransform.setPosition(x, y);\n\t\tsetSize(size);\n\t\t\n\t\tprogram = FontShaderProgram.INSTANCE;\n\t\t\n\t\ttexture = font.getTexture().setParameters(GL11.GL_LINEAR, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_TEXTURE_MIN_FILTER);\n\t\t\n\t\tif(text.length() < 1)\n\t\t\tmesh = new Mesh().createEmpty();\n\t\telse\n\t\t\tcreateFont(false);\n\t}",
"public FontData deriveFont(float size, int style) {\n FontData original = getStyled(getFamilyName(), style);\n FontData data = new FontData();\n data.size = size;\n data.javaFont = original.javaFont.deriveFont(style, size);\n data.upem = upem;\n data.ansiKerning = ansiKerning;\n data.charWidth = charWidth;\n\n return data;\n }",
"Font getFont(int style) {\n\tswitch (style) {\n\t\tcase SWT.BOLD:\n\t\t\tif (boldFont != null) return boldFont;\n\t\t\treturn boldFont = new Font(device, getFontData(style));\n\t\tcase SWT.ITALIC:\n\t\t\tif (italicFont != null) return italicFont;\n\t\t\treturn italicFont = new Font(device, getFontData(style));\n\t\tcase SWT.BOLD | SWT.ITALIC:\n\t\t\tif (boldItalicFont != null) return boldItalicFont;\n\t\t\treturn boldItalicFont = new Font(device, getFontData(style));\n\t\tdefault:\n\t\t\treturn regularFont;\n\t}\n}",
"private Font(File fontFile, int fontFormat,\n boolean isCopy, CreatedFontTracker tracker)\n throws FontFormatException {\n\tthis.createdFont = true;\n\t/* Font2D instances created by this method track their font file\n\t * so that when the Font2D is GC'd it can also remove the file.\n\t */\n\tthis.font2DHandle =\n\t FontManager.createFont2D(fontFile, fontFormat,\n isCopy, tracker).handle;\n\n\tthis.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());\n\tthis.style = Font.PLAIN;\n\tthis.size = 1;\n\tthis.pointSize = 1f;\n }",
"public static Font createType1Font(Doc paramDoc, String paramString) throws PDFNetException {\n/* 417 */ return __Create(CreateType1Font(paramDoc.__GetHandle(), paramString, true), paramDoc);\n/* */ }",
"private native void init(Font font, String nativeName, int size);",
"public void add(String name, FileHandle font) {\n if (contains(name)) {\n return;\n }\n generators.put(name, new FreeTypeFontGenerator(font));\n }",
"private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }",
"public FontStyle getStyle();",
"public TextBox() {\n font = new Font(fontname, fontstyle, fontsize);\n }",
"public String createDrawTextString(int width, int height, int fontSize, String message) {\n\t\tint size = (int) Math.ceil(fontSize * height / 1080D);\n\t\tint borderw = (int) Math.ceil(size * 7D / fontSize);\n\t\ttry (Writer writer = new BufferedWriter(\n\t\t\t\tnew OutputStreamWriter(new FileOutputStream(tempOverlayFile), Charset.forName(\"UTF-8\")))) {\n\t\t\twriter.write(message);\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn \"\";\n\t\t}\n\t\tString drawText = \"drawtext=x=(w-tw)*0.5:y=0.935*(h-0.5*\" + size\n\t\t\t\t+ \"):bordercolor=black:fontcolor=white:borderw=\" + borderw + \":fontfile=\" + getFontFile() + \":fontsize=\"\n\t\t\t\t+ size + \":textfile=\" + tempOverlayFilename;\n\t\treturn drawText;\n\t}",
"public FontFrame(JTextArea txtWorkplace) {\n initComponents();\n Font[] fontList = new Font[]{};\n fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();\n for (int i = 0; i < fontList.length; i++) {\n cbbFont.addItem(fontList[i].getFontName());\n }\n fontName = (String) cbbFont.getSelectedItem();\n fontSize = (int) spinnerSize.getValue();\n fontStyle = (int) cbbStyle.getSelectedIndex();\n lblTest.setFont(new Font(fontName,fontSize,fontSize));\n this.txtWorkplace = txtWorkplace;\n }",
"public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}",
"public FontController createFont(ControllerCore genCode) {\n\t\tfontTXT = new FontController(\"font\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(font$1LBL);\n\t\t\t\tsetProperty(\"font\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn fontTXT;\n\t}",
"abstract Font getFont();",
"private void drawText(Graphics2D g2, String text, String fontName) {\n\n int fontSize = Math.round(getHeight() * factor);\n\n Font baseFont = new Font(fontName, Font.PLAIN, fontSize);\n Font font = baseFont.deriveFont(attr);\n\n GlyphVector gv = font.createGlyphVector(frc, text);\n Rectangle pixelBounds = gv.getPixelBounds(frc, 0, 0);\n\n int centerX = getWidth() / 2;\n int centerY = getHeight() / 2;\n\n float offsetX = pixelBounds.x + (pixelBounds.width / 2);\n float offsetY = pixelBounds.y + (pixelBounds.height / 2);\n\n AffineTransform at = new AffineTransform();\n at.translate(centerX - offsetX, centerY - offsetY);\n Shape outline = gv.getOutline();\n outline = at.createTransformedShape(outline);\n g2.fill(outline);\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"STYLE createSTYLE();",
"public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }",
"private static native boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex,\n int weight, int isItalic);",
"public void setFontName(String name)\n {\n font.setFontName(name);\n }",
"public static void setFont(String fontName, int fontSize){\n\t\tsetFont(fontName, fontSize, Font.PLAIN);\n\t}",
"private static void buildFonts() {\r\n fontSMALL = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_SM );\r\n fontMEDIUM = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_MD );\r\n fontLARGE = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_LG );\r\n }",
"public FontModifier(String family, Integer style, Integer size) {\n\t\tthis.family = family;\n\t\tthis.style = style;\n\t\tthis.size = size;\n\t}",
"public static HSSFFont getTitleFont(HSSFWorkbook workbook) {\n HSSFFont font = workbook.createFont();\n font.setFontName(FONT_NAME);\n // font.setBoldweight((short) 100);\n // font.setFontHeight((short) 250);\n font.setFontHeightInPoints((short) 10);\n font.setColor(HSSFColor.BLACK.index);\n font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n return font;\n }",
"public void setModifierFont(String name, int type, int size, float tracking, Boolean kerning) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size, kerning, tracking);\n _SPR.RefreshModifierFont();\n }",
"protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }",
"public abstract TC createStyle();",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public FontData deriveFont(float size) {\n return deriveFont(size, javaFont.getStyle());\n }",
"public Font deriveFont(AffineTransform trans){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyTransform(trans, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public void createTextBox(){\n // Check if theGreenFootImage was set, otherwise create a blanco image\n // with the specific heights.\n if(theGreenfootImage != null){\n image = new GreenfootImage(theGreenfootImage);\n }else{\n image = new GreenfootImage(fieldWidth, fieldHeight);\n }\n \n if(hasBackground){\n if(borderWidth == 0 || borderHeight == 0){\n createAreaWithoutBorder();\n } else{\n createAreaWithBorder(borderWidth, borderHeight);\n }\n }\n \n // Create the default dont with given fontsize and color.\n font = image.getFont();\n font = font.deriveFont(fontSize);\n image.setFont(font);\n image.setColor(fontColor);\n \n // Draw the string in the image with the input, on the given coordinates.\n image.drawString(input, drawStringX, drawStringY);\n \n setImage(image); // Place the image\n }",
"public static Font createType1Font(Doc paramDoc, String paramString, boolean paramBoolean) throws PDFNetException {\n/* 432 */ return __Create(CreateType1Font(paramDoc.__GetHandle(), paramString, paramBoolean), paramDoc);\n/* */ }",
"private void setFont() {\n\t}",
"public Font getFont(final String family, final int style, final int size) {\n collectGarbageInCache();\n\n String key = family + \"-\" + style + \"-\" + size;\n\n Reference cr = (Reference)fontCache.get(key);\n Font font = null;\n if (cr != null) {\n font = (Font)cr.get();\n }\n\n if (font == null) {\n font = new Font(family, style, size);\n fontCache.put(key, new CacheReference(key, font, queue));\n }\n\n return font;\n }",
"private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }",
"private FontData(InputStream ttf, float size) throws IOException {\n if (ttf.available() > MAX_FILE_SIZE) {\n throw new IOException(\"Can't load font - too big\");\n }\n byte[] data = IOUtils.toByteArray(ttf);\n if (data.length > MAX_FILE_SIZE) {\n throw new IOException(\"Can't load font - too big\");\n }\n\n this.size = size;\n try {\n javaFont = Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(data));\n TTFFile rawFont = new TTFFile();\n if (!rawFont.readFont(new FontFileReader(data))) {\n throw new IOException(\"Invalid font file\");\n }\n upem = rawFont.getUPEM();\n ansiKerning = rawFont.getAnsiKerning();\n charWidth = rawFont.getAnsiWidth();\n fontName = rawFont.getPostScriptName();\n familyName = rawFont.getFamilyName();\n\n String name = getName();\n System.err.println(\"Loaded: \" + name + \" (\" + data.length + \")\");\n boolean bo = false;\n boolean it = false;\n if (name.indexOf(',') >= 0) {\n name = name.substring(name.indexOf(','));\n\n if (name.indexOf(\"Bold\") >= 0) {\n bo = true;\n }\n if (name.indexOf(\"Italic\") >= 0) {\n it = true;\n }\n }\n\n if ((bo & it)) {\n javaFont = javaFont.deriveFont(Font.BOLD | Font.ITALIC);\n } else if (bo) {\n javaFont = javaFont.deriveFont(Font.BOLD);\n } else if (it) {\n javaFont = javaFont.deriveFont(Font.ITALIC);\n }\n } catch (FontFormatException e) {\n IOException x = new IOException(\"Failed to read font\");\n x.initCause(e);\n throw x;\n }\n }",
"public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}",
"Text createText();",
"public BitmapFont(String fontName) {\r\n\t\tthis(fontName, DEFAULT_COLOR_CACHE_CAPACITY);\r\n\t}",
"public String getName() {\n return fontName;\n }",
"void setFontFamily(ReaderFontSelection f);",
"public void setTextFont(Font font);",
"public void setFontHeight(short height)\n {\n font.setFontHeight(height);\n }",
"private static Typeface createTypeface(int style) {\n for (String family : FAMILIES) {\n Typeface tf = Typeface.create(family, style);\n if (tf.getStyle() == style) {\n return tf;\n }\n }\n return null;\n }",
"public static BitmapFont getFont(FontType type, FontSize size) {\n FreeTypeFontParameter parameter = new FreeTypeFontParameter();\n\n switch (size) {\n case STANDARD:\n parameter.size = Constants.FONT_SIZE_STANDARD;\n break;\n case LARGE:\n parameter.size = Constants.FONT_SIZE_LARGE;\n break;\n }\n\n return fontGenerators.get(type).generateFont(parameter);\n }",
"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}",
"public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont addNewFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().add_element_user(FONT$0);\n return target;\n }\n }",
"public static Font createTrueTypeFont(Doc paramDoc, String paramString) throws PDFNetException {\n/* 188 */ return __Create(CreateTrueTypeFont(paramDoc.__GetHandle(), paramString, true, true), paramDoc);\n/* */ }",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"public void setFont(RMFont aFont) { }",
"public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }",
"public Shape(int x, int y, int deltaX, int deltaY, int width, int height,String text) {\n\t\t_x = x;\n\t\t_y = y;\n\t\t_deltaX = deltaX;\n\t\t_deltaY = deltaY;\n\t\t_width = width;\n\t\t_height = height;\n\t\tthis.text = text;\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"public abstract Font getFont();",
"public FontDescriptor(final PDFont font, final float size) {\n this.font = font;\n this.size = size;\n }",
"public IconBuilder fontName(String font) {\n\t\tthis.fontName = font;\n\t\treturn this;\n\t}",
"private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void parseFontInfo( Node node, GraphObject go ) {\n NamedNodeMap map = node.getAttributes();\n String fontname = getNamedAttributeFromMap( map, \"name\" );\n int fontstyle = Integer.parseInt( getNamedAttributeFromMap( map, \"style\" ) );\n int fontsize = Integer.parseInt( getNamedAttributeFromMap( map, \"size\" ) );\n\n go.setLabelFont( new Font( fontname, fontstyle, fontsize ) );\n }",
"public static Font getPriorityFont(String[] familyFontNamnes, int style, int size){\n\t\tFont font = null;\n\t\tString[] names = (familyFontNamnes == null || familyFontNamnes.length == 0)\n\t\t\t\t? pfnames : familyFontNamnes;\n\t\tfor(String name : names){\n\t\t\tfont = getFont(name, style, size);\n\t\t\tif(font != null) return font;\n\t\t}\n\t\treturn getFont(\"Dialog\", style, size);\n\t}",
"protected String createFontReference(Font font)\n {\n String fontName = font.getName();\n\n StringBuffer psFontName = new StringBuffer();\n for (int i = 0; i < fontName.length(); i++)\n {\n char c = fontName.charAt(i);\n if (!Character.isWhitespace(c))\n {\n psFontName.append(c);\n }\n }\n\n boolean hyphen = false;\n if (font.isBold())\n {\n hyphen = true;\n psFontName.append(\"-Bold\");\n }\n if (font.isItalic())\n {\n psFontName.append((hyphen ? \"\" : \"-\") + \"Italic\");\n }\n\n fontName = psFontName.toString();\n fontName = psFontNames.getProperty(fontName, fontName);\n return fontName;\n }",
"private Font bloodBowlFont() throws FontFormatException, IOException {\r\n String fontFileName = \"/bloodbowl/resources/jblack.ttf\";\r\n return Font.createFont(Font.TRUETYPE_FONT, getClass().getResourceAsStream(fontFileName));\r\n }",
"public DisplayText (GraphicsContext gc, Canvas gameCanvas, int size) {\n\t\tthis.gc = gc;\n\t\tthis.gameCanvas = gameCanvas;\n\t\t\n\t\t vector = Font.loadFont(getClass().getResourceAsStream(\"/fonts/Vectorb.ttf\"), size); //load my custom font at the specified size \n\t}",
"public void setLabelFont(Font f);",
"public Font setFontStyle(String font){\n\t\treturn new Font(font, Font.BOLD, 1);\r\n\t}",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"private Map getFontAttributes(String fontname, int size, boolean bold, boolean italic) {\n Map<TextAttribute, Object> map = new Hashtable<TextAttribute, Object>();\r\n map.put(TextAttribute.FAMILY, fontname);\r\n map.put(TextAttribute.SIZE, size);\r\n map.put(TextAttribute.KERNING, TextAttribute.KERNING_ON);\r\n map.put(TextAttribute.WIDTH, TextAttribute.WIDTH_CONDENSED);\r\n \r\n if (bold) {\r\n map.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);\r\n }\r\n\r\n if (italic) {\r\n map.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);\r\n }\r\n \r\n return map;\r\n }",
"public Font modify(Font font) {\n\t\tif (family == null) {\n\t\t\tif (style != null && size != null) {\n\t\t\t\treturn font.deriveFont(style, size);\n\t\t\t}\n\t\t\telse if (style != null) {\n\t\t\t\treturn font.deriveFont(style);\n\t\t\t}\n\t\t\treturn font.deriveFont((float) size);\n\t\t}\n\t\tint newStyle = style != null ? style : font.getStyle();\n\t\tint newSize = size != null ? size : font.getSize();\n\t\treturn new Font(family, newStyle, newSize);\n\t}"
]
| [
"0.740342",
"0.7385881",
"0.73176926",
"0.7220621",
"0.6970013",
"0.6780265",
"0.66755384",
"0.6589563",
"0.64723766",
"0.64183956",
"0.6416811",
"0.6389118",
"0.63708544",
"0.6316346",
"0.6234248",
"0.619767",
"0.6191338",
"0.61482334",
"0.60981214",
"0.60753566",
"0.601849",
"0.5989654",
"0.59477186",
"0.59192",
"0.5868524",
"0.5836764",
"0.5799553",
"0.5784876",
"0.5779631",
"0.577825",
"0.5777892",
"0.57757515",
"0.5774059",
"0.5656659",
"0.5642643",
"0.5623228",
"0.56228274",
"0.5555314",
"0.55441445",
"0.55372757",
"0.55276173",
"0.5520157",
"0.5498238",
"0.54949456",
"0.54859364",
"0.54678774",
"0.54555506",
"0.5453094",
"0.54375887",
"0.543721",
"0.5423442",
"0.5410324",
"0.5405866",
"0.5403478",
"0.54017556",
"0.5378967",
"0.5366",
"0.5358033",
"0.5357991",
"0.5354963",
"0.5354004",
"0.5334635",
"0.53297067",
"0.53277606",
"0.5314329",
"0.5311836",
"0.529057",
"0.5259246",
"0.5255156",
"0.5241481",
"0.52408326",
"0.52294147",
"0.52201015",
"0.5207193",
"0.5206331",
"0.51996607",
"0.5196056",
"0.5195657",
"0.51945573",
"0.51823235",
"0.5166183",
"0.5162333",
"0.5160177",
"0.51420325",
"0.5141963",
"0.51404417",
"0.51391655",
"0.51383734",
"0.51327145",
"0.51282036",
"0.5121506",
"0.5120691",
"0.5116587",
"0.51092625",
"0.5108867",
"0.51051956",
"0.5102441",
"0.5085579",
"0.5085055",
"0.5074399"
]
| 0.7000681 | 4 |
Creates the font from the given font data. | public OneFont(FontData fd) {
name = fd.getName();
height = fd.getHeight();
style = fd.getStyle();
font = new Font(Display.getDefault(), fd);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Font createFont();",
"public FontFactory(String font, int size, String text) {\n this.font = new Font(font, Font.BOLD, size);\n ttf = new TrueTypeFont(this.font, true);\n this.text = text;\n }",
"public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }",
"FONT createFONT();",
"private FontData() {\n }",
"public Font createFont() {\n\t\treturn null;\n\t}",
"private static native Font createFont(String name, GFontPeer peer, int gdkfont);",
"public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }",
"public void fontLoader(){\n try {\n //create the font to use. Specify the size!\n customFont = Font.createFont(Font.TRUETYPE_FONT, new File(\".\\\\resources\\\\DS-DIGI.ttf\")).deriveFont(40f);\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n ge.registerFont(customFont);\n } catch (IOException e) {\n e.printStackTrace();\n } catch(FontFormatException e) {\n e.printStackTrace();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }",
"public static Font create(Doc paramDoc, Font paramFont, String paramString) throws PDFNetException {\n/* 157 */ return __Create(Create(paramDoc.__GetHandle(), paramFont.a, paramString), paramDoc);\n/* */ }",
"private void createFont(boolean created) {\n\t\tVertexTex[] vertices = new VertexTex[text.length() * 4];\n\t\t\n\t\tint[] indices = new int[text.length() * 6];\n\t\t\n\t\tfloat cursor = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tif(c == null)\n\t\t\t\tc = font.getChar('?');\n\t\t\t\n\t\t\t\n\t\t\tfloat x = cursor + c.X_OFFSET;\n\t\t\tfloat y = -c.Y_OFFSET;\n\t\t\t\n\t\t\tvertices[0 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x, y, 0),\n\t\t\t\tnew Vector2f(c.T_X / texture.getWidth(), c.T_Y / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[1 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x + c.T_WIDTH, y, 0),\n\t\t\t\tnew Vector2f((c.T_X + c.T_WIDTH) / texture.getWidth(), c.T_Y / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[2 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x + c.T_WIDTH, y - c.T_HEIGHT, 0),\n\t\t\t\tnew Vector2f((c.T_X + c.T_WIDTH) / texture.getWidth(), (c.T_Y + c.T_HEIGHT) / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tvertices[3 + i * 4] = new VertexTex(\n\t\t\t\tnew Vector3f(x, y - c.T_HEIGHT, 0),\n\t\t\t\tnew Vector2f(c.T_X / texture.getWidth(), (c.T_Y + c.T_HEIGHT) / texture.getHeight())\n\t\t\t);\n\t\t\t\n\t\t\tcursor += c.X_ADVANCE;\n\t\t\t\n\t\t\tindices[0 + i * 6] = 3 + i * 4;\n\t\t\tindices[1 + i * 6] = 0 + i * 4;\n\t\t\tindices[2 + i * 6] = 1 + i * 4;\n\t\t\tindices[3 + i * 6] = 3 + i * 4;\n\t\t\tindices[4 + i * 6] = 1 + i * 4;\n\t\t\tindices[5 + i * 6] = 2 + i * 4;\n\t\t}\n\t\t\n\t\tif(created)\n\t\t\tmesh.reallocateData(GL15.GL_STATIC_DRAW, vertices, indices);\n\t\telse\n\t\t\tmesh = new Mesh(vertices, indices);\n\t}",
"private FontData(InputStream ttf, float size) throws IOException {\n if (ttf.available() > MAX_FILE_SIZE) {\n throw new IOException(\"Can't load font - too big\");\n }\n byte[] data = IOUtils.toByteArray(ttf);\n if (data.length > MAX_FILE_SIZE) {\n throw new IOException(\"Can't load font - too big\");\n }\n\n this.size = size;\n try {\n javaFont = Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(data));\n TTFFile rawFont = new TTFFile();\n if (!rawFont.readFont(new FontFileReader(data))) {\n throw new IOException(\"Invalid font file\");\n }\n upem = rawFont.getUPEM();\n ansiKerning = rawFont.getAnsiKerning();\n charWidth = rawFont.getAnsiWidth();\n fontName = rawFont.getPostScriptName();\n familyName = rawFont.getFamilyName();\n\n String name = getName();\n System.err.println(\"Loaded: \" + name + \" (\" + data.length + \")\");\n boolean bo = false;\n boolean it = false;\n if (name.indexOf(',') >= 0) {\n name = name.substring(name.indexOf(','));\n\n if (name.indexOf(\"Bold\") >= 0) {\n bo = true;\n }\n if (name.indexOf(\"Italic\") >= 0) {\n it = true;\n }\n }\n\n if ((bo & it)) {\n javaFont = javaFont.deriveFont(Font.BOLD | Font.ITALIC);\n } else if (bo) {\n javaFont = javaFont.deriveFont(Font.BOLD);\n } else if (it) {\n javaFont = javaFont.deriveFont(Font.ITALIC);\n }\n } catch (FontFormatException e) {\n IOException x = new IOException(\"Failed to read font\");\n x.initCause(e);\n throw x;\n }\n }",
"public static Font create(Doc paramDoc, int paramInt) throws PDFNetException {\n/* 128 */ return __Create(Create(paramDoc.__GetHandle(), paramInt, false), paramDoc);\n/* */ }",
"private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private Font(File fontFile, int fontFormat,\n boolean isCopy, CreatedFontTracker tracker)\n throws FontFormatException {\n\tthis.createdFont = true;\n\t/* Font2D instances created by this method track their font file\n\t * so that when the Font2D is GC'd it can also remove the file.\n\t */\n\tthis.font2DHandle =\n\t FontManager.createFont2D(fontFile, fontFormat,\n isCopy, tracker).handle;\n\n\tthis.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());\n\tthis.style = Font.PLAIN;\n\tthis.size = 1;\n\tthis.pointSize = 1f;\n }",
"public static Font create(Doc paramDoc, String paramString1, String paramString2) throws PDFNetException {\n/* 171 */ return __Create(Create(paramDoc.__GetHandle(), paramString1, paramString2), paramDoc);\n/* */ }",
"public static FontData getFontData() {\n IPreferenceStore store = HexEditorPlugin.getDefault()\n .getPreferenceStore();\n String name = store.getString(Preferences.FONT_NAME);\n int style = store.getInt(Preferences.FONT_STYLE);\n int size = store.getInt(Preferences.FONT_SIZE);\n FontData fontData = null;\n if (name != null && !name.isEmpty() && size > 0) {\n fontData = new FontData(name, size, style);\n } else {\n fontData = Preferences.getDefaultFontData();\n }\n\n return fontData;\n }",
"public static void main(String[] args) {\n if(args.length >= 3) {\n try {\n File tableFile = new File(args[0]);\n String fontName = args[1];\n int fontSize = Integer.parseInt(args[2]);\n Font font = new Font(fontName, Font.PLAIN, fontSize);\n String fontFileName = args[3];\n FontCreator creator = new FontCreator();\n creator.setVisible(true);\n creator.pack();\n creator.create(tableFile, font, fontFileName);\n creator.setVisible(false);\n System.exit(0);\n } catch(Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n } else {\n printUsage();\n }\n }",
"abstract Font getFont();",
"public FontController createFont(ControllerCore genCode) {\n\t\tfontTXT = new FontController(\"font\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(font$1LBL);\n\t\t\t\tsetProperty(\"font\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn fontTXT;\n\t}",
"public Font deriveFont(int style){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public void initFont() {\r\n\t\tFont dosFont = null;\r\n try {\r\n \t//setup font\r\n\t\t\t\tURL fontUrl = getURL(\"fonts/DOSFont.ttf\");\r\n\t\t \tdosFont = Font.createFont(Font.TRUETYPE_FONT, fontUrl.openStream());\r\n\t \tdosFont = dosFont.deriveFont(Font.PLAIN, 15);\r\n\t \tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t \tge.registerFont(dosFont);\r\n\t } catch(Exception e) {\r\n\t e.printStackTrace();\r\n\t System.exit(-1);\r\n\t }\r\n screen.setFont(dosFont);//set font on JTextArea\r\n\t}",
"public static Font createType1Font(Doc paramDoc, String paramString) throws PDFNetException {\n/* 417 */ return __Create(CreateType1Font(paramDoc.__GetHandle(), paramString, true), paramDoc);\n/* */ }",
"private native void init(Font font, String nativeName, int size);",
"public static Font create(Doc paramDoc, int paramInt, boolean paramBoolean) throws PDFNetException {\n/* 143 */ return __Create(Create(paramDoc.__GetHandle(), paramInt, paramBoolean), paramDoc);\n/* */ }",
"public static Font createTrueTypeFont(Doc paramDoc, String paramString) throws PDFNetException {\n/* 188 */ return __Create(CreateTrueTypeFont(paramDoc.__GetHandle(), paramString, true, true), paramDoc);\n/* */ }",
"public XSSFFontFormatting createFontFormatting(){\n CTDxf dxf = getDxf(true);\n CTFont font;\n if(!dxf.isSetFont()) {\n font = dxf.addNewFont();\n } else {\n font = dxf.getFont();\n }\n\n return new XSSFFontFormatting(font, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }",
"private void setupFonts()\r\n\t{\r\n\t\tSystem.out.println(\"In setupFonts()\");\r\n\t\t\r\n\t\t// set up the text fonts\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttextFont = Font.createFont(Font.TRUETYPE_FONT, AppletResourceLoader.getFileFromJar(GameConstants.PATH_FONTS + \"FOXLEY8_.ttf\"));\r\n\t\t\ttextFont = textFont.deriveFont(16.0f);\r\n\t\t\ttextFontBold = textFont.deriveFont(Font.BOLD, 16.0f);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"ERROR IN setupFonts(): \" + e.getClass().getName() + \" - \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"private static native boolean nAddFont(long builderPtr, ByteBuffer font, int ttcIndex,\n int weight, int isItalic);",
"public static FontEncoding createFontSpecificEncoding() {\n FontEncoding encoding = new FontEncoding();\n encoding.fontSpecific = true;\n for (int ch = 0; ch < 256; ch++) {\n encoding.unicodeToCode.put(ch, ch);\n encoding.codeToUnicode[ch] = ch;\n encoding.unicodeDifferences.put(ch, ch);\n }\n return encoding;\n }",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }",
"public Font deriveFont(float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public FontRenderer(float x, float y, String text, FontType font, float size) {\n\t\tthis.text = text;\n\t\tthis.font = font;\n\t\tthis.size = size;\n\t\tcolor = new Vector4f(1, 1, 1, 1);\n\t\t\n\t\ttransform.setPosition(x, y);\n\t\tsetSize(size);\n\t\t\n\t\tprogram = FontShaderProgram.INSTANCE;\n\t\t\n\t\ttexture = font.getTexture().setParameters(GL11.GL_LINEAR, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_TEXTURE_MIN_FILTER);\n\t\t\n\t\tif(text.length() < 1)\n\t\t\tmesh = new Mesh().createEmpty();\n\t\telse\n\t\t\tcreateFont(false);\n\t}",
"public Font deriveFont(AffineTransform trans){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyTransform(trans, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}",
"public Font deriveFont(int style, float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"private static void buildFonts() {\r\n fontSMALL = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_SM );\r\n fontMEDIUM = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_MD );\r\n fontLARGE = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_LG );\r\n }",
"static Font getFont(int style, int size) {\n\t\treturn new Font(\"Monospaced\", style, size);\n\t}",
"public void init( )\n {\n metFont = new HersheyFont( getDocumentBase(), getParameter(\"font\"));\n }",
"public Font GetFont(String name) { return FontList.get(name); }",
"static PDFont loadFont(PDDocument document) {\n Path fontPath = Paths.get(badgeResourcePath, \"/Bitstream - BankGothic Md BT Medium.ttf\");\n\n try (InputStream stream = new FileInputStream(fontPath.toFile())) {\n return PDType0Font.load(document, stream);\n } catch (IOException ex) {\n log.warn(\"Error, couldn't load font '{}'\", fontPath.toAbsolutePath());\n return PDType1Font.HELVETICA_BOLD;\n }\n }",
"public FontData deriveFont(float size, int style) {\n FontData original = getStyled(getFamilyName(), style);\n FontData data = new FontData();\n data.size = size;\n data.javaFont = original.javaFont.deriveFont(style, size);\n data.upem = upem;\n data.ansiKerning = ansiKerning;\n data.charWidth = charWidth;\n\n return data;\n }",
"private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }",
"void setFontFamily(ReaderFontSelection f);",
"public FontData deriveFont(float size) {\n return deriveFont(size, javaFont.getStyle());\n }",
"private void setFont() {\n\t}",
"public static Font createTrueTypeFont(Doc paramDoc, InputStream paramInputStream) throws PDFNetException {\n/* 205 */ return __Create(CreateTrueTypeFontFromStream(paramDoc.__GetHandle(), paramInputStream, true, true), paramDoc);\n/* */ }",
"public BitmapFont loadBitmapFont(String fileFont, String fileImage);",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"public static Font createCIDTrueTypeFont(Doc paramDoc, String paramString) throws PDFNetException {\n/* 284 */ return __Create(CreateCIDTrueTypeFont(paramDoc.__GetHandle(), paramString, true, true, 0, 0L), paramDoc);\n/* */ }",
"public void initializeText(){\n\t\tfont = new BitmapFont();\n\t\tfont1 = new BitmapFont();\n\t\tfont1.setColor(Color.BLUE);\n\t\tfont2 = new BitmapFont();\n\t\tfont2.setColor(Color.BLACK);\n\t}",
"public abstract Font getFont();",
"FontMatch(FontInfo info) {\n/* 704 */ this.info = info;\n/* */ }",
"FontMapperImpl() {\n/* 55 */ this.substitutes.put(\"Courier\", \n/* 56 */ Arrays.asList(new String[] { \"CourierNew\", \"CourierNewPSMT\", \"LiberationMono\", \"NimbusMonL-Regu\" }));\n/* 57 */ this.substitutes.put(\"Courier-Bold\", \n/* 58 */ Arrays.asList(new String[] { \"CourierNewPS-BoldMT\", \"CourierNew-Bold\", \"LiberationMono-Bold\", \"NimbusMonL-Bold\" }));\n/* */ \n/* 60 */ this.substitutes.put(\"Courier-Oblique\", \n/* 61 */ Arrays.asList(new String[] { \"CourierNewPS-ItalicMT\", \"CourierNew-Italic\", \"LiberationMono-Italic\", \"NimbusMonL-ReguObli\" }));\n/* */ \n/* 63 */ this.substitutes.put(\"Courier-BoldOblique\", \n/* 64 */ Arrays.asList(new String[] { \"CourierNewPS-BoldItalicMT\", \"CourierNew-BoldItalic\", \"LiberationMono-BoldItalic\", \"NimbusMonL-BoldObli\" }));\n/* */ \n/* 66 */ this.substitutes.put(\"Helvetica\", \n/* 67 */ Arrays.asList(new String[] { \"ArialMT\", \"Arial\", \"LiberationSans\", \"NimbusSanL-Regu\" }));\n/* 68 */ this.substitutes.put(\"Helvetica-Bold\", \n/* 69 */ Arrays.asList(new String[] { \"Arial-BoldMT\", \"Arial-Bold\", \"LiberationSans-Bold\", \"NimbusSanL-Bold\" }));\n/* */ \n/* 71 */ this.substitutes.put(\"Helvetica-Oblique\", \n/* 72 */ Arrays.asList(new String[] { \"Arial-ItalicMT\", \"Arial-Italic\", \"Helvetica-Italic\", \"LiberationSans-Italic\", \"NimbusSanL-ReguItal\" }));\n/* */ \n/* 74 */ this.substitutes.put(\"Helvetica-BoldOblique\", \n/* 75 */ Arrays.asList(new String[] { \"Arial-BoldItalicMT\", \"Helvetica-BoldItalic\", \"LiberationSans-BoldItalic\", \"NimbusSanL-BoldItal\" }));\n/* */ \n/* 77 */ this.substitutes.put(\"Times-Roman\", \n/* 78 */ Arrays.asList(new String[] { \"TimesNewRomanPSMT\", \"TimesNewRoman\", \"TimesNewRomanPS\", \"LiberationSerif\", \"NimbusRomNo9L-Regu\" }));\n/* */ \n/* 80 */ this.substitutes.put(\"Times-Bold\", \n/* 81 */ Arrays.asList(new String[] { \"TimesNewRomanPS-BoldMT\", \"TimesNewRomanPS-Bold\", \"TimesNewRoman-Bold\", \"LiberationSerif-Bold\", \"NimbusRomNo9L-Medi\" }));\n/* */ \n/* */ \n/* 84 */ this.substitutes.put(\"Times-Italic\", \n/* 85 */ Arrays.asList(new String[] { \"TimesNewRomanPS-ItalicMT\", \"TimesNewRomanPS-Italic\", \"TimesNewRoman-Italic\", \"LiberationSerif-Italic\", \"NimbusRomNo9L-ReguItal\" }));\n/* */ \n/* */ \n/* 88 */ this.substitutes.put(\"Times-BoldItalic\", \n/* 89 */ Arrays.asList(new String[] { \"TimesNewRomanPS-BoldItalicMT\", \"TimesNewRomanPS-BoldItalic\", \"TimesNewRoman-BoldItalic\", \"LiberationSerif-BoldItalic\", \"NimbusRomNo9L-MediItal\" }));\n/* */ \n/* */ \n/* 92 */ this.substitutes.put(\"Symbol\", Arrays.asList(new String[] { \"Symbol\", \"SymbolMT\", \"StandardSymL\" }));\n/* 93 */ this.substitutes.put(\"ZapfDingbats\", Arrays.asList(new String[] { \"ZapfDingbatsITC\", \"Dingbats\", \"MS-Gothic\" }));\n/* */ \n/* */ \n/* */ \n/* 97 */ for (String baseName : Standard14Fonts.getNames()) {\n/* */ \n/* 99 */ if (!this.substitutes.containsKey(baseName)) {\n/* */ \n/* 101 */ String mappedName = Standard14Fonts.getMappedFontName(baseName);\n/* 102 */ this.substitutes.put(baseName, copySubstitutes(mappedName));\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 110 */ String ttfName = \"/org/apache/pdfbox/resources/ttf/LiberationSans-Regular.ttf\";\n/* 111 */ InputStream ttfStream = FontMapper.class.getResourceAsStream(ttfName);\n/* 112 */ if (ttfStream == null)\n/* */ {\n/* 114 */ throw new IOException(\"Error loading resource: \" + ttfName);\n/* */ }\n/* 116 */ TTFParser ttfParser = new TTFParser();\n/* 117 */ this.lastResortFont = ttfParser.parse(ttfStream);\n/* */ }\n/* 119 */ catch (IOException e) {\n/* */ \n/* 121 */ throw new RuntimeException(e);\n/* */ } \n/* */ }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont addNewFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().add_element_user(FONT$0);\n return target;\n }\n }",
"private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }",
"public void setTextFont(Font font);",
"private Font bloodBowlFont() throws FontFormatException, IOException {\r\n String fontFileName = \"/bloodbowl/resources/jblack.ttf\";\r\n return Font.createFont(Font.TRUETYPE_FONT, getClass().getResourceAsStream(fontFileName));\r\n }",
"private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }",
"public PdfFontProgram() {\n super();\n }",
"public Font deriveFont(int style, AffineTransform trans){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplyTransform(trans, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"private void initFontAndChange(Context context) {\n changeFont(context);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public SlickRenderFont loadFont(final Graphics g, final String filename) throws SlickLoadFontException {\n try {\n Font javaFont = loadJavaFont(filename);\n \n if (javaFont == null) {\n throw new SlickLoadFontException(\"Loading TTF Font failed.\");\n }\n \n if (javaFont.getSize() == 1) {\n javaFont = javaFont.deriveFont(12.f);\n }\n \n final UnicodeFont uniFont = new UnicodeFont(javaFont);\n uniFont.addAsciiGlyphs();\n uniFont.getEffects().add(new ColorEffect());\n \n return new UnicodeSlickRenderFont(uniFont, javaFont);\n } catch (final Exception e) {\n throw new SlickLoadFontException(\"Loading the font failed.\", e);\n }\n }",
"public FontRenderer(float x, float y, String text, FontType font) {\n\t\tthis(x, y, text, font, 1);\n\t}",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"private FontInfo getFont(FontFormat format, String postScriptName) {\n/* 461 */ if (postScriptName.contains(\"+\"))\n/* */ {\n/* 463 */ postScriptName = postScriptName.substring(postScriptName.indexOf('+') + 1);\n/* */ }\n/* */ \n/* */ \n/* 467 */ FontInfo info = this.fontInfoByName.get(postScriptName);\n/* 468 */ if (info != null && info.getFormat() == format)\n/* */ {\n/* 470 */ return info;\n/* */ }\n/* 472 */ return null;\n/* */ }",
"public void parseFontInfo( Node node, GraphObject go ) {\n NamedNodeMap map = node.getAttributes();\n String fontname = getNamedAttributeFromMap( map, \"name\" );\n int fontstyle = Integer.parseInt( getNamedAttributeFromMap( map, \"style\" ) );\n int fontsize = Integer.parseInt( getNamedAttributeFromMap( map, \"size\" ) );\n\n go.setLabelFont( new Font( fontname, fontstyle, fontsize ) );\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"public void add(String name, FileHandle font) {\n if (contains(name)) {\n return;\n }\n generators.put(name, new FreeTypeFontGenerator(font));\n }",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"public static Font createType1Font(Doc paramDoc, String paramString, boolean paramBoolean) throws PDFNetException {\n/* 432 */ return __Create(CreateType1Font(paramDoc.__GetHandle(), paramString, paramBoolean), paramDoc);\n/* */ }",
"public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }",
"Text createText();",
"public WritingFont() {\n\t\tproperties.set(NAME, \"Untitled\");\n\t\tproperties.set(MEDIAN, .6f);\n\t\tproperties.set(DESCENT, .3f);\n\t\tproperties.set(LEADING, .1f);\n\t}",
"private FontBoxFont findFont(FontFormat format, String postScriptName) {\n/* 403 */ if (postScriptName == null)\n/* */ {\n/* 405 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 409 */ if (this.fontProvider == null)\n/* */ {\n/* 411 */ getProvider();\n/* */ }\n/* */ \n/* */ \n/* 415 */ FontInfo info = getFont(format, postScriptName);\n/* 416 */ if (info != null)\n/* */ {\n/* 418 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 422 */ info = getFont(format, postScriptName.replaceAll(\"-\", \"\"));\n/* 423 */ if (info != null)\n/* */ {\n/* 425 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 429 */ for (String substituteName : getSubstitutes(postScriptName)) {\n/* */ \n/* 431 */ info = getFont(format, substituteName);\n/* 432 */ if (info != null)\n/* */ {\n/* 434 */ return info.getFont();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 439 */ info = getFont(format, postScriptName.replaceAll(\",\", \"-\"));\n/* 440 */ if (info != null)\n/* */ {\n/* 442 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 446 */ info = getFont(format, postScriptName + \"-Regular\");\n/* 447 */ if (info != null)\n/* */ {\n/* 449 */ return info.getFont();\n/* */ }\n/* */ \n/* 452 */ return null;\n/* */ }",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public static Font createCIDTrueTypeFont(Doc paramDoc, InputStream paramInputStream) throws PDFNetException {\n/* 301 */ return __Create(CreateCIDTrueTypeFontFromStream(paramDoc.__GetHandle(), paramInputStream, true, true, 0, 0L), paramDoc);\n/* */ }",
"public Font getFont(\n )\n {return font;}",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"public Obj getEmbeddedFont() throws PDFNetException {\n/* 809 */ return Obj.__Create(GetEmbeddedFont(this.a), this.b);\n/* */ }",
"protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }",
"public RenderFontProcessing(PApplet app, PGraphics canvas, String filename) {\n\t\t\n\t\tthis.canvas = canvas;\n\t\tif (fileExists(filename)) {\n\t\t\tif ((filename.substring(filename.length() - 3)).equals(\"vlw\")) {\t\t\t\t\n\t\t\t\tthis.font = app.loadFont(filename);\n\t\t\t} else {\n\t\t\t\tSystem.err.println(filename + \" is an invalid filetype, only Processing VLW fonts are accepted.\");\n\t\t\t}\n\t\t} else {\t\t\t\n\t\t\tSystem.err.println(\"File \" + filename + \" not found.\");\n\t\t}\n\t}",
"public FontFrame(JTextArea txtWorkplace) {\n initComponents();\n Font[] fontList = new Font[]{};\n fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();\n for (int i = 0; i < fontList.length; i++) {\n cbbFont.addItem(fontList[i].getFontName());\n }\n fontName = (String) cbbFont.getSelectedItem();\n fontSize = (int) spinnerSize.getValue();\n fontStyle = (int) cbbStyle.getSelectedIndex();\n lblTest.setFont(new Font(fontName,fontSize,fontSize));\n this.txtWorkplace = txtWorkplace;\n }",
"private void loadSystemFont(String font){\n mFont = new Font(font, mFontStyle, (int)mFontSize);\n }",
"@Test\n public void Test_Output_Font() throws Exception {\n String actual_value = \"\";\n String expected_value = \"1 0 obj \\n<< \\n/ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] \\n\";\n expected_value += \"/Font \\n<< \\n/F2 \\n<< \\n/Type /Font \\n/BaseFont /Helvetica \\n/SubType /Type1 \\n\";\n expected_value += \">> \\n>> \\n>> \\n\";\n\n PdfResource resrc = new PdfResource();\n resrc.addFont(new PdfFont(PdfFont.HELVETICA, false, false));\n actual_value = new String(resrc.dumpInfo());\n \n assertThat(actual_value, equalTo(expected_value));\n }",
"public void setFont(RMFont aFont) { }",
"public Font getFont(String family, int style, float size, float dpi)\n\t{\n\t\tfloat scale = dpi/72.0f;\n\t\treturn FontUtil.newFont(family, style, scale*size);\n\t}",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public Fuentes () {\n File filearcade = new File (RUTA_ARCADE_FONT);\n File filechess = new File (RUTA_CHESS_FONT);\n File fileinvaders = new File (RUTA_INVADERS_FONT);\n File filesafety = new File (RUTA_SAFETY_FONT);\n\n try {\n setArcadeFont (Font.createFont (Font.TRUETYPE_FONT, filearcade));\n setChessFont (Font.createFont (Font.TRUETYPE_FONT, filechess));\n setInvadersFont (Font.createFont (Font.TRUETYPE_FONT, fileinvaders));\n setSafetyFont (Font.createFont (Font.TRUETYPE_FONT, filesafety));\n\n } catch (FontFormatException | IOException e) {\n e.printStackTrace ();\n }\n }",
"public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }",
"@Test\n public final void test45338() throws IOException {\n Workbook wb = _testDataProvider.createWorkbook();\n int num0 = wb.getNumberOfFonts();\n\n Sheet s = wb.createSheet();\n s.createRow(0);\n s.createRow(1);\n s.getRow(0).createCell(0);\n s.getRow(1).createCell(0);\n\n //default font\n Font f1 = wb.getFontAt((short)0);\n assertFalse(f1.getBold());\n\n // Check that asking for the same font\n // multiple times gives you the same thing.\n // Otherwise, our tests wouldn't work!\n assertSame(wb.getFontAt((short)0), wb.getFontAt((short)0));\n\n // Look for a new font we have\n // yet to add\n assertNull(\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n\n Font nf = wb.createFont();\n short nfIdx = nf.getIndex();\n assertEquals(num0 + 1, wb.getNumberOfFonts());\n\n assertSame(nf, wb.getFontAt(nfIdx));\n\n nf.setBold(true);\n nf.setColor((short)123);\n nf.setFontHeightInPoints((short)22);\n nf.setFontName(\"Thingy\");\n nf.setItalic(false);\n nf.setStrikeout(true);\n nf.setTypeOffset((short)2);\n nf.setUnderline((byte)2);\n\n assertEquals(num0 + 1, wb.getNumberOfFonts());\n assertEquals(nf, wb.getFontAt(nfIdx));\n\n assertEquals(wb.getFontAt(nfIdx), wb.getFontAt(nfIdx));\n assertTrue(wb.getFontAt((short)0) != wb.getFontAt(nfIdx));\n\n // Find it now\n assertNotNull(\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n assertSame(nf,\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n wb.close();\n }",
"protected String createFontReference(Font font)\n {\n String fontName = font.getName();\n\n StringBuffer psFontName = new StringBuffer();\n for (int i = 0; i < fontName.length(); i++)\n {\n char c = fontName.charAt(i);\n if (!Character.isWhitespace(c))\n {\n psFontName.append(c);\n }\n }\n\n boolean hyphen = false;\n if (font.isBold())\n {\n hyphen = true;\n psFontName.append(\"-Bold\");\n }\n if (font.isItalic())\n {\n psFontName.append((hyphen ? \"\" : \"-\") + \"Italic\");\n }\n\n fontName = psFontName.toString();\n fontName = psFontNames.getProperty(fontName, fontName);\n return fontName;\n }",
"public static Typeface loadFont(NgApp ngApp, String fontPath) {\n return Typeface.createFromAsset(ngApp.activity.getAssets(), \"fonts/\" + fontPath);\n }",
"public Font(String name, int style, int size) {\n\tthis.name = (name != null) ? name : \"Default\";\n\tthis.style = (style & ~0x03) == 0 ? style : 0;\n\tthis.size = size;\n this.pointSize = size;\n }",
"public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}",
"Type1Glyph2D(PDSimpleFont font) {\n/* 45 */ this.font = font;\n/* */ }"
]
| [
"0.7300166",
"0.6722493",
"0.67008394",
"0.66985345",
"0.6578891",
"0.65697265",
"0.65566504",
"0.6172429",
"0.6159333",
"0.6129549",
"0.6125119",
"0.60928786",
"0.60830504",
"0.6046362",
"0.603391",
"0.5948719",
"0.5946448",
"0.58777535",
"0.58539516",
"0.5840018",
"0.5835959",
"0.57871324",
"0.5778479",
"0.5694042",
"0.5636048",
"0.5626113",
"0.5620077",
"0.5598974",
"0.55686986",
"0.554552",
"0.55325913",
"0.55171317",
"0.5510876",
"0.54790235",
"0.5465092",
"0.545058",
"0.54458785",
"0.54365623",
"0.5433649",
"0.54089427",
"0.5390116",
"0.53887767",
"0.53875613",
"0.53853446",
"0.53850967",
"0.535633",
"0.53464586",
"0.53370184",
"0.5333883",
"0.53311867",
"0.5330451",
"0.53282833",
"0.532807",
"0.5325377",
"0.53231543",
"0.53065205",
"0.53009886",
"0.53000057",
"0.52978384",
"0.52827924",
"0.5281388",
"0.52804667",
"0.52791363",
"0.5266887",
"0.52577585",
"0.52538013",
"0.5248265",
"0.5217377",
"0.5193925",
"0.51917094",
"0.5181474",
"0.517969",
"0.51668596",
"0.5165286",
"0.5151755",
"0.51488745",
"0.5138973",
"0.513115",
"0.513115",
"0.513115",
"0.51281786",
"0.51253647",
"0.511235",
"0.5097691",
"0.50907755",
"0.50900424",
"0.50867283",
"0.508237",
"0.50800425",
"0.5072863",
"0.50697565",
"0.5063683",
"0.5046188",
"0.50333273",
"0.50141805",
"0.50098825",
"0.49924102",
"0.49920043",
"0.49884358",
"0.4966868"
]
| 0.6069413 | 13 |
Returns the name of the font. | public String getName() {
return name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName() {\n return fontName;\n }",
"public String fontName() {\n\t\treturn fontName;\n\t}",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public String getFontName()\n {\n return font.getFontName();\n }",
"public String getFontName() {\n\t\treturn this.fontName;\n\t}",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public String getFontNameText()\r\n\t{\r\n\t\treturn fontNameTextField.getText(); // return the text in the Font Name text field\r\n\t}",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public String getFontName() {\n return getFontName(Locale.getDefault());\n }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public Font GetFont(String name) { return FontList.get(name); }",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"public String getFont() {\n return font;\n }",
"public FontFinder getFontFinder() {\n return NameFont;\n }",
"public Font getFont(\n )\n {return font;}",
"public static Font getFont() {\n return getFont(12);\n }",
"public static String getFontName() {\n return \"Comic Sans MS\";\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}",
"public String getFontName(Locale l) {\n if (l == null) {\n throw new NullPointerException(\"null locale doesn't mean default\");\n }\n\treturn getFont2D().getFontName(l);\n }",
"public Font getLabelFont();",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public String getMatchFontName();",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"abstract Font getFont();",
"public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}",
"protected String createFontReference(Font font)\n {\n String fontName = font.getName();\n\n StringBuffer psFontName = new StringBuffer();\n for (int i = 0; i < fontName.length(); i++)\n {\n char c = fontName.charAt(i);\n if (!Character.isWhitespace(c))\n {\n psFontName.append(c);\n }\n }\n\n boolean hyphen = false;\n if (font.isBold())\n {\n hyphen = true;\n psFontName.append(\"-Bold\");\n }\n if (font.isItalic())\n {\n psFontName.append((hyphen ? \"\" : \"-\") + \"Italic\");\n }\n\n fontName = psFontName.toString();\n fontName = psFontNames.getProperty(fontName, fontName);\n return fontName;\n }",
"public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}",
"Font createFont();",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public Font getFont() {\n return this.font;\n }",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font font() {\n return font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public String getEmbeddedFontName() throws PDFNetException {\n/* 795 */ return GetEmbeddedFontName(this.a);\n/* */ }",
"public Font getFont() {\n return font;\n }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public String getFont(String id)\n\t{\n\t\tString font = fontElementMap.get(id);\n\t\tif (font == null)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn font;\n\t\t}\n\t}",
"public String toString() {\n String name = null;\n if (font != null)\n name = font.getName();\n return super.getPObjectReference() + \" FONTDESCRIPTOR= \" + entries.toString() + \" - \" + name;\n }",
"public abstract Font getFont();",
"private String getFontTag()\n\t{\n\t\treturn \"<\" + getFontName() + \" \" + getFontValue() + \">\";\n\t}",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public IconBuilder fontName(String font) {\n\t\tthis.fontName = font;\n\t\treturn this;\n\t}",
"public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }",
"public void setFontName(String name)\n {\n font.setFontName(name);\n }",
"public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}",
"public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }",
"public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"private String getFallbackFontName(PDFontDescriptor fontDescriptor) {\n/* */ String fontName;\n/* 235 */ if (fontDescriptor != null) {\n/* */ \n/* */ \n/* 238 */ boolean isBold = false;\n/* 239 */ String name = fontDescriptor.getFontName();\n/* 240 */ if (name != null) {\n/* */ \n/* 242 */ String lower = fontDescriptor.getFontName().toLowerCase();\n/* */ \n/* */ \n/* 245 */ isBold = (lower.contains(\"bold\") || lower.contains(\"black\") || lower.contains(\"heavy\"));\n/* */ } \n/* */ \n/* */ \n/* 249 */ if (fontDescriptor.isFixedPitch()) {\n/* */ \n/* 251 */ fontName = \"Courier\";\n/* 252 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 254 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 256 */ else if (isBold)\n/* */ {\n/* 258 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 260 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 262 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* 265 */ } else if (fontDescriptor.isSerif()) {\n/* */ \n/* 267 */ fontName = \"Times\";\n/* 268 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 270 */ fontName = fontName + \"-BoldItalic\";\n/* */ }\n/* 272 */ else if (isBold)\n/* */ {\n/* 274 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 276 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 278 */ fontName = fontName + \"-Italic\";\n/* */ }\n/* */ else\n/* */ {\n/* 282 */ fontName = fontName + \"-Roman\";\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 287 */ fontName = \"Helvetica\";\n/* 288 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 290 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 292 */ else if (isBold)\n/* */ {\n/* 294 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 296 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 298 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 305 */ fontName = \"Times-Roman\";\n/* */ } \n/* 307 */ return fontName;\n/* */ }",
"private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }",
"public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"FONT createFONT();",
"public Font createFont() {\n\t\treturn null;\n\t}",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public String getSoundFont() {\n\t\treturn soundFont;\n\t}",
"public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }",
"public static Font getDefaultFont() {\r\n return defaultFont;\r\n }",
"private FontInfo getFont(FontFormat format, String postScriptName) {\n/* 461 */ if (postScriptName.contains(\"+\"))\n/* */ {\n/* 463 */ postScriptName = postScriptName.substring(postScriptName.indexOf('+') + 1);\n/* */ }\n/* */ \n/* */ \n/* 467 */ FontInfo info = this.fontInfoByName.get(postScriptName);\n/* 468 */ if (info != null && info.getFormat() == format)\n/* */ {\n/* 470 */ return info;\n/* */ }\n/* 472 */ return null;\n/* */ }",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public static String getPersistentName(Font font) {\n final Map<String, String> problems = getPathologicalFonts();\n if (problems.containsKey(font.getName())) { // e.g. font.getName() is \"Tahoma Bold\" //NOI18N\n final Font test = new Font(font.getName(), font.getSize());\n if (test.getName().equals(font.getName())) {\n // OK\n return font.getName();\n } else {\n final String alternateName = problems.get(font.getName()); // e.g: \"Tahoma Negreta\" //NOI18N\n assert alternateName != null;\n final Font test2 = new Font(alternateName, font.getSize()); //NOI18N\n if (test2.getName().equals(font.getName())) {\n // OK\n return alternateName; // e.g: \"Tahoma Negreta\" //NOI18N\n }\n }\n }\n return font.getName();\n }",
"private static native Font createFont(String name, GFontPeer peer, int gdkfont);",
"public static String getFamily(String family){\n\t\tfor(String f : fontFamilies)\n\t\t\tif(f.equalsIgnoreCase(family))\n\t\t\t\treturn f;\n\t\treturn \"Dialog\";\n\t}",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"private FontBoxFont findFont(FontFormat format, String postScriptName) {\n/* 403 */ if (postScriptName == null)\n/* */ {\n/* 405 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 409 */ if (this.fontProvider == null)\n/* */ {\n/* 411 */ getProvider();\n/* */ }\n/* */ \n/* */ \n/* 415 */ FontInfo info = getFont(format, postScriptName);\n/* 416 */ if (info != null)\n/* */ {\n/* 418 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 422 */ info = getFont(format, postScriptName.replaceAll(\"-\", \"\"));\n/* 423 */ if (info != null)\n/* */ {\n/* 425 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 429 */ for (String substituteName : getSubstitutes(postScriptName)) {\n/* */ \n/* 431 */ info = getFont(format, substituteName);\n/* 432 */ if (info != null)\n/* */ {\n/* 434 */ return info.getFont();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 439 */ info = getFont(format, postScriptName.replaceAll(\",\", \"-\"));\n/* 440 */ if (info != null)\n/* */ {\n/* 442 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 446 */ info = getFont(format, postScriptName + \"-Regular\");\n/* 447 */ if (info != null)\n/* */ {\n/* 449 */ return info.getFont();\n/* */ }\n/* */ \n/* 452 */ return null;\n/* */ }",
"@Deprecated\r\n public String getFont()\r\n {\r\n return this.font;\r\n }",
"private Font getTitleFont() {\n\t\tFont f = lblTitle.getFont();\n\t\tf = f.deriveFont(Font.BOLD, PosUIManager.getTitleFontSize());\n\t\treturn f;\n\t}",
"public static Font getFont(String nm, Font font) {\n\tString str = null;\n\ttry {\n\t str =System.getProperty(nm);\n\t} catch(SecurityException e) {\n\t}\n\tif (str == null) {\n\t return font;\n\t}\n\treturn decode ( str );\n }",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public Font getJavaFont() {\n return javaFont;\n }",
"private Text initNameText(){\n Text name = new Text(Values.NAME);\n name.setStyle(\"-fx-font-weight: bold;\" + \"-fx-font-size: 24;\");\n return name;\n }",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public String getName() {\r\n\t\treturn LocalizedTextManager.getDefault().getProperty(name());\r\n\t}",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"public String getFontsCode() {\r\n\t\treturn fontsCode;\r\n\t}",
"public FontStyle getStyle();",
"public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}",
"public Font getLabelFont() {\n return labelFont;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public String getFamilyName() throws PDFNetException {\n/* 550 */ return GetFamilyName(this.a);\n/* */ }",
"public Set<String> getFonts() {\n return generators.keySet();\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"@Override\n\tpublic String getSymbolName()\n\t{\n\t\tVariableDeclarationContext ctx = getContext();\n\t\tNameContextExt nameContextExt = (NameContextExt)getExtendedContext(ctx.name());\n\t\treturn nameContextExt.getFormattedText();\n\t}",
"@Override\n\tpublic String getSymbolName()\n\t{\n\t\treturn getFormattedText();\n\t}",
"public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}",
"public FontFile getEmbeddedFont() {\n return font;\n }",
"public Font getFont(String property) {\r\n return calendarTable.getFont(property);\r\n }"
]
| [
"0.885907",
"0.86370295",
"0.8445566",
"0.8410254",
"0.80025977",
"0.78769946",
"0.78769946",
"0.78769946",
"0.7807253",
"0.77769965",
"0.77508056",
"0.7616797",
"0.75873524",
"0.75269645",
"0.7511171",
"0.7498516",
"0.74783146",
"0.7425876",
"0.74186325",
"0.7340844",
"0.7298442",
"0.72767276",
"0.7185779",
"0.71527904",
"0.71413136",
"0.71229804",
"0.7004555",
"0.69594204",
"0.6958676",
"0.6920345",
"0.6882718",
"0.6880939",
"0.68695694",
"0.68556356",
"0.6830004",
"0.6824864",
"0.6821401",
"0.6761879",
"0.6734017",
"0.67254084",
"0.67254084",
"0.6724113",
"0.67155486",
"0.67155486",
"0.67085534",
"0.67035496",
"0.669588",
"0.6682888",
"0.6638209",
"0.6618867",
"0.65975845",
"0.65800625",
"0.6567355",
"0.65584934",
"0.6532076",
"0.6515358",
"0.646741",
"0.6454083",
"0.642528",
"0.6404867",
"0.6400463",
"0.6387708",
"0.63597184",
"0.6339477",
"0.6337152",
"0.6318163",
"0.6305275",
"0.63021004",
"0.62932456",
"0.62898797",
"0.62821764",
"0.62040794",
"0.61930424",
"0.6150557",
"0.61287415",
"0.61222726",
"0.61153203",
"0.6109945",
"0.6106918",
"0.6101812",
"0.6077244",
"0.60652137",
"0.605063",
"0.5988939",
"0.59754723",
"0.59469056",
"0.5942308",
"0.59208196",
"0.5915419",
"0.59148425",
"0.5900788",
"0.5884263",
"0.5884263",
"0.5866817",
"0.58597803",
"0.58487356",
"0.58439296",
"0.5841173",
"0.58356875",
"0.582527",
"0.58168083"
]
| 0.0 | -1 |
Returns the height of the font. | public int getHeight() {
return height;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public short getFontHeight()\n {\n return font.getFontHeight();\n }",
"public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }",
"public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}",
"public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}",
"public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}",
"public float getFontHeight(float fontSize) {\n Font f = getNormalFont(fontSize);\n FontMetrics fm = svgGenerator.getFontMetrics(f);\n return fm.getHeight();\n }",
"private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }",
"public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }",
"private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }",
"public Number getHeight() {\n\t\treturn getAttribute(HEIGHT_TAG);\n\t}",
"public String getheight()\n\t{\n\t\treturn height.getText();\n\t}",
"public int height()\n throws Exception\n {\n return this.text.height();\n }",
"public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }",
"public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"public String getHeight() {\n return height;\n }",
"public String getHeight() {\n return height;\n }",
"public final String getHeight() {\n return this.height;\n }",
"public String getHeight() {\r\n if (height != null) {\r\n return height;\r\n }\r\n ValueBinding vb = getValueBinding(\"height\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) :\r\n DEFAULT_HEIGHT;\r\n }",
"public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}",
"public int getHeight() {\r\n\t\t\r\n\t\treturn height;\r\n\t}",
"public int getHeight() {\n\t\t\treturn height;\n\t\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight() {\n\t\treturn height;\n\t}",
"public float getHeight() {\r\n\t\treturn height;\r\n\t}",
"public float getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight(CharSequence text) {\r\n\t\tint height = 0, lineHeight = 0;\r\n\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tchar character = text.charAt(i);\r\n\r\n\t\t\tif (character == '\\n') { // New line\r\n\t\t\t\theight += lineHeight;\r\n\t\t\t\tlineHeight = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Ignore carriage returns\r\n\t\t\tif (character == '\\r') continue;\r\n\r\n\t\t\tGlyph glyph = glyphs.get(character);\r\n\t\t\tif (glyph == null) continue;\r\n\t\t\t\r\n\t\t\tlineHeight = Math.max(lineHeight, glyph.getHeight());\r\n\t\t}\r\n\r\n\t\theight += lineHeight;\r\n\t\treturn height;\r\n\t}",
"public int getHeight()\n\t{\n\t\treturn height;\n\t}",
"public int getHeight()\n\t{\n\t\treturn height;\n\t}",
"public int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}",
"public int getHeight() \n\t{\n\t\treturn height;\n\t}",
"public int getHeight()\n\t{\n\t\treturn this._height;\n\t}",
"public final int getHeight() {\r\n return height;\r\n }",
"public int getHeight() {\n return bala.getHeight();\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n\t\treturn getHeight(this);\n\t}",
"public float getHeight() {\n return height;\n }",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public double getHeight() {\n\t\treturn height;\n\t}",
"public int getHeight()\r\n\t{\r\n\t\treturn mHeight;\r\n\t}",
"public int getHeight() {\n return height;\n }",
"public double getHeight() {\r\n\t\treturn height;\r\n\t}",
"public int getHeight()\n\t{\n\t\treturn mHeight;\n\t}",
"public int getHeight() {\n\t\treturn this.height;\n\t}",
"public SVGLength getHeight() {\n return height;\n }",
"public int getHeight() {\r\n\t\treturn this.height;\r\n\t}",
"@Field(3) \n\tpublic int height() {\n\t\treturn this.io.getIntField(this, 3);\n\t}",
"public int getHeight() {\n return height_;\n }",
"public double getHeight() {\n return getElement().getHeight();\n }",
"public float getHeight() {\n return this.height;\n }",
"public double getHeight() {\n\t\t\treturn height.get();\n\t\t}",
"public int getHeight() {\n return mHeight;\n }",
"public int getHeight() {\n return mHeight;\n }",
"public double getHeight() {\r\n return height;\r\n }",
"public double getHeight() {\n return height;\n }",
"public double getHeight() {\n return height;\n }",
"public final float getHeight() {\n return mHeight;\n }",
"public double getHeight () {\n return height;\n }",
"String getHeight();",
"String getHeight();",
"public int getHeight() {\n return this.height;\n }",
"public int getHeight() {\n return this.height;\n }",
"public int getHeight() {\n return this.height;\n }",
"public int getHeight() {\n return height_;\n }",
"public int getHeight()\n {\n return height;\n }",
"public int getHeight()\n {\n \treturn height;\n }",
"public double getHeight()\r\n {\r\n return height;\r\n }",
"public int getHeight()\n {\n return this.height;\n }",
"public float getHeight();",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return height;\n }",
"public int getHeight() {\n return this.height;\n }",
"public int getHeight() {\r\n\t\treturn height + yIndent;\r\n\t}",
"public double getHeight()\r\n {\r\n return height;\r\n }",
"private double getHeight() {\n\t\treturn height;\n\t}"
]
| [
"0.86764705",
"0.8495136",
"0.8467608",
"0.84539247",
"0.79353064",
"0.7745774",
"0.7730932",
"0.76584977",
"0.7591307",
"0.7218553",
"0.72081065",
"0.7174114",
"0.7171453",
"0.71463525",
"0.7127046",
"0.7080771",
"0.7080771",
"0.7053057",
"0.70220083",
"0.7016891",
"0.69796765",
"0.69794065",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.695746",
"0.69537693",
"0.69518477",
"0.6926056",
"0.69235104",
"0.69235104",
"0.6917515",
"0.6913259",
"0.690026",
"0.6882607",
"0.6870098",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.686991",
"0.68614143",
"0.68575275",
"0.6855733",
"0.6855733",
"0.6855733",
"0.6855733",
"0.6855733",
"0.6855733",
"0.68556863",
"0.68529385",
"0.68459934",
"0.68353873",
"0.68332225",
"0.6829102",
"0.6828589",
"0.682784",
"0.68228734",
"0.6819695",
"0.68106705",
"0.6809843",
"0.680026",
"0.680026",
"0.6792228",
"0.67898387",
"0.67898387",
"0.67893034",
"0.67837274",
"0.6782494",
"0.6782494",
"0.6767542",
"0.6767542",
"0.6767542",
"0.6753921",
"0.67502576",
"0.6737585",
"0.67347234",
"0.6725626",
"0.6720657",
"0.6716038",
"0.6716038",
"0.6716038",
"0.6713039",
"0.669743",
"0.6695843",
"0.66937524"
]
| 0.69449466 | 36 |
Returns the style of the font. | public int getStyle() {
return style;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FontStyle getStyle();",
"public TextStyle getStyle(\n )\n {return style;}",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public Font getFont(\n )\n {return font;}",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public RMTextStyle getStyle()\n {\n return new RMTextStyle(_style);\n }",
"Font getFont(int style) {\n\tswitch (style) {\n\t\tcase SWT.BOLD:\n\t\t\tif (boldFont != null) return boldFont;\n\t\t\treturn boldFont = new Font(device, getFontData(style));\n\t\tcase SWT.ITALIC:\n\t\t\tif (italicFont != null) return italicFont;\n\t\t\treturn italicFont = new Font(device, getFontData(style));\n\t\tcase SWT.BOLD | SWT.ITALIC:\n\t\t\tif (boldItalicFont != null) return boldItalicFont;\n\t\t\treturn boldItalicFont = new Font(device, getFontData(style));\n\t\tdefault:\n\t\t\treturn regularFont;\n\t}\n}",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"public String getFont() {\n return font;\n }",
"public static Font getFont() {\n return getFont(12);\n }",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public String getStyle() {\n\t\treturn style;\n\t}",
"public String getStyle() {\r\n return style;\r\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"Font getFont (StyleRange styleRange) {\n\tif (styleRange.font != null) return styleRange.font;\n\treturn getFont(styleRange.fontStyle);\n}",
"public Font getFont() {\n return this.font;\n }",
"abstract Font getFont();",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public TextStyle getTextStyle() {\n return this.textStyle;\n }",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public Font font() {\n return font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"protected Font getStyledFont(Control pControl, int pStyle) {\n\t\tFontData[] fd = pControl.getFont().getFontData();\n\t\tfor(int i = 0; i < fd.length; i++) {\n\t\t\tfd[i].setStyle(pStyle);\n\t\t}\n\t\tFont result = new Font(pControl.getDisplay(), fd);\n\t\treturn result;\n\t}",
"public Font getFont() {\n return font;\n }",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public abstract Font getFont();",
"public String getStyle() {\r\n if (style != null) {\r\n return style;\r\n }\r\n ValueBinding vb = getValueBinding(\"style\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) : null;\r\n }",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"Style getStyle();",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"public final String getStyleAttribute() {\n return getAttributeValue(\"style\");\n }",
"public Font deriveFont(int style){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public int getStyle() {\n\treturn style;\n }",
"public int getStyle() {\r\n\t\treturn this.style;\r\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public abstract String getStyle();",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"static Font getFont(int style, int size) {\n\t\treturn new Font(\"Monospaced\", style, size);\n\t}",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public Font GetFont(String name) { return FontList.get(name); }",
"Font createFont();",
"public String getFontName()\n {\n return font.getFontName();\n }",
"public final Color getFontColour() {\n return fontColour;\n }",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"FONT createFONT();",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public String getStyleName() {\r\n return getAttributeAsString(\"styleName\");\r\n }",
"public final String getFontColor() {\n\t\treturn fontColor;\n\t}",
"public static String guessStyle(String fontName) {\n if (fontName != null) {\n for (String word : ITALIC_WORDS) {\n if (fontName.indexOf(word) != -1) {\n return Font.STYLE_ITALIC;\n }\n }\n }\n return Font.STYLE_NORMAL;\n }",
"public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}",
"public Font createFont() {\n\t\treturn null;\n\t}",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public String getButtonFontStyle() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonFontStyle();\r\n\t}",
"public Font setFontStyle(String font){\n\t\treturn new Font(font, Font.BOLD, 1);\r\n\t}",
"public FontRenderer getFontRenderer()\n {\n return this.textRenderer;\n }",
"public Font getLabelFont();",
"public PatchTextStyleProperties font(String font) {\n this.font = font;\n return this;\n }",
"public Font getFont(String property) {\r\n return calendarTable.getFont(property);\r\n }",
"public Font deriveFont(int style, float size){\n\tHashtable newAttributes = (Hashtable)getRequestedAttributes().clone();\n\tapplyStyle(style, newAttributes);\n\tapplySize(size, newAttributes);\n return new Font(newAttributes, createdFont, font2DHandle);\n }",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public CodeStyle getStyle(){\r\n\t\treturn m_style;\r\n\t}",
"public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }",
"public String fontName() {\n\t\treturn fontName;\n\t}",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public static String getFontName() {\n return \"Comic Sans MS\";\n }",
"public HSSFCellStyle getStyle(HSSFWorkbook workbook) {\r\n\t\t// Set font\r\n\t\tHSSFFont font = workbook.createFont();\r\n\t\t// Set font size\r\n\t\t// font.setFontHeightInPoints((short)10);\r\n\t\t// Bold font\r\n\t\t// font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\r\n\t\t// Set font name\r\n\t\tfont.setFontName(\"Courier New\");\r\n\t\t// Set the style;\r\n\t\tHSSFCellStyle style = workbook.createCellStyle();\r\n\t\t// Set the bottom border;\r\n\t\tstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the bottom border color;\r\n\t\tstyle.setBottomBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the left border;\r\n\t\tstyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the left border color;\r\n\t\tstyle.setLeftBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the right border;\r\n\t\tstyle.setBorderRight(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the right border color;\r\n\t\tstyle.setRightBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the top border;\r\n\t\tstyle.setBorderTop(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the top border color;\r\n\t\tstyle.setTopBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Use the font set by the application in the style;\r\n\t\tstyle.setFont(font);\r\n\t\t// Set auto wrap;\r\n\t\tstyle.setWrapText(false);\r\n\t\t// Set the style of horizontal alignment to center alignment;\r\n\t\tstyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\r\n\t\t// Set the vertical alignment style to center alignment;\r\n\t\tstyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\r\n\r\n\t\treturn style;\r\n\r\n\t}",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;",
"public native final String fontColor() /*-{\n\t\treturn this.fontColor;\n\t}-*/;",
"private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}",
"public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }",
"public MarkStyle[] getStyles() {\n return styles_;\n }",
"private Font getFont(String fontColor, float fontSize, int fotStyle) {\n Font cellPaymentReciptFont = FontFactory.getFont(\"Arial\", 10f);\n if (null != fontColor && fontColor.equalsIgnoreCase(RED_COLOR)) {\n cellPaymentReciptFont.setColor(BaseColor.RED);\n } else if (null != fontColor && fontColor.equalsIgnoreCase(GREEN_COLOR)) {\n cellPaymentReciptFont.setColor(BaseColor.GREEN);\n } else {\n cellPaymentReciptFont.setColor(BaseColor.BLACK);\n }\n cellPaymentReciptFont.setSize(fontSize);\n cellPaymentReciptFont.setStyle(fotStyle);\n return cellPaymentReciptFont;\n }",
"public String getName() {\n return fontName;\n }",
"private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }",
"public FontRenderer getFontRenderer()\r\n\t{\n\t\treturn this.fontRenderer;\r\n\t}",
"public Font getFont(final String family, final int style, final int size) {\n collectGarbageInCache();\n\n String key = family + \"-\" + style + \"-\" + size;\n\n Reference cr = (Reference)fontCache.get(key);\n Font font = null;\n if (cr != null) {\n font = (Font)cr.get();\n }\n\n if (font == null) {\n font = new Font(family, style, size);\n fontCache.put(key, new CacheReference(key, font, queue));\n }\n\n return font;\n }",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}",
"public String getColorStyle() {\n return colorStyle;\n }",
"public Font getCellFont() {\n return cellFont;\n }",
"public String getFontName() {\n return getFontName(Locale.getDefault());\n }",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"public AttributeMap characterStyleAt(int pos) {\r\n checkPos(pos, NOT_GREATER_THAN_LENGTH);\r\n return fStyleBuffer.styleAt(pos);\r\n }",
"public float getFontSize();"
]
| [
"0.8845548",
"0.81193376",
"0.7851733",
"0.7641898",
"0.74857503",
"0.7472506",
"0.7401391",
"0.73961765",
"0.7377573",
"0.7317331",
"0.7283647",
"0.71935505",
"0.7181874",
"0.71771866",
"0.71771866",
"0.71771866",
"0.71771866",
"0.71731836",
"0.7170006",
"0.71556085",
"0.71497357",
"0.71358705",
"0.7133617",
"0.7124955",
"0.7077868",
"0.7064283",
"0.7064283",
"0.70603234",
"0.70603234",
"0.70534855",
"0.704419",
"0.7037424",
"0.6977467",
"0.69347763",
"0.68909717",
"0.6886379",
"0.68668365",
"0.6866472",
"0.6853324",
"0.68405026",
"0.683768",
"0.67878675",
"0.6787243",
"0.6761325",
"0.67592007",
"0.67256737",
"0.6711042",
"0.66640997",
"0.66341406",
"0.6613271",
"0.65665096",
"0.6547092",
"0.65279764",
"0.6498666",
"0.6497173",
"0.6494404",
"0.6494404",
"0.6494404",
"0.6489",
"0.6480074",
"0.64392656",
"0.64285475",
"0.6413216",
"0.6412289",
"0.6401972",
"0.6349606",
"0.632715",
"0.6317891",
"0.6280115",
"0.62758154",
"0.62559223",
"0.6248621",
"0.6241684",
"0.624099",
"0.6230754",
"0.622719",
"0.621154",
"0.6199087",
"0.61976117",
"0.61971045",
"0.6193015",
"0.6192708",
"0.6190817",
"0.61790115",
"0.6172229",
"0.6154604",
"0.6129189",
"0.6118173",
"0.61109436",
"0.6108547",
"0.61001855",
"0.6088107",
"0.6087378",
"0.60812646",
"0.6072527",
"0.6067853",
"0.6055906",
"0.6053784",
"0.60208285",
"0.6016949"
]
| 0.6897804 | 34 |
Sets the new font. | public void setFont(Font newFont) {
font = newFont;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFont(Font newFont) {\n\tfont = newFont;\n }",
"private void setFont() {\n\t}",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }",
"public void setFont(Font font) {\n this.font = font;\r\n repaint();\r\n }",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }",
"public void setFont(Font font)\n {\n this.font = font;\n }",
"public void setFont( Font font ) {\r\n this.font = font;\r\n }",
"public void setFont(Font font) {\n\tthis.font = font;\n }",
"public void setFont( Font font ) {\n\t\tgraphics.setFont( font );\n\t}",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"public void setFont(Font font)\r\n\t{\r\n\t\t_g2.setFont(font);\r\n\t}",
"public void setFont(AWTFont font) {\r\n\t\trenderer = createRendererFromAWTFont(font);\r\n\t\tthis.font = font;\r\n\t\tupdateValues();\r\n\t}",
"public void setTextFont(Font font);",
"public void setTextFont(Font font)\n {\n setFont(font);\n }",
"public void setFont(String font)\n {\n getStateHelper().put(PropertyKeys.font, font);\n }",
"void setFontFamily(ReaderFontSelection f);",
"public static void setFont(Font font){\n\t\tGComponent.fGlobalFont = font;\n\t}",
"private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}",
"private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }",
"public native void setFont(Font value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.font = [email protected]::getJsObj()();\n }-*/;",
"private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }",
"@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Times New Roman\", Font.BOLD, 18));\r\n }",
"public void setFont(org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont font)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().add_element_user(FONT$0);\n }\n target.set(font);\n }\n }",
"public void setFont(Font font)\n{\n\ttextArea().setFont(font);\n}",
"@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Arial\", Font.PLAIN, 11)); \r\n }",
"public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}",
"@Override\n public void setFont(Font f) {\n super.setFont(f);\n menuDirty = true;\n ResizeUtils.updateSize(this, actions);\n }",
"public void setFont(RMFont aFont) { }",
"public void setFont(String font) {\r\n\t\tProps p = getPage().getPageProperties();\r\n\t\t_fontTagStart = p.getProperty(font + Props.TAG_START);\r\n\t\t_fontTagEnd = p.getProperty(font + Props.TAG_END);\r\n\t}",
"public void setLabelFont(Font f);",
"public void setFont(BitmapFont font) {\n\t\tthis.font = font;\n\t\tthis.setLabel(this.label);\n\t}",
"public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}",
"private void initFontAndChange(Context context) {\n changeFont(context);\n }",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public void setFont(int fontId){\n this.fontId = fontId;\n }",
"public void setFontName(String name)\n {\n font.setFontName(name);\n }",
"public void setFont(Font newFont, Timing delay, Timing duration) {\r\n\t\tif (gen instanceof AdvancedTextGeneratorInterface)\r\n\t\t\t((AdvancedTextGeneratorInterface)gen).setFont(this, newFont, \r\n\t\t\t\t\tdelay, duration);\r\n\t\telse\r\n\t\t\tthrow new IllegalArgumentException(\"gen is not an AdvancedTextGeneratorInterface -- \" +gen);\r\n\r\n\t}",
"public void setFontSize(int font) {\n\t\tthis.font = font;\n\t}",
"public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }",
"public void saveFont()\r\n\t{\r\n\t\tsavedFont = g.getFont();\r\n\t}",
"public static void setFont(PApplet theApplet, String fontName, int fontSize){\n\t\tif(theApplet != null)\n\t\t\tGComponent.globalFont = GFont.getFont(theApplet, fontName, fontSize);\n\t}",
"public final void setFont(NativeCallback fontCallback) {\n\t\t// checks if consistent\n\t\tif (fontCallback != null) {\n\t\t\t// resets callback\n\t\t\tsetFont((FontCallback<DatasetContext>) null);\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, fontCallback);\n\t\t} else {\n\t\t\t// stores the font\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, getOriginalFont());\n\t\t}\n\t}",
"public void change_browser_font(Font font){\n\t\tbrowser_font = font;\n\t\tgui_globals.change_html_pane_font(this.browser, font);\n\t}",
"public void setFont(String property, Font font) {\r\n Font oldValue = calendarTable.getFont(property);\r\n if (font == oldValue) {\r\n return;\r\n }\r\n calendarTable.setFont(property, font);\r\n if (property.equals(FONT_PREFIX + \"Controls\")) {\r\n for(int i = 0, n = controlsPanel.getComponentCount(); i < n; i++) {\r\n controlsPanel.getComponent(i).setFont(font);\r\n }\r\n }\r\n firePropertyChange(\"Font.\" + property, oldValue, font);\r\n }",
"public void setTrueFont(Font font)\n\t{\n\t\tString bodyRule = \"body { font-family: \" + font.getFamily() + \"; \" +\n\t\t\t\t\"font-size: \" + font.getSize() + \"pt; }\";\n\t\t((HTMLDocument)getDocument()).getStyleSheet().addRule(bodyRule);\n\t\t//Sets the font for when the JEditorPane is switched to plain text.\n\t\tsetFont(font);\n\t}",
"public final void setConsoleFont(Font font) {\r\n\t\tconsole.setFont(font);\r\n\t}",
"public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}",
"public final void setFont(FontCallback<DatasetContext> fontCallback) {\n\t\t// sets the callback\n\t\tthis.fontCallback = fontCallback;\n\t\t// checks if consistent\n\t\tif (fontCallback != null) {\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, fontCallbackProxy.getProxy());\n\t\t} else {\n\t\t\t// stores the font\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, getOriginalFont());\n\t\t}\n\t}",
"public void changeFonts(){\n Typeface typeFace = Typeface.createFromAsset (this.getAssets (), \"fonts/courier.ttf\");\n sloganTV.setTypeface (typeFace);\n }",
"private void updateFontSet() {\n if (!isBigFontSet()) {\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), null);\n } else {\n// <snip> Install sscaled font\n FontPolicy windowsPolicy = FontPolicies.getDefaultWindowsPolicy();\n FontSet fontSet = windowsPolicy.getFontSet(null, UIManager\n .getLookAndFeelDefaults());\n WrapperFontSet scaled = new WrapperFontSet(fontSet, 5);\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), scaled);\n// </snip>\n }\n updateLookAndFeel();\n }",
"public void setFontNameText( String text )\r\n\t{\r\n\t\t// set the text in the Font Name text field as per the String passed in\r\n\t\tfontNameTextField.setText( text );\r\n\t}",
"public void setFont(Font f) {\n super.setFont(f);\n columnWidth = 0;\n }",
"public HintPad setFont(Font font) {\r\n\t\tthis.font = font;\r\n\t\treturn this;\r\n\t}",
"public void initFont() {\r\n\t\tFont dosFont = null;\r\n try {\r\n \t//setup font\r\n\t\t\t\tURL fontUrl = getURL(\"fonts/DOSFont.ttf\");\r\n\t\t \tdosFont = Font.createFont(Font.TRUETYPE_FONT, fontUrl.openStream());\r\n\t \tdosFont = dosFont.deriveFont(Font.PLAIN, 15);\r\n\t \tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t \tge.registerFont(dosFont);\r\n\t } catch(Exception e) {\r\n\t e.printStackTrace();\r\n\t System.exit(-1);\r\n\t }\r\n screen.setFont(dosFont);//set font on JTextArea\r\n\t}",
"public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }",
"public void setFontProgram(PdfFile fontProgram) {\n this.add(fontProgram);\n }",
"public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"public void setFont(String key, Font value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getName() + \" \" + value.getSize() + \" \" + value.getStyle());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}",
"private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }",
"public synchronized void setProvider(FontProvider fontProvider) {\n/* 136 */ this.fontInfoByName = createFontInfoByName(fontProvider.getFontInfo());\n/* 137 */ this.fontProvider = fontProvider;\n/* */ }",
"public void setFont(String str) {\n if (Strings.notEmpty(str)) {\n Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str);\n if (typeface != null) {\n this.textView.setTypeface(typeface);\n }\n }\n }",
"public void revertFont()\r\n\t{\r\n\t\tif (savedFont != null)\r\n\t\t{\r\n\t\t\tg.setFont(savedFont);\r\n\t\t}\r\n\t}",
"public final void setFontFamily(final String fontFamily) {\n if (!this.fontFamily.equals(fontFamily)) {\n this.fontFamily = fontFamily;\n flush();\n }\n\n }",
"private void loadSystemFont(String font){\n mFont = new Font(font, mFontStyle, (int)mFontSize);\n }",
"public Font setFontStyle(String font){\n\t\treturn new Font(font, Font.BOLD, 1);\r\n\t}",
"public void setModifierFont(String name, int type, int size, float tracking, Boolean kerning) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size, kerning, tracking);\n _SPR.RefreshModifierFont();\n }",
"public static void setFont(String fontName, int fontSize){\n\t\tsetFont(fontName, fontSize, Font.PLAIN);\n\t}",
"public void setHtmlFont(Font font) {\n htmlFont = font;\n if (fontStyle != null) {\n mainStyle.removeStyleSheet(fontStyle);\n }\n fontStyle = new StyleSheet();\n fontStyle.addRule(createCSS(font));\n mainStyle.addStyleSheet(fontStyle);\n }",
"@Override\n\tpublic void setText(CharSequence text, BufferType type) {\n\t\tString selected_font = StoreUtil.getInstance().selectFrom(\"fonts\");\n\t\tif(selected_font != null){\n\t\t\tif(selected_font.equals(\"myanmar3\")){\n\t\t\t\tif(text != null){\n\t\t\t\t\ttext = FontConverter.zg12uni51(text.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.setText(text, type);\n\t}",
"public static void setFont(Font font) {\n if (sThis != null && sThis.mLogPanel != null) {\n sThis.mLogPanel.setFont(font);\n }\n }",
"private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}",
"public void setFontSize(float fs) {\n\t\tif (fs != fontSize) {\n\t\t\tfontSize = fs;\n\t\t\treload();\n\t\t}\n\t}",
"public void setFont(Font f) {\n _separator.setFont(f);\n }",
"private void setFonts() {\n fileTitle.setFont(MasterDisplay.titleFont);\n entryFileButton.setFont(MasterDisplay.tabAndButtonFont);\n entryFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n itemFileButton.setFont(MasterDisplay.tabAndButtonFont);\n itemFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderButton.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderLabel.setFont(MasterDisplay.tabAndButtonFont);\n }",
"public PatchTextStyleProperties font(String font) {\n this.font = font;\n return this;\n }",
"public void setSelectedFontName( String fontName )\r\n\t{\r\n\t\t// set the currently selected font name as per the string passed in if it exists in the list\r\n\t\t// second parameter set to true so scroll pane will scroll to selected item\r\n\t\tfontNamesList.setSelectedValue( fontName, true );\r\n\t}",
"public void setMatchFontName(String matchFontName);",
"@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }",
"@FXML\r\n void fontAction() {\r\n // default css code for each characteristics of the text\r\n String textFont = \"-fx-font-family: \";\r\n String textSize = \"-fx-font-size: \";\r\n String textStyle = \"\";\r\n\r\n // Create and take the input from the Font dialog\r\n Dialog<Font> fontSelector = new FontSelectorDialog(null);\r\n Optional<Font> result = fontSelector.showAndWait();\r\n\r\n // add changes to the default CSS code above based on the users\r\n if (result.isPresent()) {\r\n Font newFont = result.get();\r\n textFont += \"\\\"\" + newFont.getFamily() + \"\\\";\";\r\n textSize += newFont.getSize() + \"px;\";\r\n\r\n // some basics CSS font characteristics\r\n String style = newFont.getStyle();\r\n String style_italic = \"-fx-font-style: italic;\";\r\n String style_regular = \"-fx-font-weight: normal ;\";\r\n String style_bold = \"-fx-font-weight: bold;\";\r\n switch (style) {\r\n case \"Bold Italic\":\r\n textStyle += style_bold + \"\\n\" + style_italic;\r\n case \"Italic\":\r\n textStyle += style_italic;\r\n case \"Regular\":\r\n textStyle += style_regular;\r\n case \"Regular Italic\":\r\n textStyle += style_italic;\r\n default:\r\n textStyle += style_bold;\r\n }\r\n\r\n // Add all characteristic to a single string\r\n String finalText = textFont + \"\\n\" + textSize;\r\n finalText += \"\\n\" + textStyle;\r\n // Display options and set that options to the text\r\n defOutput.setStyle(finalText);\r\n }\r\n }",
"public void init( )\n {\n metFont = new HersheyFont( getDocumentBase(), getParameter(\"font\"));\n }",
"void setFontSpacingSlider(Font font);",
"public Handler(Font f)\n {\n font_var=f; //sets font as font button selected\n }",
"private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}",
"Font createFont();",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}",
"private void setFontSize(float newFontSize) {\n\t\tfontSize = newFontSize;\n\t\tproperties.setProperty(\"fontSize\", Float.toString(newFontSize));\n\n\t\t// update all text-based components\n\t\tfor (Component c : components)\n\t\t\tc.setFont(c.getFont().deriveFont(newFontSize));\n\t\t\n\t\t// update machine graphics\n\t\tupdate(); \n\t}",
"public FontFactory(String font, int size, String text) {\n this.font = new Font(font, Font.BOLD, size);\n ttf = new TrueTypeFont(this.font, true);\n this.text = text;\n }",
"private void settypeface() {\n }",
"private void setupFonts()\r\n\t{\r\n\t\tSystem.out.println(\"In setupFonts()\");\r\n\t\t\r\n\t\t// set up the text fonts\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttextFont = Font.createFont(Font.TRUETYPE_FONT, AppletResourceLoader.getFileFromJar(GameConstants.PATH_FONTS + \"FOXLEY8_.ttf\"));\r\n\t\t\ttextFont = textFont.deriveFont(16.0f);\r\n\t\t\ttextFontBold = textFont.deriveFont(Font.BOLD, 16.0f);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"ERROR IN setupFonts(): \" + e.getClass().getName() + \" - \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public void setFontStyle(TextView textObject) {\n textObject.setTypeface(mFontStyle);\n }",
"private static void setUIFont(FontUIResource fontUIResource) {\n\t\t\n\t}",
"public LabelBuilder setFont(FontCallback<LabelsContext> fontColorCallback) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setFont(fontColorCallback);\n\t\treturn this;\n\t}",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public final void setFontColor(String fontColor) {\n\t\tthis.fontColor = fontColor;\n\t}",
"public static void setDefault(BitmapFont font) {\r\n\t\tdefaultFont = font;\r\n\t}",
"public void updateFonts() {\n\t\tfor (int i = 0; i < this.getMenuCount(); i++) {\n\t\t\tJMenu m;\n\t\t\tif ((m = getMenu(i)) != null) {\n\n\t\t\t\t// old method\n\t\t\t\t// problem with keyboard shortcuts\n\t\t\t\t// setMenuFontRecursive(m, app.getPlainFont());\n\n\t\t\t\t// force rebuild next time menu is opened\n\t\t\t\t// see BaseMenu.menuSelected()\n\t\t\t\tm.removeAll();\n\n\t\t\t\t// update title (always visible)\n\t\t\t\tm.setFont(app.getPlainFont());\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.8532785",
"0.8524866",
"0.8244018",
"0.82399887",
"0.82342726",
"0.8221185",
"0.8170964",
"0.8159825",
"0.8116784",
"0.8090571",
"0.80816936",
"0.8053811",
"0.80442774",
"0.8018192",
"0.7992164",
"0.78335136",
"0.7821905",
"0.7804512",
"0.78027904",
"0.7762853",
"0.7750205",
"0.77250886",
"0.7643671",
"0.7629572",
"0.7621091",
"0.7576298",
"0.7551217",
"0.7451243",
"0.74249935",
"0.74038655",
"0.7385183",
"0.73790103",
"0.73334634",
"0.7253957",
"0.7252319",
"0.7243294",
"0.7227576",
"0.7137345",
"0.7129325",
"0.71072924",
"0.7075196",
"0.70614475",
"0.7059285",
"0.7033032",
"0.7032516",
"0.7027221",
"0.70165163",
"0.69940776",
"0.6974058",
"0.6953881",
"0.69331706",
"0.68967295",
"0.6879828",
"0.6875178",
"0.68696094",
"0.6867735",
"0.6848571",
"0.68336517",
"0.6785556",
"0.6780314",
"0.6769745",
"0.67682064",
"0.67566437",
"0.67550313",
"0.6751836",
"0.674376",
"0.67209125",
"0.6688675",
"0.66864246",
"0.6686378",
"0.66187114",
"0.65743953",
"0.6568542",
"0.6554109",
"0.65491897",
"0.65450686",
"0.65214944",
"0.65147483",
"0.65114033",
"0.65097266",
"0.6498434",
"0.6464082",
"0.64567363",
"0.64500815",
"0.6437481",
"0.6432685",
"0.64253116",
"0.642153",
"0.6418014",
"0.6413055",
"0.64064604",
"0.6396845",
"0.6364798",
"0.6341044",
"0.6340715",
"0.63381803",
"0.6320583",
"0.6311942",
"0.63068277",
"0.6295874"
]
| 0.85477227 | 0 |
Indicates if the current font matches the given font data. | public boolean matches(FontData fd) {
return fd.getName().equals(name) && fd.getHeight() == height && fd.getStyle() == style;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static native boolean areFontsTheSame(int font1, int font2);",
"public boolean equals(Object obj) {\n if (obj == this) {\n\t return true;\n }\n\n\tif (obj != null) {\n\t try {\n\t Font font = (Font)obj;\n\t if ((size == font.size) &&\n\t\t(pointSize == font.pointSize) &&\n\t\t(style == font.style) &&\n (superscript == font.superscript) &&\n (width == font.width) &&\n\t\tname.equals(font.name)) {\n\t\t\n\t\tdouble[] thismat = this.getMatrix();\n\t\tdouble[] thatmat = font.getMatrix();\n\t \n\t\treturn thismat[0] == thatmat[0]\n\t\t && thismat[1] == thatmat[1]\n\t\t && thismat[2] == thatmat[2]\n\t\t && thismat[3] == thatmat[3]\n\t\t && thismat[4] == thatmat[4]\n\t\t && thismat[5] == thatmat[5];\n\t }\n\t }\n\t catch (ClassCastException e) {\n\t }\n\t}\n\treturn false;\n }",
"FontMatch(FontInfo info) {\n/* 704 */ this.info = info;\n/* */ }",
"public void setMatchFontName(String matchFontName);",
"public interface VisualFont extends VisualResource {\n /**\n * May be set to cause fonts with the corresponding name to be matched.\n */\n public String getMatchFontName();\n /**\n * May be set to cause fonts with the corresponding name to be matched.\n */\n public void setMatchFontName(String matchFontName);\n\n /**\n * Returns true result if the desired font was located, or false if it was \n * not. If this value is set to false, no other results are set. If this \n * value is set to true, all other results are set.\n */\n public boolean getExists();\n\n /**\n * When a font is matched, the name of the font is returned here.\n */\n public String getFontName();\n\n /**\n * Fetches the results of the next matching <code>VisualFont</code>, if \n * any.\n * @return \n */\n public boolean getNext();\n\n}",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"public String getMatchFontName();",
"public static boolean isFontCached(String fontName) {\n for (String name : mFontsCache.keySet()) {\n if (name.equals(fontName)) {\n return true;\n }\n }\n return false;\n }",
"public boolean isFontNameSelected()\r\n\t{\r\n\t\t// return false if Font Name list has nothing selected, true if an item is selected\r\n\t\treturn !fontNamesList.isSelectionEmpty();\r\n\t}",
"public boolean hasSoundFont() {\n\t\treturn soundFont != null;\n\t}",
"public boolean hasGlyph(String name) throws IOException;",
"boolean isAlwaysvectorfont();",
"public boolean isFontSet() { return false; }",
"private boolean isCharSetMatch(PDCIDSystemInfo cidSystemInfo, FontInfo info) {\n/* 655 */ if (info.getCIDSystemInfo() != null)\n/* */ {\n/* 657 */ return (info.getCIDSystemInfo().getRegistry().equals(cidSystemInfo.getRegistry()) && info\n/* 658 */ .getCIDSystemInfo().getOrdering().equals(cidSystemInfo.getOrdering()));\n/* */ }\n/* */ \n/* */ \n/* 662 */ long codePageRange = info.getCodePageRange();\n/* */ \n/* 664 */ long JIS_JAPAN = 131072L;\n/* 665 */ long CHINESE_SIMPLIFIED = 262144L;\n/* 666 */ long KOREAN_WANSUNG = 524288L;\n/* 667 */ long CHINESE_TRADITIONAL = 1048576L;\n/* 668 */ long KOREAN_JOHAB = 2097152L;\n/* */ \n/* 670 */ if (cidSystemInfo.getOrdering().equals(\"GB1\") && (codePageRange & CHINESE_SIMPLIFIED) == CHINESE_SIMPLIFIED)\n/* */ {\n/* */ \n/* 673 */ return true;\n/* */ }\n/* 675 */ if (cidSystemInfo.getOrdering().equals(\"CNS1\") && (codePageRange & CHINESE_TRADITIONAL) == CHINESE_TRADITIONAL)\n/* */ {\n/* */ \n/* 678 */ return true;\n/* */ }\n/* 680 */ if (cidSystemInfo.getOrdering().equals(\"Japan1\") && (codePageRange & JIS_JAPAN) == JIS_JAPAN)\n/* */ {\n/* */ \n/* 683 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 687 */ return ((cidSystemInfo.getOrdering().equals(\"Korea1\") && (codePageRange & KOREAN_WANSUNG) == KOREAN_WANSUNG) || (codePageRange & KOREAN_JOHAB) == KOREAN_JOHAB);\n/* */ }",
"abstract Font getFont();",
"boolean is(TextStyle style);",
"private PriorityQueue<FontMatch> getFontMatches(PDFontDescriptor fontDescriptor, PDCIDSystemInfo cidSystemInfo) {\n/* 543 */ PriorityQueue<FontMatch> queue = new PriorityQueue<FontMatch>(20);\n/* */ \n/* 545 */ for (FontInfo info : this.fontInfoByName.values()) {\n/* */ \n/* */ \n/* 548 */ if (cidSystemInfo != null && !isCharSetMatch(cidSystemInfo, info)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* 553 */ FontMatch match = new FontMatch(info);\n/* */ \n/* */ \n/* 556 */ if (fontDescriptor.getPanose() != null && info.getPanose() != null) {\n/* */ \n/* 558 */ PDPanoseClassification panose = fontDescriptor.getPanose().getPanose();\n/* 559 */ if (panose.getFamilyKind() == info.getPanose().getFamilyKind())\n/* */ {\n/* 561 */ if (panose.getFamilyKind() == 0 && (info\n/* 562 */ .getPostScriptName().toLowerCase().contains(\"barcode\") || info\n/* 563 */ .getPostScriptName().startsWith(\"Code\")) && \n/* 564 */ !probablyBarcodeFont(fontDescriptor)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 570 */ if (panose.getSerifStyle() == info.getPanose().getSerifStyle()) {\n/* */ \n/* */ \n/* 573 */ match.score += 2.0D;\n/* */ }\n/* 575 */ else if (panose.getSerifStyle() >= 2 && panose.getSerifStyle() <= 5 && info\n/* 576 */ .getPanose().getSerifStyle() >= 2 && info\n/* 577 */ .getPanose().getSerifStyle() <= 5) {\n/* */ \n/* */ \n/* 580 */ match.score++;\n/* */ }\n/* 582 */ else if (panose.getSerifStyle() >= 11 && panose.getSerifStyle() <= 13 && info\n/* 583 */ .getPanose().getSerifStyle() >= 11 && info\n/* 584 */ .getPanose().getSerifStyle() <= 13) {\n/* */ \n/* */ \n/* 587 */ match.score++;\n/* */ }\n/* 589 */ else if (panose.getSerifStyle() != 0 && info.getPanose().getSerifStyle() != 0) {\n/* */ \n/* */ \n/* 592 */ match.score--;\n/* */ } \n/* */ \n/* */ \n/* 596 */ int weight = info.getPanose().getWeight();\n/* 597 */ int weightClass = info.getWeightClassAsPanose();\n/* 598 */ if (Math.abs(weight - weightClass) > 2)\n/* */ {\n/* */ \n/* 601 */ weight = weightClass;\n/* */ }\n/* */ \n/* 604 */ if (panose.getWeight() == weight)\n/* */ {\n/* */ \n/* 607 */ match.score += 2.0D;\n/* */ }\n/* 609 */ else if (panose.getWeight() > 1 && weight > 1)\n/* */ {\n/* 611 */ float dist = Math.abs(panose.getWeight() - weight);\n/* 612 */ match.score += 1.0D - dist * 0.5D;\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 619 */ else if (fontDescriptor.getFontWeight() > 0.0F && info.getWeightClass() > 0) {\n/* */ \n/* */ \n/* 622 */ float dist = Math.abs(fontDescriptor.getFontWeight() - info.getWeightClass());\n/* 623 */ match.score += 1.0D - (dist / 100.0F) * 0.5D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 628 */ queue.add(match);\n/* */ } \n/* 630 */ return queue;\n/* */ }",
"public boolean hasOverrideFor(String fontKey) {\n return super.hasValueFor(fontKey);\n }",
"public void assertCustomFonts()\n {\n Style root = getStyle(\"base\");\n assertFonts(root);\n }",
"public Font findFont(boolean arg0, short arg1, short arg2, String arg3, boolean arg4, boolean arg5, short arg6,\n\t\t\tbyte arg7) {\n\t\treturn null;\n\t}",
"public static boolean hasTextFor(String text) {\n return AppText.getResourceBundleFor(text).containsKey(text);\n }",
"public Font getFont(\n )\n {return font;}",
"public Font GetFont(String name) { return FontList.get(name); }",
"@Test\n public void Test_FontList_Instances() throws Exception {\n PdfFont actual_font = null;\n PdfFont[] expected_font = new PdfFont[2];\n\n PdfResource resrc = new PdfResource();\n resrc.addFont(expected_font[0] = new PdfFont(PdfFont.HELVETICA, false, false));\n resrc.addFont(expected_font[1] = new PdfFont(PdfFont.COURIER, true, true));\n\n ArrayList<PdfFont> list = resrc.getFontList();\n for (int i = 0; i < list.size(); i++) {\n actual_font = (PdfFont) list.get(i);\n assertThat(actual_font, equalTo(expected_font[i]));\n }\n }",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"boolean matches(String medium, CSSCanvas canvas);",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public void GetFontA (){\n fontBolA = false;\n fontBolS = true;\n fontBol = true;\n fontBolW = true;\n }",
"@Test\n public final void test45338() throws IOException {\n Workbook wb = _testDataProvider.createWorkbook();\n int num0 = wb.getNumberOfFonts();\n\n Sheet s = wb.createSheet();\n s.createRow(0);\n s.createRow(1);\n s.getRow(0).createCell(0);\n s.getRow(1).createCell(0);\n\n //default font\n Font f1 = wb.getFontAt((short)0);\n assertFalse(f1.getBold());\n\n // Check that asking for the same font\n // multiple times gives you the same thing.\n // Otherwise, our tests wouldn't work!\n assertSame(wb.getFontAt((short)0), wb.getFontAt((short)0));\n\n // Look for a new font we have\n // yet to add\n assertNull(\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n\n Font nf = wb.createFont();\n short nfIdx = nf.getIndex();\n assertEquals(num0 + 1, wb.getNumberOfFonts());\n\n assertSame(nf, wb.getFontAt(nfIdx));\n\n nf.setBold(true);\n nf.setColor((short)123);\n nf.setFontHeightInPoints((short)22);\n nf.setFontName(\"Thingy\");\n nf.setItalic(false);\n nf.setStrikeout(true);\n nf.setTypeOffset((short)2);\n nf.setUnderline((byte)2);\n\n assertEquals(num0 + 1, wb.getNumberOfFonts());\n assertEquals(nf, wb.getFontAt(nfIdx));\n\n assertEquals(wb.getFontAt(nfIdx), wb.getFontAt(nfIdx));\n assertTrue(wb.getFontAt((short)0) != wb.getFontAt(nfIdx));\n\n // Find it now\n assertNotNull(\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n assertSame(nf,\n wb.findFont(\n true, (short)123, (short)(22*20),\n \"Thingy\", false, true, (short)2, (byte)2\n )\n );\n wb.close();\n }",
"public abstract Font getFont();",
"public abstract boolean matches(char c);",
"@Override\r\n public boolean isText ()\r\n {\r\n Shape shape = getShape();\r\n\r\n return (shape != null) && shape.isText();\r\n }",
"boolean hasText();",
"boolean hasText();",
"boolean hasText();",
"boolean hasText();",
"public String getFont() {\n return font;\n }",
"private static boolean dataAppearsToBeText(byte[] bytes)\n {\n \tint nontext = 0;\n \tint text = 0;\n \t// only read the first 1000 bytes, if the data is long...\n \tfor (int i = 0; i < bytes.length && i < 1000; i++)\n \t{\n \t\tbyte b = bytes[i];\n \t\tif ((b < 8 || b > 13) && (b < 32 || b > 126))\n \t\t{\n \t\t\tnontext++;\n \t\t}\n \t\telse\n \t\t{\n \t\t\ttext++;\n \t\t}\n \t}\n \t// if more than 95% of the characters fall in the normal text range, we'll consider it text... \n \treturn (text / ((double) nontext + text) > 0.95);\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"void setFontFamily(ReaderFontSelection f);",
"public boolean isTextPresent(final String textPattern);",
"public boolean isSerif() throws PDFNetException {\n/* 572 */ return IsSerif(this.a);\n/* */ }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public boolean matches(String query, String text) {\n\t\treturn text.contains(query);\n\t}",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"public BitmapFont loadBitmapFont(String fileFont, String fileImage);",
"public static boolean hasLargeFont(MetalTheme aTheme) {\n return aTheme == LARGE_FONT || aTheme == LOW_VISION;\n }",
"public void setTextFont(Font font);",
"public boolean matches(String target){\n return symbol.contains(target);\n }",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public void setFont(RMFont aFont) { }",
"public Font getFont() {\n\t\treturn f;\n\t}",
"boolean hasHadithText();",
"public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;",
"public void GetFontS (){\n fontBolS = false;\n fontBol = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"private boolean fileIsInTextFormat(byte[] fileBytesToVerify) {\r\n\r\n\t\tboolean isOk = false;\r\n\t\tTika tka = new Tika();\r\n\t\t\r\n\t\tisOk = tka.detect(fileBytesToVerify).equalsIgnoreCase(\"text/html\");\r\n\r\n\t\tif (this.debug) {\r\n\t\t\tprintln(isOk + \" found in fileIsInTextFormat in TextToAudioFile\");\r\n\t\t\tprintln(\"Contents of text file returned...\");\r\n\t\t\ttry {\r\n\t\t\t\tprintln(new String(fileBytesToVerify, \"UTF-8\"));\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isOk;\r\n\t}",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"public Font getFont() {\n return this.font;\n }",
"private synchronized static Font getFont(int gdkfont) {\n\n/*\t\t\n\t\t\tIterator i = fontToPeerMap.entrySet().iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tMap.Entry entry = (Map.Entry) i.next();\n\t\t\t\tGFontPeer peer = (GFontPeer) entry.getValue();\n\t\t\t\tif (areFontsTheSame(gdkfont, peer.data))\n\t\t\t\t\treturn (Font) entry.getKey();\n\t\t\t}\n*/\n\t\t\n\t\tIterator i = fontToPeerMap.entrySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) i.next();\n\t\t\tGFontPeer peer = (GFontPeer) entry.getValue();\n\t\t\tif (peer.gpf.containsGdkFont(gdkfont))\n\t\t\t\treturn (Font) entry.getKey();\n\t\t}\n\t\t\n\t\t// We need to generate a new font for the GdkFont.\n\t\t\t\n\t\t\tGFontPeer peer = new GFontPeer (gdkfont);\n\t\t\tFont font = createFont(\"GdkFont\" + (++generatedFontCount), peer, gdkfont);\n\t\t\tfontToPeerMap.put(font, peer);\n\t\t\treturn font;\n\t\t\n }",
"public boolean containsText(CharSequence s) {\n return content.toString().contains(s);\n }",
"private FontBoxFont findFont(FontFormat format, String postScriptName) {\n/* 403 */ if (postScriptName == null)\n/* */ {\n/* 405 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 409 */ if (this.fontProvider == null)\n/* */ {\n/* 411 */ getProvider();\n/* */ }\n/* */ \n/* */ \n/* 415 */ FontInfo info = getFont(format, postScriptName);\n/* 416 */ if (info != null)\n/* */ {\n/* 418 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 422 */ info = getFont(format, postScriptName.replaceAll(\"-\", \"\"));\n/* 423 */ if (info != null)\n/* */ {\n/* 425 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 429 */ for (String substituteName : getSubstitutes(postScriptName)) {\n/* */ \n/* 431 */ info = getFont(format, substituteName);\n/* 432 */ if (info != null)\n/* */ {\n/* 434 */ return info.getFont();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 439 */ info = getFont(format, postScriptName.replaceAll(\",\", \"-\"));\n/* 440 */ if (info != null)\n/* */ {\n/* 442 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 446 */ info = getFont(format, postScriptName + \"-Regular\");\n/* 447 */ if (info != null)\n/* */ {\n/* 449 */ return info.getFont();\n/* */ }\n/* */ \n/* 452 */ return null;\n/* */ }",
"public void GetFontW (){\n fontBolW = false;\n fontBolS = true;\n fontBolA = true;\n fontBol = true;\n }",
"private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"private void setFont() {\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"private void m4446a(Context context, C1112sb a) {\n this.f2976g = a.mo8653d(C0793R.styleable.TextAppearance_android_textStyle, this.f2976g);\n boolean z = false;\n if (a.mo8660g(C0793R.styleable.TextAppearance_android_fontFamily) || a.mo8660g(C0793R.styleable.TextAppearance_fontFamily)) {\n this.f2977h = null;\n int fontFamilyId = a.mo8660g(C0793R.styleable.TextAppearance_fontFamily) ? C0793R.styleable.TextAppearance_fontFamily : C0793R.styleable.TextAppearance_android_fontFamily;\n if (!context.isRestricted()) {\n try {\n this.f2977h = a.mo8646a(fontFamilyId, this.f2976g, new C0925E(this, new WeakReference<>(this.f2970a)));\n if (this.f2977h == null) {\n z = true;\n }\n this.f2978i = z;\n } catch (NotFoundException | UnsupportedOperationException e) {\n }\n }\n if (this.f2977h == null) {\n String fontFamilyName = a.mo8654d(fontFamilyId);\n if (fontFamilyName != null) {\n this.f2977h = Typeface.create(fontFamilyName, this.f2976g);\n }\n }\n return;\n }\n if (a.mo8660g(C0793R.styleable.TextAppearance_android_typeface)) {\n this.f2978i = false;\n int typefaceIndex = a.mo8653d(C0793R.styleable.TextAppearance_android_typeface, 1);\n if (typefaceIndex == 1) {\n this.f2977h = Typeface.SANS_SERIF;\n } else if (typefaceIndex == 2) {\n this.f2977h = Typeface.SERIF;\n } else if (typefaceIndex == 3) {\n this.f2977h = Typeface.MONOSPACE;\n }\n }\n }",
"public Font getFont() {\n return font;\n }",
"public boolean isIsFontUnderlined() {\n return isFontUnderlined;\n }",
"@Test\n public void Test_Output_Font() throws Exception {\n String actual_value = \"\";\n String expected_value = \"1 0 obj \\n<< \\n/ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] \\n\";\n expected_value += \"/Font \\n<< \\n/F2 \\n<< \\n/Type /Font \\n/BaseFont /Helvetica \\n/SubType /Type1 \\n\";\n expected_value += \">> \\n>> \\n>> \\n\";\n\n PdfResource resrc = new PdfResource();\n resrc.addFont(new PdfFont(PdfFont.HELVETICA, false, false));\n actual_value = new String(resrc.dumpInfo());\n \n assertThat(actual_value, equalTo(expected_value));\n }",
"public boolean isTextPainted() {\r\n return textPainted;\r\n }",
"public boolean isTextPainted() {\r\n return textPainted;\r\n }",
"private Boolean is_request_match(HashMap<String, HashMap<String, String>> queue_data,\r\n\t\t\tHashMap<String, HashMap<String, String>> design_data) {\n\t\tBoolean is_match = Boolean.valueOf(true);\r\n\t\tList<String> check_items = new ArrayList<String>();\r\n\t\tcheck_items.add(\"Software\");\r\n\t\tcheck_items.add(\"System\");\r\n\t\tcheck_items.add(\"Machine\");\r\n\t\tIterator<String> item_it = check_items.iterator();\r\n\t\twhile (item_it.hasNext()) {\r\n\t\t\tString item_name = item_it.next();\r\n\t\t\tHashMap<String, String> design_map = design_data.get(item_name);\r\n\t\t\tHashMap<String, String> queue_map = queue_data.get(item_name);\r\n\t\t\tBoolean request_match = design_map.equals(queue_map);\r\n\t\t\tif (!request_match) {\r\n\t\t\t\tis_match = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn is_match;\r\n\t}",
"public void setFont(Font font)\n {\n this.font = font;\n }",
"public boolean testHit(double x, double y, Graphics2D gc){\r\n if (textShape == null){\r\n return false;\r\n }\r\n int devScale = ((SunGraphics2D)gc).getSurfaceData().getDefaultScale();\r\n AffineTransform transform = new AffineTransform();\r\n transform.setToScale(devScale, devScale);\r\n Point.Double point = new Point2D.Double(x, y);\r\n Point.Double transformedPoint = new Point2D.Double(x, y);\r\n transform.transform(point, transformedPoint);\r\n java.awt.Rectangle test = new java.awt.Rectangle((int)Math.round(transformedPoint.getX()), (int)Math.round(transformedPoint.getY()), 1*devScale,1*devScale);\r\n if (gc.hit(test, textShape, true) || gc.hit(test, textShape, false)){\r\n return true;\r\n }\r\n return false;\r\n }",
"private java.awt.Font getFont(Feature feature, Font[] fonts) {\n if (fontFamilies == null) {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n fontFamilies = new HashSet();\n \n List f = Arrays.asList(ge.getAvailableFontFamilyNames());\n fontFamilies.addAll(f);\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"there are \" + fontFamilies.size() + \" fonts available\");\n }\n }\n \n java.awt.Font javaFont = null;\n \n int styleCode = 0;\n int size = 6;\n String requestedFont = \"\";\n \n for (int k = 0; k < fonts.length; k++) {\n requestedFont = fonts[k].getFontFamily().getValue(feature).toString();\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"trying to load \" + requestedFont);\n }\n \n if (loadedFonts.containsKey(requestedFont)) {\n javaFont = (java.awt.Font) loadedFonts.get(requestedFont);\n \n String reqStyle = (String) fonts[k].getFontStyle().getValue(feature);\n \n if (fontStyleLookup.containsKey(reqStyle)) {\n styleCode = ((Integer) fontStyleLookup.get(reqStyle)).intValue();\n } else {\n styleCode = java.awt.Font.PLAIN;\n }\n \n String reqWeight = (String) fonts[k].getFontWeight().getValue(feature);\n \n if (reqWeight.equalsIgnoreCase(\"Bold\")) {\n styleCode = styleCode | java.awt.Font.BOLD;\n }\n \n size = ((Number) fonts[k].getFontSize().getValue(feature)).intValue();\n \n return javaFont.deriveFont(styleCode, size);\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not already loaded\");\n }\n \n if (fontFamilies.contains(requestedFont)) {\n String reqStyle = (String) fonts[k].getFontStyle().getValue(feature);\n \n if (fontStyleLookup.containsKey(reqStyle)) {\n styleCode = ((Integer) fontStyleLookup.get(reqStyle)).intValue();\n } else {\n styleCode = java.awt.Font.PLAIN;\n }\n \n String reqWeight = (String) fonts[k].getFontWeight().getValue(feature);\n \n if (reqWeight.equalsIgnoreCase(\"Bold\")) {\n styleCode = styleCode | java.awt.Font.BOLD;\n }\n \n size = ((Number) fonts[k].getFontSize().getValue(feature)).intValue();\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"requesting \" + requestedFont + \" \" + styleCode + \" \" + size);\n }\n \n javaFont = new java.awt.Font(requestedFont, styleCode, size);\n loadedFonts.put(requestedFont, javaFont);\n \n return javaFont;\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not a system font\");\n }\n \n // may be its a file or url\n InputStream is = null;\n \n if (requestedFont.startsWith(\"http\") || requestedFont.startsWith(\"file:\")) {\n try {\n URL url = new URL(requestedFont);\n is = url.openStream();\n } catch (MalformedURLException mue) {\n // this may be ok - but we should mention it\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Bad url in java2drenderer\" + requestedFont + \"\\n\" + mue);\n }\n } catch (IOException ioe) {\n // we'll ignore this for the moment\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"IO error in java2drenderer \" + requestedFont + \"\\n\" + ioe);\n }\n }\n } else {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not a URL\");\n }\n \n File file = new File(requestedFont);\n \n //if(file.canRead()){\n try {\n is = new FileInputStream(file);\n } catch (FileNotFoundException fne) {\n // this may be ok - but we should mention it\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Bad file name in java2drenderer\" + requestedFont + \"\\n\" + fne);\n }\n }\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"about to load\");\n }\n \n if (is == null) {\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"null input stream\");\n }\n \n continue;\n }\n \n try {\n javaFont = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, is);\n } catch (FontFormatException ffe) {\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Font format error in java2drender \" + requestedFont + \"\\n\" + ffe);\n }\n \n continue;\n } catch (IOException ioe) {\n // we'll ignore this for the moment\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"IO error in java2drenderer \" + requestedFont + \"\\n\" + ioe);\n }\n \n continue;\n }\n \n loadedFonts.put(requestedFont, javaFont);\n \n return javaFont;\n }\n \n return null;\n }",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public boolean hasAttribute(final String attributeLocator, final String textPattern);",
"boolean isText(Object object);",
"public boolean hasText(final String elementLocator, final String textPattern);",
"public void setFont( Font font ) {\r\n this.font = font;\r\n }",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"public static synchronized String matchBestFontName(String fontNames) {\n String[] names = fontNames.trim().split(\"\\\\s*,\\\\s*\");\n if (availableFontNames.isEmpty()) {\n\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n String[] availableFontFamilyNames = ge.getAvailableFontFamilyNames();\n for (String availableName : availableFontFamilyNames) {\n availableFontNames.put(toSoundex(availableName), availableName);\n }\n }\n for (String name : names) {\n if (name.startsWith(\"$\")) {\n name = name.substring(1);\n Font font = Font.getFont(name);\n if (font != null)\n return font.getFontName();\n } else {\n String soundex = toSoundex(name);\n String fontName = availableFontNames.get(soundex);\n if (fontName != null)\n return name;\n }\n }\n return names[names.length - 1];\n }",
"public static boolean setSelectedDefaultFontName(String name) {\n return nativeSetSelectedDefaultFontName(name);\n }",
"public FontFile getEmbeddedFont() {\n return font;\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public static FontData[] getAllFonts() {\n if (fonts == null) {\n fonts = new ArrayList();\n\n String os = System.getProperty(\"os.name\");\n File[] locs = new File[0];\n\n if (os.startsWith(\"Windows\")) {\n locs = win32;\n }\n if (os.startsWith(\"Linux\")) {\n locs = linux;\n }\n if (os.startsWith(\"Mac OS\")) {\n locs = macos;\n }\n\n for (int i = 0; i < locs.length; i++) {\n File loc = locs[i];\n\n processFontDirectory(loc, fonts);\n }\n\n if (os.startsWith(\"Linux\")) {\n locateLinuxFonts(new File(\"/etc/fonts/fonts.conf\"));\n }\n }\n\n return (FontData[]) fonts.toArray(new FontData[0]);\n }",
"Font createFont();",
"public static boolean useIText() {\n\t\treturn (isWindows() || isLinux() || isSolaris());\n\t}",
"public static FontData getFontData() {\n IPreferenceStore store = HexEditorPlugin.getDefault()\n .getPreferenceStore();\n String name = store.getString(Preferences.FONT_NAME);\n int style = store.getInt(Preferences.FONT_STYLE);\n int size = store.getInt(Preferences.FONT_SIZE);\n FontData fontData = null;\n if (name != null && !name.isEmpty() && size > 0) {\n fontData = new FontData(name, size, style);\n } else {\n fontData = Preferences.getDefaultFontData();\n }\n\n return fontData;\n }",
"public BitmapFont loadBitmapFont(String fileFont, String fileImage, boolean flip);",
"private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }",
"public Font getLabelFont();"
]
| [
"0.6259226",
"0.6005657",
"0.5725034",
"0.5705788",
"0.5602689",
"0.55705136",
"0.55701065",
"0.5495111",
"0.5457409",
"0.5427953",
"0.5406597",
"0.5380848",
"0.53097564",
"0.5279417",
"0.52104485",
"0.5178527",
"0.5178185",
"0.51675713",
"0.5113612",
"0.50232375",
"0.49745363",
"0.4945041",
"0.48952633",
"0.4890777",
"0.48690915",
"0.48570144",
"0.48560792",
"0.48560792",
"0.48560792",
"0.48543283",
"0.4850412",
"0.4846338",
"0.48438153",
"0.48212665",
"0.48157355",
"0.48157355",
"0.48157355",
"0.48157355",
"0.4790662",
"0.4787117",
"0.47797427",
"0.4773176",
"0.47514907",
"0.47488543",
"0.47456795",
"0.47389093",
"0.47039458",
"0.46986037",
"0.46909514",
"0.46790496",
"0.46707302",
"0.4647029",
"0.46189487",
"0.4617473",
"0.46144179",
"0.46079585",
"0.4599218",
"0.4593062",
"0.4593062",
"0.45908827",
"0.4587887",
"0.45755237",
"0.45700926",
"0.45644554",
"0.4560607",
"0.45557818",
"0.45514268",
"0.4546261",
"0.4546261",
"0.4529091",
"0.4525327",
"0.45249376",
"0.45227438",
"0.44932413",
"0.44862968",
"0.44721612",
"0.44721612",
"0.44628096",
"0.4457291",
"0.4448101",
"0.44428283",
"0.44415063",
"0.4433495",
"0.44333538",
"0.442512",
"0.44243455",
"0.4422001",
"0.44194213",
"0.4413929",
"0.44137973",
"0.44079176",
"0.4403",
"0.43997964",
"0.43997556",
"0.43979928",
"0.43977988",
"0.4397071",
"0.43946034",
"0.4388174",
"0.43863627"
]
| 0.6875445 | 0 |
String launchType = DataProvider.getLaunchType(); String browser = DataProvider.getBrowser(); String locale = DataProvider.getLocale(); String remoteURL = DataProvider.getRemoteURL(); | public static WebDriver beforeTest(String launchType,String browser,String locale,String remoteURL) throws IOException{
try{
SetDriver sd=new SetDriver();
wd=sd.setDriver(launchType, browser, locale, remoteURL);
}catch(Exception e){
throw new RuntimeException("The The Driver setup Faild! Please check your environment configuration!");
}
return wd;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getBrowser();",
"protected int getLaunchType() {\n return ILaunchConstants.LAUNCH_TYPE_WEB_CLIENT;\n }",
"public String getBrowser() {\n String browser = null;\n\n try\n {\n browser = System.getProperty(\"browser\");\n if(browser !=null)\n return browser;\n else\n return prop.getProperty(BROWSER_KEY);\n\n\n }catch(Exception e)\n {\n return prop.getProperty(BROWSER_KEY);\n }\n\n\n }",
"public static final String getDataServerUrl() {\n\t\treturn \"http://uifolder.coolauncher.com.cn/iloong/pui/ServicesEngineV1/DataService\";\n\t}",
"String getVmUrl();",
"public static String getBrowser(){\n\t\treturn browser;\n\t}",
"public String getApp();",
"private void getDataFromMainActivity(){\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n site = bundle.getString(\"site\");\n }",
"public java.lang.String getBrowserurl() {\n return browserurl;\n }",
"public String getBrowserName(){\r\n\t\treturn rb.getProperty(\"browser\");\r\n\t}",
"String getSite();",
"String getInternetseite();",
"public abstract String getLaunchCommand();",
"public interface BaseDataProvider {\n String FireFoxProfileFromComputer = \"firefox.profile\";\n String FireFoxLocationFromPC = \"firefox.location.from.pc\";\n String ChromeLocationFromPC = \"chrome.location.from.pc\";\n String LOOPME_BIZ = \"loopme.biz\";\n String propertiesFile = \"src/test/resources/TestData.properties\";\n String APACH_LOG = \"org.apache.commons.logging.Log\";\n String JDK_14_LOGGER = \"org.apache.commons.logging.impl.Jdk14Logger\";\n String SOUCELABS_SELENIUM_VERSION = \"selenium.version\";\n String SOUCELABS_FIREFOXE_VERSION = \"firefox.version\";\n String SOUCELABS_IE_VERSION = \"ie.version\";\n String SOUCELABS_OS_WINDOWS7_PLATFORM = \"os.windows7.platform\";\n String SOUCELABS_MACOS_PLATFORM = \"os.macos.platform\";\n String SOUCELABS_OPERA_VERSION = \"opera.version\";\n String SOUCELABS_SAFARI_VERSION = \"safari.version\";\n String BROWSER_SAFARI = \"safari\";\n String BROWSER_FIREFOX = \"firefox\";\n String BROWSER_CHROME = \"chrome\";\n String BROWSER_INTERNET_EXPLORER= \"ie\";\n\n}",
"public String getBrowser(){\n\t\tif (prop.getProperty(\"browser\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"browser\");\n\t}",
"public static void main(String[] args) {\n\t\r\n\t PropertyFetcher prop = new PropertyFetcher();\r\n\t \r\n\t \r\n\t \r\n\t \r\nWebDriver driver=new ChromeDriver(); \r\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Kumarshobhitsoni/workspace/SeleniumPractice/chromedriver.exe\");\r\n//System.out.println(prop.getProperty(\"URL\"));\r\ndriver.get(prop.fetchProp(\"URL\"));\r\n\r\n//System.out.println(\"Hiii\");\r\n\r\n\t}",
"public String getLaunchType() {\n return this.launchType;\n }",
"public String getLaunchType() {\n return this.launchType;\n }",
"public static void main(String[] args) throws MalformedURLException {\n\t\t\r\n\t\tChromeOptions chromeoptions=new ChromeOptions();\r\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://192.168.225.206:6878/wd/hub\"),chromeoptions);\r\n\t\t\r\n\t\tdriver.get(\"http://opensource.demo.orangehrmlive.com\");\r\n\t\tSystem.out.println(\"URL opened\");\r\n\r\n\t}",
"public String getApplicationURL()\n\t{\n\t\tString url=pro.getProperty(\"baseURL\");\n\t\treturn url;\n\t}",
"public String readDataSourcePreferences(){\n\n String dataSourceURL = \"\";\n\n // Get the preferences\n final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences( context );\n\n Boolean dataSourceEnabled = sharedPreferences.getBoolean(\"data_source_check\", false);\n String dataSourcePreference = sharedPreferences.getString( \"data_source\", \"\" );\n\n if ( dataSourceEnabled ) {\n Log.d(\"DATA SOURCE\", sharedPreferences.getString(\"data_source\", \"\"));\n if ( dataSourcePreference.equals( \"Ninguna\" ) ) {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n else {\n dataSourceURL = dataSourcePreference;\n }\n }\n else {\n dataSourceURL = \"http://opendata.caceres.es/sparql\"; // default value\n }\n\n return dataSourceURL;\n }",
"static String getBrowserPath()\n \t{\n \t\tint os = PropertiesAndDirectories.os();\n \t\tString result = browserPath;\n \t\tif (result == null)\n \t\t{\n \t\t\tswitch (os)\n \t\t\t{\n \t\t\tcase PropertiesAndDirectories.XP:\n \t\t\tcase PropertiesAndDirectories.VISTA_AND_7:\n \t\t\t\tif (!Pref.lookupBoolean(\"navigate_with_ie\"))\n \t\t\t\t\tresult = FIREFOX_PATH_WINDOWS;\n \t\t\t\tif (result != null)\n \t\t\t\t{\n \t\t\t\t\tFile existentialTester = new File(result);\n \t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t{\n \t\t\t\t\t\tresult = FIREFOX_PATH_WINDOWS_64;\n \t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tresult = IE_PATH_WINDOWS;\n \t\t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t\t\tresult = null;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.MAC:\n \t\t\t\tresult = \"/usr/bin/open\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\terror(PropertiesAndDirectories.getOsName(), \"go(ParsedURL) not supported\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (result != null)\n \t\t\t{\n \t\t\t\tbrowserPath = result;\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"public void openmrsdemo() {\n\t\tutil.geturl(prop.getValue(\"locators.url\"));\n\t\tlogreport.info(\"Url loaded\");\n\t\tutil.maximize();\n\t}",
"String getProviderString();",
"public String getCurrentUrlConfig() {\n String primary = AbstractConfigHandler.getPrimaryDataServer();\n if (primary == null) {\n logger.debug(\"No primary dataserver found\");\n urlUnset();\n return null;\n } else {\n String url = addressHandler.getHttpAddress(primary);\n if (url == null) {\n logger.debug(\"No url set for dataserver: \" + primary);\n urlUnset();\n return null;\n } else {\n return verifyHttpProcess(url);\n }\n }\n }",
"@DataProvider(name = \"UIWidget-provider\")\n public static Object[][] getEnterpriseAndSite(ITestContext context) {\n\n //String uri=getApmUrl(context)+\"enterprises\";\n return combine(getEnterprises(context), getSites(context));\n\n\n\n }",
"public String getLauncher() {\n return launcher;\n }",
"DesktopAgent getDesktop();",
"public String getWlDataProvider() {\n\t\treturn wlDataProvider;\n\t}",
"@Override\n\tpublic final native String getURL() /*-{\n return this.URL;\n\t}-*/;",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\tWebDriver d=new ChromeDriver();\n\t\td.get(\"file:///C:/Users/SYED%20HASSAN/Desktop/selinium%202%20se/p1.html\");\n\t\tString title = d.getTitle();\n\t\tSystem.out.println(\"title = \"+title);\n\t\tString window = d.getWindowHandle();\n System.out.println(\"windowhandle\"+window);\n String c = d.getCurrentUrl();\n System.out.println(\"currenturl\"+c);\n d.close();\n System.out.println();\n\t}",
"public String getBrowserAsString() {\n return String.valueOf(FxJsfUtils.getRequest().getBrowser());\n }",
"public static URL getUrlForStartUpInfo(){\r\n\t\tString idCountry = P.getCountryId();\r\n\t\tint idBrand = Config.BRAND_ID_BE;\r\n\t\tString strUrl = getBaseURL() + \"account_services/api/1.0/static_content/app_startup_info/client_type/3/brand_id/\"+idBrand+\"/country/\"+idCountry;\r\n\t\treturn str2url(strUrl);\r\n\t}",
"public BrowserInfo getBrowserInfo() {\n return browserInfo;\n }",
"@Parameters({\"Browser\"})\n\t@BeforeTest\n\tpublic void launchBrowser(String Browser){\t\t\n//Method invokes extent report with the given name\n//'**********************************************************\n\t\textentTest = extentReports.startTest(\"Registration and Add to Cart\");\n\t\tdriver = com.wipro.browser.LaunchBrowser.openBrowser(Browser);\n\t\textentTest.log(LogStatus.PASS, \"Browser Launched and accessed application\");\n\t\t\n\t}",
"static String[] getNavigateArgs()\n \t{\n \t\tint os = PropertiesAndDirectories.os();\n \t\tString[] result = cachedNavigateArgs;\n \t\tif (result == null)\n \t\t{\n \t\t\tswitch (os)\n \t\t\t{\n \t\t\tcase PropertiesAndDirectories.XP:\n \t\t\tcase PropertiesAndDirectories.VISTA_AND_7:\n \t\t\t\tString path = null;\n \t\t\t\tif (!Pref.lookupBoolean(\"navigate_with_ie\"))\n \t\t\t\t\tpath = FIREFOX_PATH_WINDOWS;\n \t\t\t\tif (path != null)\n \t\t\t\t{\n \t\t\t\t\tFile existentialTester = new File(path);\n \t\t\t\t\tfirefoxExists = existentialTester.exists();\n \t\t\t\t\tif (!firefoxExists)\n \t\t\t\t\t{\n \t\t\t\t\t\tpath = FIREFOX_PATH_WINDOWS_64;\n \t\t\t\t\t\texistentialTester = new File(path);\n \t\t\t\t\t\tfirefoxExists = existentialTester.exists();\n \t\t\t\t\t}\n \t\t\t\t\tif (firefoxExists)\n \t\t\t\t\t{ // cool! firefox\n \t\t\t\t\t\tresult = new String[3];\n \t\t\t\t\t\tresult[0] = path;\n \t\t\t\t\t\tresult[1] = \"-new-tab\";\n \t\t\t\t\t} else {\n \t\t\t\t\t\t//Use the SCC Virtualization Path\n \t\t\t\t\t\tpath = FIREFOX_PATH_VIRT;\n \t\t\t\t\t\texistentialTester = new File(path);\n \t\t\t\t\t\tfirefoxExists = existentialTester.exists();\n \t\t\t\t\t\tif(firefoxExists)\n \t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult = new String[5];\n \t\t\t\t\t\t\tresult[0] = path;\n\t\t\t\t\t\t\tresult[1] = \"/launch\";\n\t\t\t\t\t\t\tresult[2] = \"\\\"Mozilla Firefox 11\\\"\";\n\t\t\t\t\t\t\tresult[3] = \"-new-tab\";\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t}\n \t\t\t\tif (result == null)\n \t\t\t\t{\n \t\t\t\t\tpath = IE_PATH_WINDOWS;\n \t\t\t\t\tFile existentialTester = new File(path);\n \t\t\t\t\tif (existentialTester.exists())\n \t\t\t\t\t{\n \t\t\t\t\t\tresult = new String[2];\n \t\t\t\t\t\tresult[0] = path;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.MAC:\n \t\t\t\tresult = new String[4];\n \t\t\t\tresult[0] = \"/usr/bin/open\";\n \t\t\t\tresult[1] = \"-a\";\n \t\t\t\tresult[2] = \"firefox\";\n \t\t\t\tfirefoxExists = true;\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.LINUX:\n \t\t\t\tresult = new String[2];\n \t\t\t\tresult[0] = FIREFOX_PATH_LINUX;\n \t\t\t\tfirefoxExists = true;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\terror(PropertiesAndDirectories.getOsName(), \"go(ParsedURL) not supported\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (result != null)\n \t\t\t{\n \t\t\t\tcachedNavigateArgs = result;\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"public String getCurrentUrl(){\n return seleniumDriver.getCurrentUrl();\n }",
"public WelcomeUpdataWin()\r\n {\r\n Map map = Executions.getCurrent().getArg();\r\n welcome = (Welcome) map.get(\"welcome\");\r\n // imageUrl = welcome.getImageUrl();\r\n }",
"public WebDriver openBrowser(String object, String data) {\n\n\t\ttry {\n\n\t\t\tString osName = System.getProperty(\"os.name\");\n\n\t\t\tlogger.debug(osName + \" platform detected\");\n\n\t\t\tosName = osName.toLowerCase();\n\n\t\t\tlogger.debug(osName);\n\n\t\t\tif (osName.indexOf(\"win\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start firefox under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t Proxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\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\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\t\t\t\tString sep = System.getProperty(\"file.separator\");\n\t\t\t\t\t\tFile dir=new File( System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t\t if(dir.exists()){\n\t\t\t\t\t\t\tlogger.debug(\"File Exits\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tprofile.setPreference(\"browser.download.folderList\",2);\n\t\t\t\t\t profile.setPreference(\"browser.download.manager.showWhenStarting\",false);\n\t\t\t\t\t profile.setPreference(\"browser.download.dir\", System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t FirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path\")));\n\t\t\t\t\t profile.addExtension(new File(System.getProperty(\"user.dir\")+ sep + \"externalFiles\"+sep+\"uploadFiles\"+sep+\"wave_toolbar-1.1.6-fx.xpi\"));\n\t\t\t\t\t \n\t\t\t\t\t System.setProperty( \"webdriver.gecko.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"gecko_path\")); // Added By Kashish\n\t\t\t\t\t \n\t\t\t\t\t /*Added by Nitin on 23 march 2016,capabilities for starting firefox in proxy mode*/\n\t\t\t\t\t driver = new FirefoxDriver(binary, profile, capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start chrome under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tProxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.setProperty(\t\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"chrome_path\"));\n\t\t\t\t\t\tMap<String, Object> prefs = new HashMap<String, Object>(); // Added Code to set Download Path and allowing Multiple downloads on Chrome\n\t\t\t\t\t\tprefs.put(\"profile.content_settings.pattern_pairs.*.multiple-automatic-downloads\", 1);\n\t\t\t\t\t\tprefs.put(\"download.default_directory\", System.getProperty(\"user.dir\")+ File.separator + \"externalFiles\" + File.separator + \"downloadFiles\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\t// options.setExperimentalOption(\"prefs\", prefs);\n\t\t\t\t\t\t options.addArguments(\"--disable-popup-blocking\"); // Added by Sanjay on 07 march 2016 , to disable popup blocking.\n\t\t\t\t\t\t\n\t\t\t\t\t\t /*Added by Nitin on 23 march 2016, capabilities to driver for starting chrome in proxy mode*/\n\t\t\t\t\t\t capabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\t\t\t\t\t driver = new ChromeDriver(capabilities);\n\t\t\t\t\t\t driver.manage().window().maximize();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\t\t\t\t\twait=new WebDriverWait(driver, explicitwaitTime);\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"mac\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path_mac\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tcapabilities.setJavascriptEnabled(false);\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.chrome.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"chrome_path_mac\"));\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\toptions.setBinary(CONFIG.getProperty(\"chrome_binary\"));\n\n\t\t\t\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"nix\") >= 0 || osName.indexOf(\"nux\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(\n\n\t\t\t\t\t\tCONFIG.getProperty(\"mozilla_path_linux\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\",\n\n\t\t\t\t\t\t\"ie_path_linux\");\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tnew DesiredCapabilities();\n\n\t\t\t\t\t\tURL serverurl = new URL(\"http://localhost:9515\");\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\n\n\t\t\t\t\t\t.chrome();\n\n\t\t\t\t\t\tdriver = new RemoteWebDriver(serverurl, capabilities);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn driver;\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}",
"String getWebsite();",
"private static BrowserType getBrowserType()\n\t{\n\t\tString browserType = System.getProperty(BROWSER_KEY);\n\t\tif (browserType == null || browserType.isEmpty())\n\t\t{ \n\t\t\treturn BrowserType.Firefox;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint type = Integer.parseInt(browserType);\n\t\t\t\n\t\t\tif (BrowserType.InternetExplorer.getCode() == type)\n\t\t\t{\n\t\t\t\treturn BrowserType.InternetExplorer;\n\t\t\t}\n\t\t\telse if (BrowserType.Chrome.getCode() == type)\n\t\t\t{\n\t\t\t\treturn BrowserType.Chrome;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn BrowserType.Firefox;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}",
"public String getRemoteURL(){\r\n\t\treturn this.remoteURL;\r\n\t}",
"public String getBrowserType(){\n\t\treturn browserType;\n\t}",
"String getDataFromScreen();",
"public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}",
"java.lang.String getManifestUrl();",
"public String getLaunchPath() {\n return this.LaunchPath;\n }",
"public String getCurrentURLOfPage(){\n return driver.getCurrentUrl();\n\n }",
"public static String getBrowser() {\n if (System.getProperty(\"browser\") == null) {\n return \"chrome\";\n } else {\n return System.getProperty(\"browser\").toLowerCase();\n }\n }",
"private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }",
"public String getCurrentURL()\n\t{\n\t\treturn driver.getCurrentUrl();\n\t}",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"public String m11054a() {\n return this.f7636a.mWebView.getCurrentUrl();\n }",
"@Override\n public String getWeb() {\n return web;\n }",
"public static String getChosenBrowser() {\n return CHOSEN_BROWSER;\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 static void openURLBasedOnDbDomain() throws Exception\r\n\t{\r\n\t\tString DbDomain = FilesAndFolders.getPropValue(\"DbDomain\");\r\n\t\tString url;\r\n\t\tint flag;\r\n\r\n\t\tdeleteCookies(); \r\n\t\t//IronWasp Connection logic for Security Testing\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\ttry\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\t\t\tcatch(ConnectException e)\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tReporter.log(\"IronWasp Server has not been started...Ignore this error if you don't wish to track your test flow traffic & requests for IronWasp...\",true);\r\n\t\t\t//\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\tswitch(DbDomain)\r\n\t\t{\r\n\t\tcase \"jenkins\":\r\n\t\t\turl = FilesAndFolders.getPropValue(\"urlJenkinsServer\");\r\n\t\t\tSystem.out.println(\"url: \" + url);\r\n\t\t\tdriver.get(url);\r\n\t\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\t\t\tflag=1;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"qa\":\r\n\t\t\turl = FilesAndFolders.getPropValue(\"urlQaServer\");\r\n\t\t\tSystem.out.println(\"url: \" + url);\r\n\t\t\tdriver.get(url);\r\n\t\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\t\t\tflag=1;\r\n\t\t\tbreak;\r\n\t\tcase \"automation\":\r\n\t\t\turl = FilesAndFolders.getPropValue(\"urlAutomationServer\");\r\n\t\t\tSystem.out.println(\"url: \" + url);\r\n\t\t\tdriver.get(url);\r\n\t\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\t\t\tflag=1;\r\n\t\t\tbreak;\r\n\t\tcase \"production\":\r\n\t\t\turl = FilesAndFolders.getPropValue(\"urlProductionServer\");\r\n\t\t\tSystem.out.println(\"url: \" + url);\r\n\t\t\tdriver.get(url);\r\n\t\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\t\t\tflag=1;\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tflag=0;\r\n\t\t\tAssert.assertTrue(flag==1, \"URL from config file is a mismatch with available switch cases...\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t//handling ssl certification\r\n\t\ttry{\r\n\t\t\tdriver.navigate().to(\"javascript:document.getElementById('overridelink').click()\");\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\r\n\t\twindowMax();\r\n\t\tWebCommonMethods.implicitSleep();\r\n\t}",
"private String getObjectNameFromLauncherUrl(String launchUrl) {\n if (launchUrl != null) {\n String[] domainParts = launchUrl.split(\"\\\\.\");\n return domainParts[0].replace(Constants.LAUNCHER_URL_PREFIX, Constants.BPG_APP_TYPE_LAUNCHER);\n }\n\n throw new IllegalArgumentException(\"Null launcher URL cannot be processed.\");\n }",
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }",
"public String getClientMachine();",
"public String getCurrentUrl() {\n \t\treturn getWebDriver().getCurrentUrl();\n \t}",
"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 URL getProviderURL () {\n return impl.getProviderURL ();\n }",
"private static WebDriver launchRemoteDriver()\n\t{\n\t\t\n\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.firefox();\n\t\ttry {\n\t\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn new InternetExplorerDriver();\n\t\t} catch (MalformedURLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}",
"public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}",
"public void geturl() {\n\t \t\n\t \t driver.get(prop.getProperty(\"url\"));\n\t \t \n\t \t String title=driver.getTitle();\n\t \t \n\t \t System.out.println(title);\n\t \t\t\n\t\t\t driver.manage().window().maximize();\n\t\t\t \n\t\t\t driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\t\t \n\t\t\t driver.manage().deleteAllCookies();\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {\n\t\tWebDriverManager.chromedriver().setup(); //boni garcia\r\n\t\t//WebDriverManager.firefoxdriver().setup();\r\n\t\t//for firefox use firefox word instead of chrome in chromederiver \r\n\t\t//note:selenium do not allow to access already opened browser or manually opened browser\r\n\t\t// step 1: launch a chrome browser (selenium)\r\n\t\t//call chromederiver class with any objectname here we used driver\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\t\t//FirefoxDriver driver = new FirefoxDriver();\r\n\t\t//step 2: load a url (get method---objname.get(driver.get)\r\n\t\tdriver.get(\"http://leaftaps.com/opentaps\");\r\n\t\t// step 3: get the title use gettitle method\r\n\t\tString title = driver.getTitle();\r\nSystem.out.println(title);\r\n//step 4: maximize the browser\r\ndriver.manage().window().maximize();\r\n//to close the window\r\n//driver.close();\r\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\nWebElement webUser = driver.findElement(By.id(\"username\")); //locate id\r\nwebUser.sendKeys(\"demosalesmanager\");\r\ndriver.findElement(By.id(\"password\")).sendKeys(\"crmsfa\"); //locate id\r\ndriver.findElement(By.className(\"decorativeSubmit\")).click();//locate classname\r\ndriver.findElement(By.linkText(\"CRM/SFA\")).click();\r\n//verify if correctly landed on home page\r\nString frontTitle = \"My Home | opentaps CRM\";\r\nString homeTitle = driver.getTitle();\r\nif(frontTitle.equals(homeTitle)) {\r\n\tSystem.out.println(\"in the home page\");\r\n}\r\nelse\r\nSystem.out.println(\"not in the home page\"); \r\n//driver.findElement(By.linkText(\"http://leaftaps.com/crmsfa/control/leadsMain\")).click();\r\n\t}",
"private String getSource() {\n SharedPreferences settings =\n PreferenceManager.getDefaultSharedPreferences(Collect.getInstance().getBaseContext());\n String serverUrl = settings.getString(PreferencesActivity.KEY_SERVER_URL, null);\n String source = null;\n // Remove the protocol\n if(serverUrl.startsWith(\"http\")) {\n \tint idx = serverUrl.indexOf(\"//\");\n \tif(idx > 0) {\n \t\tsource = serverUrl.substring(idx + 2);\n \t} else {\n \t\tsource = serverUrl;\n \t}\n }\n \n return source;\n }",
"public abstract String getDataFileUrl ();",
"private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }",
"String getIntegHost();",
"public static void main(String[] args) {\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //this 3 things need to be done to open a browser\n driver.get(\"https://practice.cybertekschool.com\");\n\n String title = driver.getTitle();\n\n //soutv--> you don need to write \"title\"\n System.out.println(\"title = \" + title);\n\n String currntUrl= driver.getCurrentUrl();\n System.out.println(\"currntUrl = \" + currntUrl);\n\n //get the source of the page\n String pageSource = driver.getPageSource();\n System.out.println(\"pageSource = \" + pageSource);\n\n\n }",
"Object getPlatform();",
"private static DesiredCapabilities getBrowserCapabilities(String browserType) {\r\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\r\n\t\tswitch (browserType) {\r\n\t\tcase \"firefox\":\r\n\t\t\tSystem.out.println(\"Opening firefox driver\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tbreak;\r\n\t\tcase \"chrome\":\r\n\t\t\tSystem.out.println(\"Opening chrome driver\");\r\n\t\t\tcap = DesiredCapabilities.chrome();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"browser : \" + browserType + \" is invalid, Launching Firefox as browser of choice..\");\r\n\t\t\tcap = DesiredCapabilities.firefox();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn cap;\r\n\t}",
"public static void main(String[] args) throws FileNotFoundException {\n\r\n\t\r\n\t\tProperties property = new Properties();\r\n\t\t\r\n\t\tFileInputStream input=new FileInputStream(\"C:\\\\Users\\\\MY PC\\\\Desktop\\\\java\\\\SeleniumJava\\\\src\\\\Config\\\\Config.properties.exe\");\r\n\t\tproperty.load(input);\r\n\t\tSystem.out.println(property.getProperty(\"browser\"));\r\n\t\tSystem.out.println(property.getProperty(\"url\"));\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"public static String getCurrentURL() {\n\t\treturn driver.getCurrentUrl();\n\t}",
"@Override\n\tpublic void init() {\n\t\tif (myScreensContainer.getUserData() != null) {\n\t\t\tWebEngine webEngine = show_problem.getEngine();\n\t\t\twebEngine.load((String) myScreensContainer.getUserData());\n\t\t}\n\t}",
"public String getSiteUrl();",
"public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }",
"@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}",
"@Test\n public void testReturnsNullWhenNoBrowserInstalled() {\n String hostBrowser = WebApkUtils.getHostBrowserPackageName(mContext);\n Assert.assertNull(hostBrowser);\n }",
"public org.apache.axis2.databinding.types.soapencoding.String getCmdFileURL(){\n return localCmdFileURL;\n }",
"ApplicationData getActualAppData();",
"public String getServerDetails();",
"public static void main(String[] args) \r\n\t{\n\t\tString path=\"browser_drivers\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\r\n\t\tWebDriver driver=new ChromeDriver(); //Launch browser\r\n\t\tdriver.get(\"http://seleniumhq.org\"); //Load webpage\r\n\t\tdriver.manage().window().maximize(); //maximize browser window\r\n\t\t\r\n\t\t\r\n\t\tString Exp_url=\"https://www.seleniumhq.org/\";\r\n\t\t\r\n\t\t//Capture runtime url\r\n\t\tString Runtime_url=driver.getCurrentUrl();\r\n\t\t\t\t\r\n\t\tif(Runtime_url.equals(Exp_url))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Expected url presented for selenium homepage\");\r\n\t\t\t\r\n\t\t\tWebElement Download_tab=driver.findElement(By.xpath(\"//a[@title='Get Selenium']\"));\r\n\t\t\tDownload_tab.click();\r\n\t\t\t\r\n\t\t\tif(driver.getCurrentUrl().contains(\"download/\"))\r\n\t\t\t\tSystem.out.println(\"expected url presented, Downlaod page verified\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"expected url not presented, download page not verified\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wrong url presnted for selenium hompage\");\r\n\t\t}\r\n\t\r\n\t}",
"public String getThisApplicationUrl() {\n\t\tString tempFileDest = getProperties().getProperty(\"temp.file.dest\").trim();\n\t\tString thisApplicationUrl = null;\n\t\tif(tempFileDest != null && tempFileDest.contains(\"mysunflower\")){\n\t\t\tthisApplicationUrl = getPortalApplicationUrl();\n\t\t}else{\n\t\t\tthisApplicationUrl = getApplicationUrl();\n\t\t}\n\t\treturn thisApplicationUrl;\n\t}",
"Desktop getDesktop()\r\n {\r\n return Desktop.getDesktop();\r\n }",
"protected String getLoginProcess() {\r\n return loginProcess;\r\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tStart st = new Start();\n\t\t\n\t\tWebDriver drv = st.driverInit();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tString url = st.prop.getProperty(\"url\") ;\n\t\t\n\t\tdrv.get(url);\n\t\tSystem.out.println(dr.getTitle());\n\t\t\n\t\t\n\t\t\n \n\n\t}",
"public String getXPageAltClient();",
"public String getRemoteComputerString(){\n return this.remoteComputerString;\n }",
"public String getCurrentUrl() {\n return webDriver.getCurrentUrl();\n }",
"public static void main(String[] args) {\n\t\tString driverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\chromedriver.exe\";\n\t\t////D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\t//System.out.println(\"path - \"+ driverPath);\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\\src\\drivers\\chromedriver.exe\n\t\t//D:\\2021\\Batches_DATA\\SDET_0301\\LearnSelenium_03_01\\WebDriverBasics\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\n\t\tWebDriver chDriver = new ChromeDriver();//complex object\n\t\t//maximize\n\t\tchDriver.manage().window().maximize();\n\t\t\n\t\tchDriver.get(\"https://opensource-demo.orangehrmlive.com/\");\n\t\t\n\t\t//Webdriver -Interface, driver - ref var, CHromeDriver-class\n\t\t\n\t\t\n\t\t//Firefox Browser:\n//\t\tString ffDriverPath = System.getProperty(\"user.dir\")+\"\\\\src\\\\drivers\\\\geckodriver.exe\";\n//\t\tSystem.setProperty(\"webdriver.gecko.driver\", ffDriverPath);\n//\t\tWebDriver ffDriver = new FirefoxDriver();//complex object\n\t\t\n\t\t//get the current Url, title of application\n\t\t\n\t\t//chDriver.close();\n\t\t\n\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n System.out.println(user.getAccountID2());\n System.out.println(MainUiController.Username);\n System.out.println(user.bugReportID);\n \n }",
"void openInAppBrowser(String url, String title, String subtitle, int errorMsg);",
"public String getProviderUrl() {\r\n return providerUrl;\r\n }",
"public int getClientSite () {\n return clientSite;\n }",
"public void launch() throws IOException {\n \r\n FileInputStream fs=new FileInputStream(\"C:\\\\New folder\\\\PHPTravelers\\\\src\\\\main\\\\java\\\\file\\\\base.properties\");\r\n\t\tprop.load(fs);\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\rakshitha\\\\chromedriver.exe\"); \r\n\t\t\t\t driver = new ChromeDriver(); \r\n\t\t\t\t//driver.get(\"https://www.phptravels.net\");\r\n\t\t\t\t//System.out.println(driver.getTitle());\r\n\t\t\t\tdriver.manage().window().maximize();\r\n\t\t\t driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n\t\t\t driver.get(prop.getProperty(\"url\"));\r\n\t\t\r\n\t\t\r\n\t}",
"private String getDeviceUrl() {\n\n\t\treturn \"https://pcuser.cedock.com/uc/json\";\n\n\t}"
]
| [
"0.6496504",
"0.6273255",
"0.598239",
"0.5974808",
"0.5780147",
"0.57693386",
"0.5763954",
"0.5747203",
"0.5721383",
"0.5667112",
"0.566088",
"0.562647",
"0.5587604",
"0.55395424",
"0.5535391",
"0.55065364",
"0.54838514",
"0.54838514",
"0.54520476",
"0.5442406",
"0.54021233",
"0.53948724",
"0.5379289",
"0.5365329",
"0.5361382",
"0.5360872",
"0.5354303",
"0.5350071",
"0.5343417",
"0.5324831",
"0.5306229",
"0.530429",
"0.52946085",
"0.5274889",
"0.52735376",
"0.52706295",
"0.5266701",
"0.5260787",
"0.5250006",
"0.5245064",
"0.522771",
"0.52233636",
"0.5222249",
"0.52067965",
"0.5199581",
"0.51977366",
"0.51947606",
"0.51866037",
"0.5182465",
"0.51821655",
"0.51661927",
"0.515554",
"0.5152574",
"0.5138926",
"0.513888",
"0.5134408",
"0.5133559",
"0.5125651",
"0.51246077",
"0.5120336",
"0.5119877",
"0.5119692",
"0.5118618",
"0.51101154",
"0.5099602",
"0.5095368",
"0.50911635",
"0.50904185",
"0.50882787",
"0.5085053",
"0.50838137",
"0.5073912",
"0.50597245",
"0.5048915",
"0.503223",
"0.5030234",
"0.502805",
"0.5026456",
"0.50234044",
"0.50201607",
"0.50113326",
"0.50075364",
"0.50035524",
"0.5001317",
"0.50012755",
"0.49897352",
"0.49854127",
"0.49804443",
"0.49803457",
"0.4976619",
"0.49751323",
"0.49623576",
"0.49582225",
"0.4956926",
"0.49567148",
"0.49559265",
"0.4954834",
"0.49514246",
"0.4950182",
"0.49499956",
"0.49484953"
]
| 0.0 | -1 |
Draws textures on gui | public OptimiserGui(InventoryPlayer player, OptimiserTileEntity tileEntity) {
super(new OptimiserContainer(player, tileEntity));
this.player = player;
this.tileEntity = tileEntity;
this.xSize = XSIZE;
this.ySize = YSIZE;
this.optimiserHandler = new GuiOptimiserHandler(tileEntity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void draw() {\r\n\r\n//\t\tif (textures.length > 1) {\r\n//\t\t\tfor (int i = 1; i < textures.length; i++) {\r\n\t\tif (textures.length > 1) {\r\n\t\t\tDrawQuadWithTexture(textures[0], x, y, width, height);\r\n\t\t\tDrawQuadWithRotatedTexture(textures[1], x, y, width, height, angle);\r\n\t\t} else {\r\n\t\t\tDrawQuadWithRotatedTexture(textures[0], x, y, width, height, angle);\r\n\t\t}\r\n\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\t\r\n\t}",
"public static void load(){\n for(TextureHandler t : textures){\n if(t.texture!=null)t.texture.dispose();\n }\n textures.clear();\n \n //if the textures are corrupt or just arent there then the error TextureHandler will\n //be a placeholder which is generated programatically so it is always there\n int size = 64;\n Pixmap pixmap = new Pixmap(size,size, Format.RGBA8888 );\n pixmap.setColor(1f,0f,0f,1f);\n pixmap.fillCircle(size/2,size/2,size/2);\n pixmap.setColor(0f,0f,0f,1f);\n pixmap.fillCircle(size/2,size/2,(size/2)-2);\n pixmap.setColor(1f,0f,0f,1f);\n int offset = size/6;\n int length = (size+size)/3;\n pixmap.drawLine(offset,offset,offset+length,offset+length);\n pixmap.drawLine(offset+length,offset,offset,offset+length);\n error = new Texture(pixmap);\n pixmap.dispose();\n //things that get rendered the most get put at the top so theyre the first in the list\n textures.add(new TextureHandler(\"Block\" ,\"Block.png\",true));\n textures.add(new TextureHandler(\"Block1\",\"Block1.png\",true));\n textures.add(new TextureHandler(\"Block2\",\"Block2.png\",true));\n textures.add(new TextureHandler(\"Block3\",\"Block3.png\",true));\n textures.add(new TextureHandler(\"Block4\",\"Block4.png\",true));\n textures.add(new TextureHandler(\"GameBackground\",\"GameBackground.png\",true));\n \n textures.add(new TextureHandler(\"Hints\",\"Hints.png\",false));\n textures.add(new TextureHandler(\"Left\" ,\"ButtonLeft.png\",true));\n textures.add(new TextureHandler(\"Right\" ,\"ButtonRight.png\",true));\n textures.add(new TextureHandler(\"Rotate\",\"ButtonRotate.png\",true));\n textures.add(new TextureHandler(\"Pause\" ,\"ButtonPause.png\",true));\n textures.add(new TextureHandler(\"Label\" ,\"TextBox.png\",true));\n \n textures.add(new TextureHandler(\"Locked\",\"levels/Locked.png\",false));\n textures.add(new TextureHandler(\"Timer\",\"levels/Clock.png\",false));\n \n textures.add(new TextureHandler(\"PauseSelected\",\"SelectedPause.png\",true));\n textures.add(new TextureHandler(\"LeftSelected\",\"SelectedLeft.png\",true));\n textures.add(new TextureHandler(\"RightSelected\",\"SelectedRight.png\",true));\n textures.add(new TextureHandler(\"RotateSelected\",\"SelectedRotate.png\",true));\n \n textures.add(new TextureHandler(\"Background\",\"Background.png\",false));\n textures.add(new TextureHandler(\"Title\",\"MainMenuTitle.png\",false));\n\n }",
"private void renderTex() {\n final float\n w = xdim(),\n h = ydim(),\n x = xpos(),\n y = ypos() ;\n GL11.glBegin(GL11.GL_QUADS) ;\n GL11.glTexCoord2f(0, 0) ;\n GL11.glVertex2f(x, y + (h / 2)) ;\n GL11.glTexCoord2f(0, 1) ;\n GL11.glVertex2f(x + (w / 2), y + h) ;\n GL11.glTexCoord2f(1, 1) ;\n GL11.glVertex2f(x + w, y + (h / 2)) ;\n GL11.glTexCoord2f(1, 0) ;\n GL11.glVertex2f(x + (w / 2), y) ;\n GL11.glEnd() ;\n }",
"public void draw() {\t\t\n\t\ttexture.draw(x, y);\n\t\tstructure.getTexture().draw(x,y);\n\t}",
"public void draw() {\n\t\t\tfloat[] vertices = new float[mVertices.size()];\n\t\t\tfor (int i = 0; i < vertices.length; i++)\n\t\t\t\tvertices[i] = mVertices.get(i);\n\t\t\t\n\t\t\tfloat[] textureCoords = null;\n\t\t\tif (mTextureID != 0) {\n\t\t\t\ttextureCoords = new float[mTextureCoords.size()];\n\t\t\t\tfor (int i = 0; i < textureCoords.length; i++)\n\t\t\t\t\ttextureCoords[i] = mTextureCoords.get(i);\n\t\t\t}\n\t\t\t\n\t\t\tshort[] indices = new short[mIndices.size()];\n\t\t\tfor (int i = 0; i < indices.length; i++)\n\t\t\t\tindices[i] = mIndices.get(i);\n\t\t\t\n\t\t\t// Get OpenGL\n\t\t\tGL10 gl = GameGraphics2D.this.mGL;\n\t\t\t\n\t\t\t// Set render state\n\t\t\tgl.glDisable(GL10.GL_LIGHTING);\n\t\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\n\t\t\tgl.glEnable(GL10.GL_BLEND);\n\n\t\t\tif (mBlendingMode == BLENDING_MODE.ALPHA)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\n\t\t\telse if (mBlendingMode == BLENDING_MODE.ADDITIVE)\n\t\t\t\tgl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE);\n\t\t\t\n\t\t\tif (mTextureID != 0)\n\t\t\t\tgl.glEnable(GL10.GL_TEXTURE_2D);\n\t\t\telse\n\t\t\t\tgl.glDisable(GL10.GL_TEXTURE_2D);\n\t\t\t\n\t\t\t// Draw the batch of textured triangles\n\t\t\tgl.glColor4f(Color.red(mColour) / 255.0f,\n\t\t\t\t\t\t Color.green(mColour) / 255.0f,\n\t\t\t\t\t\t Color.blue(mColour) / 255.0f,\n\t\t\t\t\t\t Color.alpha(mColour) / 255.0f);\n\t\t\t\n\t\t\tif (mTextureID != 0) {\n\t\t\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID);\n\t\t\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(textureCoords));\n\t\t\t}\n\t\t\t\n\t\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, GameGraphics.getFloatBuffer(vertices));\n\t\t\tgl.glDrawElements(GL10.GL_TRIANGLES, indices.length,\n\t\t\t\t\tGL10.GL_UNSIGNED_SHORT, GameGraphics.getShortBuffer(indices));\n\t\t}",
"public void draw()\n\t{\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, texture_id);\n\t\tdrawMesh(gl);\n\t}",
"public void draw(GL2 gl, GLUT glut, Texture[] textures) {\n\t\t\r\n\t\tfor(int i = -10; i < 10; i++) {\r\n\t\t\tgl.glEnable(GL2.GL_TEXTURE_2D);\r\n\t\t\tgl.glBegin(GL2.GL_QUADS);\r\n\t\t\tgl.glColor3d(1, 1, 1);\r\n\t\t\t\r\n\t\t\ttextures[0].bind(gl);\r\n\t\t\ttextures[0].setTexParameterf(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);\r\n\t\t\ttextures[0].setTexParameterf(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);\r\n\t\t\ttextures[0].setTexParameterf(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);\r\n\t\t\ttextures[0].setTexParameterf(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);\r\n\t\t\t\r\n\t\t\tfor(int j = -10; j < 10; j++) {\r\n\t\t\t\tgl.glTexCoord2d(0, 0);\r\n\t\t\t\tgl.glVertex3d(i, y, j);\r\n\t\t\t\tgl.glTexCoord2d(1, 0);\r\n\t\t\t\tgl.glVertex3d(i + 1, y, j);\r\n\t\t\t\tgl.glTexCoord2d(1, 1);\r\n\t\t\t\tgl.glVertex3d(i + 1, y, j + 1);\r\n\t\t\t\tgl.glTexCoord2d(0, 1);\r\n\t\t\t\tgl.glVertex3d(i, y, j + 1);\r\n\t\t\t}\r\n\t\t\tgl.glEnd();\r\n\t\t}\r\n\t\t\r\n\t\tgl.glDisable(GL2.GL_TEXTURE_2D);\r\n\t}",
"public TextureDisplay() {\n initComponents();\n\n setPreferredSize(new Dimension(size, size));\n\n backImg = createBackImg();\n }",
"public void initGui()\r\n\t{\r\n\t\tthis.viewportTexture = new DynamicTexture(256, 256);\r\n\t\tthis.backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation(\"background\", this.viewportTexture);\r\n\t\tthis.widthCopyright = this.fontRenderer.getStringWidth(\"Copyright Mojang AB. Do not distribute!\");\r\n\t\tthis.widthCopyrightRest = this.width - this.widthCopyright - 2;\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(new Date());\r\n\r\n\t\tif (calendar.get(2) + 1 == 12 && calendar.get(5) == 24)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Merry X-mas!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 1 && calendar.get(5) == 1)\r\n\t\t{\r\n\t\t\tthis.splashText = \"Happy new year!\";\r\n\t\t}\r\n\t\telse if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31)\r\n\t\t{\r\n\t\t\tthis.splashText = \"OOoooOOOoooo! Spooky!\";\r\n\t\t}\r\n\r\n\t\tint i = 24;\r\n\t\tint j = this.height / 4 + 48;\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\tthis.addDemoButtons(j, 24);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.addSingleplayerMultiplayerButtons(j, 24);\r\n\t\t}\r\n\r\n\t\tthis.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 + 12, 98, 20, I18n.format(\"menu.options\")));\r\n\t\tthis.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 + 12, 98, 20, I18n.format(\"menu.quit\")));\r\n\r\n\t\tsynchronized (this.threadLock)\r\n\t\t{\r\n\t\t\tthis.openGLWarning1Width = this.fontRenderer.getStringWidth(this.openGLWarning1);\r\n\t\t\tthis.openGLWarning2Width = this.fontRenderer.getStringWidth(this.openGLWarning2);\r\n\t\t\tint k = Math.max(this.openGLWarning1Width, this.openGLWarning2Width);\r\n\t\t\tthis.openGLWarningX1 = (this.width - k) / 2;\r\n\t\t\tthis.openGLWarningY1 = (this.buttonList.get(0)).y - 24;\r\n\t\t\tthis.openGLWarningX2 = this.openGLWarningX1 + k;\r\n\t\t\tthis.openGLWarningY2 = this.openGLWarningY1 + 24;\r\n\t\t}\r\n\r\n\t\tthis.mc.setConnectedToRealms(false);\r\n\r\n\t\tif (Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS) && !this.hasCheckedForRealmsNotification)\r\n\t\t{\r\n\t\t\tRealmsBridge realmsbridge = new RealmsBridge();\r\n\t\t\tthis.realmsNotification = realmsbridge.getNotificationScreen(this);\r\n\t\t\tthis.hasCheckedForRealmsNotification = true;\r\n\t\t}\r\n\r\n\t\tif (this.areRealmsNotificationsEnabled())\r\n\t\t{\r\n\t\t\tthis.realmsNotification.setGuiSize(this.width, this.height);\r\n\t\t\tthis.realmsNotification.initGui();\r\n\t\t}\r\n\t}",
"protected void drawGUI() {\n batch.draw(background, 0, 0);\n }",
"public void drawImage() {\n mTextureRender.drawFrame(mSurfaceTexture);\n }",
"private void loadTextures() {\n textureIdMap.keySet().forEach((i) -> {\n //for (int i = 0; i < textureFileNames.length; i++) {\n try {\n URL textureURL;\n textureURL = getClass().getClassLoader().getResource(textureIdMap.get(i));\n if (textureURL != null) {\n BufferedImage img = ImageIO.read(textureURL);\n ImageUtil.flipImageVertically(img);\n Texture temp = AWTTextureIO.newTexture(GLProfile.getDefault(), img, true);\n temp.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP_TO_EDGE);\n temp.setTexParameteri(gl, GL2.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP_TO_EDGE);\n textures.put(i, temp);\n }\n } catch (IOException | GLException e) {\n e.printStackTrace();\n }\n });\n textures.get(0).enable(gl);\n }",
"private void drawImages() {\n\t\t\r\n\t}",
"private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n } else {\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n g.setColor(Color.white);\n g.drawLine(0, 500, 595, 500);\n player.render(g);\n for (int i = 0; i < aliens.size(); i++) {\n Alien al = aliens.get(i);\n al.render(g);\n }\n if (shotVisible) {\n shot.render(g);\n }\n\n if(gameOver==false)\n {\n gameOver();\n }\n for(Alien alien: aliens){\n Bomb b = alien.getBomb();\n b.render(g);\n }\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\n g.setFont(small);\n g.drawString(\"G - Guardar\", 10, 50);\n g.drawString(\"C - Cargar\", 10, 70);\n g.drawString(\"P - Pausa\", 10, 90);\n\n if(keyManager.pause)\n {\n g.drawString(\"PAUSA\", 250, 300);\n }\n \n bs.show();\n g.dispose();\n }\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void initGui() {\n\t\tthis.viewportTexture = new DynamicTexture(256, 256);\n\t\tthis.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation(\"background\", this.viewportTexture);\n\t\tCalendar var1 = Calendar.getInstance();\n\t\tvar1.setTime(new Date());\n\n\t\tif (var1.get(2) + 1 == 11 && var1.get(5) == 9) {\n\t\t\tthis.splashText = \"Happy birthday, ez!\";\n\t\t} else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) {\n\t\t\tthis.splashText = \"Happy birthday, Notch!\";\n\t\t} else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) {\n\t\t\tthis.splashText = \"Merry X-mas!\";\n\t\t} else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) {\n\t\t\tthis.splashText = \"Happy new year!\";\n\t\t} else if (var1.get(2) + 1 == 10 && var1.get(5) == 31) {\n\t\t\tthis.splashText = \"OOoooOOOoooo! Spooky!\";\n\t\t} else {\n\t\t\tthis.splashText = \"\";\n\t\t}\n\n\t\tboolean var2 = true;\n\t\tint var3 = this.height / 4 + 48;\n\n\t\tthis.addSingleplayerMultiplayerButtons();\n\n\t\tthis.buttonList.add(new GuiButton(0, this.width - 120, 3, 60, 20, I18n.format(\"menu.options\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(4, this.width - 54, 3, 50, 20, I18n.format(\"menu.quit\", new Object[0])));\n\n\t\t// Remove annoying language button\n\t\t// this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124,\n\t\t// var3 + 72 + 12));\n\n\t\tObject var4 = this.field_104025_t;\n\n\t\tsynchronized (this.field_104025_t) {\n\t\t\tthis.field_92023_s = this.fontRendererObj.getStringWidth(this.field_92025_p);\n\t\t\tthis.field_92024_r = this.fontRendererObj.getStringWidth(this.field_146972_A);\n\t\t\tint var5 = Math.max(this.field_92023_s, this.field_92024_r);\n\t\t\tthis.field_92022_t = (this.width - var5) / 2;\n\t\t\tthis.field_92021_u = ((GuiButton) this.buttonList.get(0)).yPosition - 24;\n\t\t\tthis.field_92020_v = this.field_92022_t + var5;\n\t\t\tthis.field_92019_w = this.field_92021_u + 24;\n\t\t}\n\t}",
"@Override\n\tpublic void setTexture(int texID) {\n\n\t}",
"public void draw(GL10 gl)\n\t{\t\n\t\t// bind the previously generated texture\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);\n\n\t\t// Point to our buffers\n\t\tgl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\n\t\tgl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\n\t\t// Point to our vertex buffer\n\t\tgl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);\n\t\tgl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);\n\n\t\tvertexBuffer.put(vertices_long);\n\t\tvertexBuffer.position(0);\n\n\t\tgl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices_long.length / 3);\n\n\t\tgl.glBindTexture(GL10.GL_TEXTURE_2D, textures[1]);\n\t\tvertexBuffer.put(vertices_lat);\n\t\tvertexBuffer.position(0);\n\t\tgl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices_lat.length / 3);\n\n\t\t// Disable the client state before leaving\n\t\tgl.glDisableClientState(GL10.GL_VERTEX_ARRAY);\n\t\tgl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n\t}",
"@SideOnly(Side.CLIENT)\n public static void drawTexture_Items(int x, int y, IIcon icon, int width, int height, float zLevel)\n {\n for(int i = 0; i < width; i += 16)\n for(int j = 0; j < height; j += 16)\n drawScaledTexturedRect_Items(x + i, y + j, icon, Math.min(width - i, 16), Math.min(height - j, 16),zLevel);\n \n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n }",
"@Override\n public void loadTexture() {\n\n }",
"public void draw(int texture){\n\t\tGLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0);\n\t\tGLES20.glUseProgram(program);\n\t\tGLES20.glDisable(GLES20.GL_BLEND);\n\n\t\tint positionHandle = GLES20.glGetAttribLocation(program, \"aPosition\");\n\t\tint textureHandle = GLES20.glGetUniformLocation(program, \"uTexture\");\n\t\tint texturePositionHandle = GLES20.glGetAttribLocation(program, \"aTexPosition\");\n\n\t\tGLES20.glVertexAttribPointer(texturePositionHandle, 2, GLES20.GL_FLOAT, false, 0, textureBuffer);\n\t\tGLES20.glEnableVertexAttribArray(texturePositionHandle);\n\n\t\tGLES20.glActiveTexture(GLES20.GL_TEXTURE0);\n\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture);\n\t\tGLES20.glUniform1i(textureHandle, 0);\n\n\t\tGLES20.glVertexAttribPointer(positionHandle, 2, GLES20.GL_FLOAT, false, 0, verticesBuffer);\n\t\tGLES20.glEnableVertexAttribArray(positionHandle);\n\n\t\tGLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n\t\tGLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);\n\t}",
"public static boolean render(int coordX, int coordY, int coordZ, int texture, Texture[] textureMap) {\r\n GL11.glTranslatef(coordX, coordY, coordZ); // Absolute position in game\r\n// GL11.glRotatef(xrot, 1.0f, 0.0f, 0.0f); // Rotate On The X Axis\r\n// GL11.glRotatef(yrot, 0.0f, 1.0f, 0.0f); // Rotate On The Y Axis\r\n// GL11.glRotatef(zrot, 0.0f, 0.0f, 1.0f); // Rotate On The Z Axis\r\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, textureMap[texture].getTextureID()); // Select Our Texture\r\n GL11.glBegin(GL11.GL_QUADS);\r\n // Front Face\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad\r\n // Back Face\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad\r\n // Top Face\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n // Bottom Face\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n // Right face\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, -1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, -1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(1.0f, 1.0f, 1.0f); // Top Left Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(1.0f, -1.0f, 1.0f); // Bottom Left Of The Texture and Quad\r\n // Left Face\r\n GL11.glTexCoord2f(0.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, -1.0f); // Bottom Left Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 0.0f);\r\n GL11.glVertex3f(-1.0f, -1.0f, 1.0f); // Bottom Right Of The Texture and Quad\r\n GL11.glTexCoord2f(1.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Texture and Quad\r\n GL11.glTexCoord2f(0.0f, 1.0f);\r\n GL11.glVertex3f(-1.0f, 1.0f, -1.0f); // Top Left Of The Texture and Quad\r\n GL11.glEnd();\r\n\r\n// xrot += 0.3f; // X Axis Rotation\r\n// yrot += 0.2f; // Y Axis Rotation\r\n// zrot += 0.4f; // Z Axis Rotation\r\n\r\n return true;\r\n }",
"private void graphicsLoader() {\n\t\tff2Logo = new Texture(Gdx.files.internal(uiName + \"/ff2logo.png\"));\n\t\tff2LogoHit = new Texture(Gdx.files.internal(uiName + \"/ff2logohit.png\"));\n\t\tplayerword = new Texture(Gdx.files.internal(uiName + \"/playerword.png\"));\n\t\tplayerwordHit = new Texture(Gdx.files.internal(uiName + \"/playerwordhit.png\"));\n\t\tturretword = new Texture(Gdx.files.internal(uiName + \"/turretword.png\"));\n\t\tturretwordHit = new Texture(Gdx.files.internal(uiName + \"/turretwordhit.png\"));\n\t\tfenceword = new Texture(Gdx.files.internal(uiName + \"/fenceword.png\"));\n\t\tfencewordHit = new Texture(Gdx.files.internal(uiName + \"/fencewordhit.png\"));\n\t\tbarrierword = new Texture(Gdx.files.internal(uiName + \"/barrierword.png\"));\n\t\tbarrierwordHit = new Texture(Gdx.files.internal(uiName + \"/barrierwordhit.png\"));\n\t\tgatewayword = new Texture(Gdx.files.internal(uiName + \"/gatewayword.png\"));\n\t\tgatewaywordHit = new Texture(Gdx.files.internal(uiName + \"/gatewaywordhit.png\"));\n\t\tpowerupword = new Texture(Gdx.files.internal(uiName + \"/powerupword.png\"));\n\t\tpowerupwordHit = new Texture(Gdx.files.internal(uiName + \"/powerupwordhit.png\"));\n\t\tswitchword = new Texture(Gdx.files.internal(uiName + \"/switchword.png\"));\n\t\tswitchwordHit = new Texture(Gdx.files.internal(uiName + \"/switchwordhit.png\"));\n\t\tenemyfighterword = new Texture(Gdx.files.internal(uiName + \"/enemyfighterword.png\"));\n\t\tenemyfighterwordHit = new Texture(Gdx.files.internal(uiName + \"/enemyfighterwordhit.png\"));\n\t\tmineword = new Texture(Gdx.files.internal(uiName + \"/mineword.png\"));\n\t\tminewordHit = new Texture(Gdx.files.internal(uiName + \"/minewordhit.png\"));\n\t\tpushblockword = new Texture(Gdx.files.internal(uiName + \"/pushblockword.png\"));\n\t\tpushblockwordHit = new Texture(Gdx.files.internal(uiName + \"/pushblockwordhit.png\"));\n\t\tbombupword = new Texture(Gdx.files.internal(uiName + \"/bombupword.png\"));\n\t\tbombupwordHit = new Texture(Gdx.files.internal(uiName + \"/bombupwordhit.png\"));\n\t\t\n\t\t// ui\n\t\tsoundonbutton = new Texture(Gdx.files.internal(uiName + \"/soundon.png\"));\n\t\tsoundoffbutton = new Texture(Gdx.files.internal(uiName + \"/soundoff.png\"));\n\t\tcreatebutton = new Texture(Gdx.files.internal(uiName + \"/createbutton.png\"));\n\t\tnocreatebutton = new Texture(Gdx.files.internal(uiName + \"/nocreatebutton.png\"));\n\t\tloaderTexture = new Texture(Gdx.files.internal(uiName + \"/ff2loader.png\"));\n\t\tgameOverTexture = new Texture(Gdx.files.internal(uiName + \"/gameover.png\"));\n\t\tnextFieldTexture = new Texture(Gdx.files.internal(uiName + \"/nextfield.png\"));\n\t\t\n\t\tmenubutton = new Texture(Gdx.files.internal(uiName + \"/menubutton.png\"));\n\t\tnomenubutton = new Texture(Gdx.files.internal(uiName + \"/nomenubutton.png\"));\n\t\tdiffEasyButton = new Texture(Gdx.files.internal(uiName + \"/diffeasybutton.png\"));\n\t\tdiffNormButton = new Texture(Gdx.files.internal(uiName + \"/diffnormbutton.png\"));\n\t\tdiffHardButton = new Texture(Gdx.files.internal(uiName + \"/diffhardbutton.png\"));\n\t\tosdButton = new Texture(Gdx.files.internal(uiName + \"/osdbutton.png\"));\n\t\t\n\t\texoFFfont = new BitmapFont(Gdx.files.internal(uiName + \"/font/exo-ff.fnt\"), true);\n\t\t\n\t\t// creator\n\t\texitbutton = new Texture(Gdx.files.internal(creatorName + \"/exitbutton.png\"));\n\t\tfilebutton = new Texture(Gdx.files.internal(creatorName + \"/filebutton.png\"));\n\t\ttoolsbutton = new Texture(Gdx.files.internal(creatorName + \"/toolsbutton.png\"));\n\t\tnextbutton = new Texture(Gdx.files.internal(creatorName + \"/nextbutton.png\"));\n\t\tprevbutton = new Texture(Gdx.files.internal(creatorName + \"/prevbutton.png\"));\n\t\tdeletebutton = new Texture(Gdx.files.internal(creatorName + \"/deletebutton.png\"));\n\t\tyesbutton = new Texture(Gdx.files.internal(creatorName + \"/yesbutton.png\"));\n\t\tnobutton = new Texture(Gdx.files.internal(creatorName + \"/nobutton.png\"));\n\t\tbuildbutton = new Texture(Gdx.files.internal(creatorName + \"/buildbutton.png\"));\n\t\tprocbutton = new Texture(Gdx.files.internal(creatorName + \"/procbutton.png\"));\n\t\trandbutton = new Texture(Gdx.files.internal(creatorName + \"/randbutton.png\"));\n\t\tgroupsbutton = new Texture(Gdx.files.internal(creatorName + \"/groupsbutton.png\"));\n\t\tarenabutton = new Texture(Gdx.files.internal(creatorName + \"/arenabutton.png\"));\n\t\tfileExitButton = new Texture(Gdx.files.internal(creatorName + \"/fileexitbutton.png\"));\n\t\tfileLoadButton = new Texture(Gdx.files.internal(creatorName + \"/loadbutton.png\"));\n\t\tfileSaveButton = new Texture(Gdx.files.internal(creatorName + \"/savebutton.png\"));\n\t\tfilePlayButton = new Texture(Gdx.files.internal(creatorName + \"/playbutton.png\"));\n\t\tfileNoPlayButton = new Texture(Gdx.files.internal(creatorName + \"/noplaybutton.png\"));\n\t\tfileSendButton = new Texture(Gdx.files.internal(creatorName + \"/sendbutton.png\"));\n\t\ttoasterBack = new Texture(Gdx.files.internal(creatorName + \"/toasterback.png\"));\n\t\twindowBack = new Texture(Gdx.files.internal(creatorName + \"/windowback.png\"));\n\t\temptyCellTexture = new Texture(Gdx.files.internal(creatorName + \"/emptycell.png\"));\n\t\tcreateSplashTexture = new Texture(Gdx.files.internal(creatorName + \"/createsplash.png\"));\n\t\t\n\t\tplayerDef = new Texture(Gdx.files.internal(creatorName + \"/player_def.png\"));\n\t\tgatewayDef = new Texture(Gdx.files.internal(creatorName + \"/gateway_def.png\"));\n\t\tpowerupDef = new Texture(Gdx.files.internal(creatorName + \"/powerup_def.png\"));\n\t\tbombupDef = new Texture(Gdx.files.internal(creatorName + \"/bombup_def.png\"));\n\t\tswitchDef = new Texture(Gdx.files.internal(creatorName + \"/switch_def.png\"));\n\t\tscaffoldDef = new Texture(Gdx.files.internal(creatorName + \"/scaffold_def.png\"));\n\t\tbarrierDef = new Texture(Gdx.files.internal(creatorName + \"/barrier_def.png\"));\n\t\tfenceDef = new Texture(Gdx.files.internal(creatorName + \"/fence_def.png\"));\n\t\tturretDef = new Texture(Gdx.files.internal(creatorName + \"/turret_def.png\"));\n\t\tenemyDef = new Texture(Gdx.files.internal(creatorName + \"/enemy_def.png\"));\n\t\tmineDef = new Texture(Gdx.files.internal(creatorName + \"/mine_def.png\"));\n\t\tpushblockDef = new Texture(Gdx.files.internal(creatorName + \"/pushblock_def.png\"));\n\t\thangerDef = new Texture(Gdx.files.internal(creatorName + \"/hanger_def.png\"));\n\t\t\n\t\tdeleteDef = new Texture(Gdx.files.internal(creatorName + \"/delete_def.png\"));\n\t\tdeleteSel = new Texture(Gdx.files.internal(creatorName + \"/delete_sel.png\"));\n\t\tlockUnlock = new Texture(Gdx.files.internal(creatorName + \"/lock_unlock.png\"));\n\t\tlockLock = new Texture(Gdx.files.internal(creatorName + \"/lock_lock.png\"));\n\t\ttoolSelect = new Texture(Gdx.files.internal(creatorName + \"/toolselect.png\"));\n\t\t\n\t\t// game stuff\n\t\tplayerShipTexture = new Texture(Gdx.files.internal(gameName + \"/player2ship.png\"));\n\t\tplayerShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shippowerup.png\"));\n\t\tplayerShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/player2shipbombup.png\"));\n\t\tenemyShipTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2ship.png\"));\n\t\tenemyShipPowerupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shippowerup.png\"));\n\t\tenemyShipBombupTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipbombup.png\"));\n\t\tenemyShipOrderedTexture = new Texture(Gdx.files.internal(gameName + \"/enemy2shipordered.png\"));\n\t\tplayerBulletTexture = new Texture(Gdx.files.internal(gameName + \"/playerlaser.png\"));\n\t\tplayerCableTexture = new Texture(Gdx.files.internal(gameName + \"/playercable.png\"));\n\t\tenemyBulletTexture = new Texture(Gdx.files.internal(gameName + \"/enemylaser.png\"));\n\t\tenemyCableTexture = new Texture(Gdx.files.internal(gameName + \"/enemycable.png\"));\n\t\tbombCableTexture = new Texture(Gdx.files.internal(gameName + \"/bombcable.png\"));\n\t\tturretTexture = new Texture(Gdx.files.internal(gameName + \"/turret.png\"));\n\t\tturrethitTexture = new Texture(Gdx.files.internal(gameName + \"/turrethit.png\"));\t\n\t\tfenceTexture = new Texture(Gdx.files.internal(gameName + \"/fence.png\"));\n\t\tfencehitTexture = new Texture(Gdx.files.internal(gameName + \"/fencehit.png\"));\n\t\tbarrierTexture = new Texture(Gdx.files.internal(gameName + \"/barrier.png\"));\n\t\tbarrierhitTexture = new Texture(Gdx.files.internal(gameName + \"/barrierhit.png\"));\n\t\tgatewayonTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayon.png\"));\n\t\tgatewayoffTexture = new Texture(Gdx.files.internal(gameName + \"/gatewayoff.png\"));\n\t\tpowerupTexture = new Texture(Gdx.files.internal(gameName + \"/powerup.png\"));\n\t\tbombupTexture = new Texture(Gdx.files.internal(gameName + \"/bombup.png\"));\n\t\tbombupCharge = new Texture(Gdx.files.internal(gameName + \"/bombupcharge.png\"));\n\t\texplosion = new Texture(Gdx.files.internal(gameName + \"/explosion.png\"));\n\t\tdeath = new Texture(Gdx.files.internal(gameName + \"/death.png\"));\n\t\tpowerupCharge = new Texture(Gdx.files.internal(gameName + \"/powerupcharge.png\"));\n\t\tswitchonTexture = new Texture(Gdx.files.internal(gameName + \"/switchon.png\"));\n\t\tswitchoffTexture = new Texture(Gdx.files.internal(gameName + \"/switchoff.png\"));\n\t\tscaffoldTexture = new Texture(Gdx.files.internal(gameName + \"/scaffold.png\"));\n\t\tmineTexture = new Texture(Gdx.files.internal(gameName + \"/mine.png\"));\n\t\tminehitTexture = new Texture(Gdx.files.internal(gameName + \"/minehit.png\"));\n\t\tmineDebrisTexture = new Texture(Gdx.files.internal(gameName + \"/minedebris.png\"));\n\t\tpushblockTexture = new Texture(Gdx.files.internal(gameName + \"/pushblock.png\"));\n\t\thangerTexture = new Texture(Gdx.files.internal(gameName + \"/hanger.png\"));\n\t\thangerhitTexture = new Texture(Gdx.files.internal(gameName + \"/hangerhit.png\"));\n\t\t// have a catch here for the loaded=true?\n\t\tloaded = true;\n\t}",
"@SideOnly(Side.CLIENT)\n public static void drawTexture(int x, int y, IIcon icon, int width, int height, float zLevel)\n {\n for(int i = 0; i < width; i += 16)\n for(int j = 0; j < height; j += 16)\n drawScaledTexturedRect(x + i, y + j, icon, Math.min(width - i, 16), Math.min(height - j, 16),zLevel);\n \n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n }",
"@Override\n\t\tpublic void render()\n\t\t{\n\t\t\tif(color.alpha() > 0)\n\t\t\t{\n\t\t\t\tbind();\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\n\t\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\n\t\t\t\t\tfloat screenWidth = WindowManager.controller().width();\n\t\t\t\t\tfloat screenHeight = WindowManager.controller().height();\n\t\t\t\t\tGL11.glVertex2f(0, 0);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, 0);\n\t\t\t\t\tGL11.glVertex2f(0, screenHeight);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, screenHeight);\n\t\t\t\tGL11.glEnd();\n\t\t\t\trelease();\n\t\t\t}\n\t\t}",
"@Override\r\n\tpublic void render(Graphics g) {\r\n\t\tg.drawImage(objectsType.texture, (int) (x - handler.getGameCamera().getxOffset()),\r\n\t\t\t\t(int) (y - handler.getGameCamera().getyOffset()), width, height);\r\n\r\n\t\tif (DEBUGMODE) {\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawRect((int) (x + bounds.x - handler.getGameCamera().getxOffset()),\r\n\t\t\t\t\t(int) (y + bounds.y - handler.getGameCamera().getyOffset()), bounds.width, bounds.height);\r\n\t\t}\r\n\r\n\t}",
"public void drawButton(Minecraft p_146112_1_, int p_146112_2_, int p_146112_3_)\n {\n if (this.visible)\n {\n FontRenderer fontrenderer = p_146112_1_.fontRendererObj;\n p_146112_1_.getTextureManager().bindTexture(ThemeRegistry.curTheme().guiTexture());\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.hovered = p_146112_2_ >= this.xPosition && p_146112_3_ >= this.yPosition && p_146112_2_ < this.xPosition + this.width && p_146112_3_ < this.yPosition + this.height;\n int k = this.getHoverState(this.hovered);\n GlStateManager.enableBlend();\n GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);\n GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);\n \n GlStateManager.pushMatrix();\n float sh = height/20F;\n float sw = width >= 196? width/200F : 1F;\n float py = yPosition/sh;\n float px = xPosition/sw;\n GlStateManager.scale(sw, sh, 1F);\n \n if(width > 200) // Could use 396 but limiting it to 200 this makes things look nicer\n {\n \tGlStateManager.translate(px, py, 0F); // Fixes floating point errors related to position\n \tthis.drawTexturedModalRect(0, 0, 48, k * 20, 200, 20);\n } else\n {\n \tthis.drawTexturedModalRect((int)px, (int)py, 48, k * 20, this.width / 2, 20);\n \tthis.drawTexturedModalRect((int)px + width / 2, (int)py, 248 - this.width / 2, k * 20, this.width / 2, 20);\n }\n \n GlStateManager.popMatrix();\n \n this.mouseDragged(p_146112_1_, p_146112_2_, p_146112_3_);\n int l = 14737632;\n\n if (packedFGColour != 0)\n {\n l = packedFGColour;\n }\n else if (!this.enabled)\n {\n l = 10526880;\n }\n else if (this.hovered)\n {\n l = 16777120;\n }\n \n String txt = this.displayString;\n \n if(fontrenderer.getStringWidth(txt) > width) // Auto crop text to keep things tidy\n {\n \tint dotWidth = fontrenderer.getStringWidth(\"...\");\n \ttxt = fontrenderer.trimStringToWidth(txt, width - dotWidth) + \"...\";\n }\n \n this.drawCenteredString(fontrenderer, txt, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);\n }\n }",
"void texImage2D(int target, int level, int resourceId, int border);",
"@Override\n\tpublic void render() {\n\t\tgl.glEnableClientState(GL2.GL_VERTEX_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_NORMAL_ARRAY);\n\t\tfloat posx = startxPos;\n\t\tint[] vboIds;\n\t\tfor(int i=0;i<nbWidth;i++) {\n//\t\t\tindexBuffer = cacheBands.getDataLocalIndex(i); // mapIndexBands[i]\n//\t\t\tindexBuffer.rewind();\n\t\t\tvboIds = cacheBands.getDataLocalIndex(i);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[1]);\n\t\t\tgl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, vboIds[2]);\n\t\t\tgl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[3]);\n\t\t\tgl.glNormalPointer(GL.GL_FLOAT, 0, 0);\n\n\t\t\t\n\t\t\tgl.glPushMatrix();\n\t\t\tgl.glTranslatef(posx, startyPos,0);\n\t\t\t//gl.glCallList(cacheBands.getDataLocalIndex(i));\n\t // gl.glDrawElements(GL2.GL_QUADS, indices.capacity(), GL.GL_UNSIGNED_SHORT, 0);\n\t gl.glDrawArrays(GL2.GL_QUADS, 0, vboIds[0]); \n\t\t\tgl.glPopMatrix();\n\t\t\tposx+=blockWidth;\n\t\t}\n\t\t// unbind vbo\n\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);\n\t\tgl.glDisableClientState(GL2.GL_NORMAL_ARRAY);\n gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);\n\n\t}",
"private void renderGuiExtraLive (SpriteBatch batch)\n\t{\n\t\t//float x = cameraGUI.viewportWidth - 50 -\n\t\t//\t\tConstants.LIVES_START * 50;\n\t\t//float y = -15;\n\t\t//for (int i = 0; i < Constants.LIVES_START; i++)\n\t\t//{\n\t\t//\tif (worldController.lives <= i)\n\t\t//\t\tbatch.setColor(0.5f, 0.5f, 0.5f, 0.5f);\n\t\t//\tbatch.draw(Assets.instance.bird.character, \n\t\t//\t\t\tx + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n\t\t//\tbatch.setColor(1, 1, 1, 1);\n\t\t//}\n\t\t\n\t\tfloat x = cameraGUI.viewportWidth - 50 -\n\t\t\t\t1 * 50;\n\t\tfloat y = -15;\n\t\tfor (int i = 0; i < 1; i++)//Constants.LIVES_START; i++)\n\t\t{\n\t\t\tif (worldController.lives <= i)\n\t\t\t\tbatch.setColor(0.5f, 0.5f, 0.5f, 0.5f);\n\t\t\tbatch.draw(Assets.instance.bird.character, \n\t\t\t\t\tx + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n\t\t\tbatch.setColor(1, 1, 1, 1);\n\t\t}\n\t\tif (worldController.lives>= 0 &&worldController.livesVisual>worldController.lives) \n\t\t{ \n\t\t\t\n\t\t\tint i = worldController.lives;\n\t\t float alphaColor = Math.max(0, worldController.livesVisual- worldController.lives - 0.5f);\n\t\t float alphaScale = 0.35f * (2 + worldController.lives - worldController.livesVisual) * 2;\n\t\t float alphaRotate = -45 * alphaColor;\n\t\t batch.setColor(1.0f, 0.7f, 0.7f, alphaColor);\n\t\t batch.draw(Assets.instance.bird.character, x + i * 50, y, 50, 50, 120, 100, alphaScale, -alphaScale,alphaRotate);\n\t\t batch.setColor(1, 1, 1, 1);\n\t\t }\n\t}",
"private final void \n renderIt( ) {\n \t\n \tif( this.mImageCount > 0 || this.mLineCount > 0 || this.mRectCount > 0 || this.mTriangleCount > 0 ) {\n\t \n \t\tthis.mVertexBuffer.clear(); //clearing the buffer\n\t GLES11.glEnableClientState( GLES11.GL_VERTEX_ARRAY );\n\n\t //if there are images to render\n\t if( this.mImageCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mImageCount * 16 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer );\n\t\t this.mIndexBuffer.limit(this.mImageCount * 6); //DESKTOP VERSION ONLY\n\t\t GLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mImageCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t \tGLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t //if there are lines to render\n\t if( this.mLineCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mLineCount * 4 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 0, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glDrawArrays( GLES11.GL_LINES, 0, this.mLineCount * 2 ); //* 2 because every line got 2 points\n\t }\n\n\t //if there are rects to render\n\t if( this.mRectCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mRectCount * 8 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t this.mIndexBuffer.limit(this.mRectCount * 6); //DESKTOP VERSION ONLY\n\t \t GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, this.mVertexBuffer); //copy the vertices into the GPU\t \t \n\t \t \tGLES11.glDrawElements( GLES11.GL_TRIANGLES, this.mRectCount * BitsGLImage.INDICES_PER_SPRITE, GLES11.GL_UNSIGNED_SHORT, this.mIndexBuffer );\n\t }\n\t \n\t //if there are triangles to render\n\t if( this.mTriangleCount > 0 ) {\n\t\t this.mVertexBuffer.put( this.mVertices, 0, this.mTriangleCount * 12 ); //put available points into the buffer\n\t\t this.mVertexBuffer.flip(); //flipping buffer\n\t\t GLES11.glVertexPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //copy the vertices into the GPU\n\t\t GLES11.glEnableClientState( GLES11.GL_TEXTURE_COORD_ARRAY ); //copy the texture coordinates into the GPU\n\t\t GLES11.glEnable(GLES11.GL_TEXTURE_2D);\n\t\t this.mVertexBuffer.position( 2 ); //put buffer position to the texture coordinates\n\t\t GLES11.glTexCoordPointer( 2, GLES11.GL_FLOAT, 16, this.mVertexBuffer ); //16 == byteoffset -> es liegen 2 werte dazwischen\n\t\t GLES11.glDrawArrays( GLES11.GL_TRIANGLES, 0, this.mTriangleCount * 3 ); //* 2 because every line got 2 points\t \t\n\t\t GLES11.glDisable(GLES11.GL_TEXTURE_2D);\n\t\t GLES11.glDisableClientState( GLES11.GL_TEXTURE_COORD_ARRAY );\n\t }\n\t \n\t GLES11.glDisableClientState( GLES11.GL_VERTEX_ARRAY );\n \t\t\n\t //resetting counters\n\t this.mBufferIndex = 0;\n\t \tthis.mImageCount = 0;\n\t \tthis.mLineCount = 0;\n\t \tthis.mRectCount = 0;\n\t \tthis.mTriangleCount = 0;\n \t}\n }",
"private void initTextures() {\n\n\t\ttextureManager.loadTexture(\"PNG\", \"menu_bg\", \"res/menu_bg.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"mountain_bg\", \"res/mountain_bg.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"ball\", \"res/ball_sm.png\");\n\t\ttextureManager.loadTexture(\"PNG\", \"inner_bg1\", \"res/inner_bg1.png\");\r\n\t\ttextureManager.loadSheet(\"stand_still\", \"res/stand_still.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"testAnim\", \"res/testAnim.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"tileSet\", \"res/tileset_small.png\", 32, 32);\n\t\ttextureManager.loadSheet(\"walking\", \"res/walking.png\", 32, 64);\r\n\t\ttextureManager.loadSheet(\"jumping\", \"res/jumping.png\", 32, 64);\n\t\ttextureManager.loadSheet(\"slime_still\", \"res/slime_still_small.png\", 32, 32);\n\t}",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}",
"public void zeichnen()\r\n {\n if(textur==null)\r\n {\r\n glColor3d(colorrd, colorgr, colorbl);\r\n glBegin(GL_QUADS);\r\n glVertex2i(x,y);\r\n glVertex2i(x+w,y);\r\n glVertex2i(x+w,y+h);\r\n glVertex2i(x,y+h);\r\n glEnd();\r\n }\r\n else\r\n {\r\n textur.bind();\r\n glBegin(GL_TRIANGLES);\r\n glTexCoord2f(1, 0);\r\n glVertex2i(x+w, y);\r\n glTexCoord2f(0, 0);\r\n glVertex2i(x, y);\r\n glTexCoord2f(0, 1);\r\n glVertex2i(x, y+h);\r\n glTexCoord2f(0, 1);\r\n glVertex2i(x, y+h);\r\n glTexCoord2f(1, 1);\r\n glVertex2i(x+w, y+h);\r\n glTexCoord2f(1, 0);\r\n glVertex2i(x+w, y);\r\n glEnd();\r\n }\r\n }",
"private void drawScreen(Sprite spr) {\n\t\tTexture tex = spr.getTexture();\n\t\t\n\t\ttex.bind();\n\t\t\n\t\tglBegin(GL_QUADS);\n\t\t{\n\t\t\tglTexCoord2f(0, tex.getHeight());\n\t\t\tglVertex2f(0, spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), tex.getHeight());\n\t\t\tglVertex2f(spr.getWidth(), spr.getHeight());\n\t\t\tglTexCoord2f(tex.getWidth(), 0);\n\t\t\tglVertex2f(spr.getWidth(), 0);\n\t\t\tglTexCoord2f(0, 0);\n\t\t\tglVertex2f(0, 0);\n\t\t}\n\t\tglEnd();\n\t}",
"private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }",
"void glActiveTexture(int texture);",
"void glActiveTexture(int texture);",
"protected void initRender() {\n glActiveTexture(GL_TEXTURE0);\n // Bind the texture\n glBindTexture(GL_TEXTURE_2D, texture.getId());\n\n // Draw the mesh\n glBindVertexArray(vaoId);\n glEnableVertexAttribArray(0);\n glEnableVertexAttribArray(1);\n }",
"void glBindTexture(int target, int texture);",
"@Override\n public void draw(INode root, Stack<Matrix4f> modelView) {\n GL3 gl = glContext.getGL().getGL3();\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glActiveTexture(GL.GL_TEXTURE0);\n int loc = -1;\n loc = shaderLocations.getLocation(\"image\");\n if (loc >= 0) {\n gl.glUniform1i(loc, 0);\n }\n root.draw(this, modelView);\n }",
"@Override\n public void postRender(GL2 gl)\n {\n gl.glDisable(GL.GL_TEXTURE_2D);\n }",
"public void render() {\r\n\t\t\r\n\t\tif (page >= 0 && page < pages.length) {\r\n\t\t\tTextures.renderQuad(pages[page][(updates / 90) % pages[page].length], 32, 32, 1024, 512);\r\n\t\t}\r\n\t}",
"public void showTexturePage(String selection, int page){\n \n ArrayList<String> idSubStages = control.getIdsSubStages(selection);\n ArrayList<String> idsTexturesOrSubMeshes = control.getIdsTexturesORSubMeshes(idSubStages.get(0));\n unCheck();\n subStageSelected = \"\";\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n for(int i=page*TEXTURES_PAGE; i<control.getNumTexturesORSubMeshes(idSubStages.get(0)); i++){\n if(i<((page+1)*TEXTURES_PAGE)){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n List<Effect> effects = image.getEffects(EffectEventId.onHover,Tooltip.class);\n String idTexturesOrSubMeshes = i18nModel.getString(control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i)));\n if(idTexturesOrSubMeshes==null){\n idTexturesOrSubMeshes=control.getTextTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n }\n effects.get(0).getParameters().setProperty(\"hintText\",idTexturesOrSubMeshes);\n image.setVisible(true);\n ImageRenderer imager = image.getRenderer(ImageRenderer.class);\n String imagePath = control.getIconPathTexturesORSubMeshes(idsTexturesOrSubMeshes.get(i));\n if(imagePath!=null){\n imager.setImage(nifty.getRenderEngine().createImage(imagePath, false));\n }\n else{\n imager.setImage(nifty.getRenderEngine().createImage(Resources.x, false));\n }\n if (control.isChecked(idSubStages.get(0), idsTexturesOrSubMeshes.get(i))){\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(true);\n subStageSelected = idSubStages.get(0);\n if(!seleccionado.containsKey(subStageSelected)){\n seleccionado.put(subStageSelected, idsTexturesOrSubMeshes.get(i));\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"t\"+Integer.toString(i%TEXTURES_PAGE)).setVisible(false);\n }\n }\n }\n if(seleccionado.containsKey(subStageSelected)){\n if(!(control.getTextureType(seleccionado.get(subStageSelected)) == TexturesMeshType.simpleTexture)){\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"panel_color\").setVisible(false);\n }\n for(int i=control.getNumTexturesORSubMeshes(idSubStages.get(0));i<((page+1)*TEXTURES_PAGE);i++){\n Element image = nifty.getScreen(stageType).findElementByName(\"i\"+Integer.toString(i%TEXTURES_PAGE));\n image.setVisible(false);\n }\n if(page > 0){\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"leftT\").setVisible(false);\n }\n if((((double)control.getNumTexturesORSubMeshes(idSubStages.get(0))/(double)TEXTURES_PAGE) - page) > 1){\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(true);\n }\n else{\n nifty.getScreen(stageType).findElementByName(\"rightT\").setVisible(false);\n }\n }",
"public void render () \n\t{ \n\t\trenderWorld(batch);\n\t\trenderGui(batch);\n\t}",
"private void bindTextures(Terrain terrain){\n TerrainTexPack texturePack = terrain.getTexturePack();\n glActiveTexture(GL_TEXTURE0);\n glBindTexture(GL_TEXTURE_2D, texturePack.getBackgroundTexture().getTextureID());\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, texturePack.getrTexture().getTextureID());\n glActiveTexture(GL_TEXTURE2);\n glBindTexture(GL_TEXTURE_2D, texturePack.getgTexture().getTextureID());\n glActiveTexture(GL_TEXTURE3);\n glBindTexture(GL_TEXTURE_2D, texturePack.getbTexture().getTextureID());\n glActiveTexture(GL_TEXTURE4);\n glBindTexture(GL_TEXTURE_2D, terrain.getBlendMap().getTextureID());\n\n }",
"private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n }else{\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n \n \n if(!gameover){\n player.render(g);\n borrego.render(g);\n rayo.render(g);\n \n for (Enemy brick : enemies) {\n brick.render(g);\n //bomba.render(g);\n }\n \n for (Fortaleza fortaleza : fortalezas) {\n fortaleza.render(g);\n }\n \n for (Bomba bomba: bombas){\n bomba.render(g);\n }\n \n drawScore(g);\n drawLives(g,vidas);\n }else if(gameover){\n drawGameOver(g);\n }\n \n\n if (lost && !gameover){\n drawLost(g);\n }\n if (pause && !lost && !gameover){\n drawPause(g);\n }\n if(win && !lost && !pause && !lost &&!gameover){\n \n drawWin(g);\n }\n \n bs.show();\n g.dispose();\n }\n }",
"private void renderEngine() {\r\n GL11.glDisable(GL11.GL_LIGHTING);\r\n\r\n GL11.glEnable(GL11.GL_BLEND);\r\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);\r\n\r\n shotTexture.bind();\r\n engine.render();\r\n\r\n GL11.glDisable(GL11.GL_BLEND);\r\n }",
"public GUI(){\n lifeCount = new Picture[5];\n for(int i = 0; i < lifeCount.length; i++){\n lifeCount[i] = new Picture(SimpleGfxGrid.PADDINGX + 672,9, \"sprites/lives/LIFE\" +i+\".png\");\n }\n vaccine = new Picture[2];\n vaccine[0] = new Picture(SimpleGfxGrid.PADDINGX + 636,38,\"sprites/powerups/Vaccine.png\");\n vaccine[1] = new Picture(SimpleGfxGrid.PADDINGX + 637,72,\"sprites/powerups/Vaccine.png\");\n\n heart = new Picture(SimpleGfxGrid.PADDINGX + 636,7, \"sprites/lives/heart.png\");\n\n mask = new Picture(SimpleGfxGrid.PADDINGX + 637, 9, \"sprites/powerups/Mask.png\");\n mask.grow(5, 2);\n\n timerNum = new Picture[3][10];\n for(int i = 0; i < 3; i++){\n for(int j = 0; j<10; j++)\n timerNum[i][j] = new Picture(SimpleGfxGrid.PADDINGX + 690 + (36*i),64,\"sprites/numbers/num\"+j+\n \".png\");\n }\n }",
"private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }",
"public void render() {\r\n glPushMatrix();\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOVertexHandle);\r\n glVertexPointer(3, GL_FLOAT, 0, 0l);\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOColorHandle);\r\n glColorPointer(3, GL_FLOAT, 0, 0l);\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOTextureHandle);\r\n glBindTexture(GL_TEXTURE_2D, 1);\r\n glTexCoordPointer(2, GL_FLOAT, 0, 0l);\r\n glDrawArrays(GL_QUADS, 0, CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * 24);\r\n glPopMatrix();\r\n }",
"void glGenTextures(int n, int[] textures, int offset);",
"private void loadTextures() {\n\t\tspriteSheet01 = new Texture(\"data/buttonsspritesheet02.png\");\n\n\t\tnew TextureRegion(spriteSheet01, BROKEN_COLUMN * SQUARE_SIZE,\n\t\t\t\tBROKEN_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, EMPTY_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tEMPTY_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, ACTIVATED_COLUMN * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, DEPRESSED_BUTTON * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, HIGHLIGHTED_COLUMN * SQUARE_SIZE,\n\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, CAROUSEL_COLUMN * SQUARE_SIZE,\n\t\t\t\t(CAROUSEL_ROW * SQUARE_SIZE) + CAROUSEL_PIXELS, SQUARE_SIZE,\n\t\t\t\tCAROUSEL_PIXELS);\n\n\t\tnew TextureRegion(spriteSheet01, FIX_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tFIX_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tnew TextureRegion(spriteSheet01, WILD_BUTTON_COLUMN * SQUARE_SIZE,\n\t\t\t\tWILD_BUTTON_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\n\t\tcarousel = new TextureRegion[MAIN_COLOUR_AMOUNT];\n\t\tfor (int i = 0; i < MAIN_COLOUR_AMOUNT; i++) {\n\t\t\tcarousel[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(CAROUSEL_COLUMN * SQUARE_SIZE) + (i * CAROUSEL_PIXELS),\n\t\t\t\t\tCAROUSEL_ROW * SQUARE_SIZE, CAROUSEL_PIXELS,\n\t\t\t\t\tCAROUSEL_PIXELS);\n\t\t}\n\n\t\trings = new TextureRegion[RING_AMOUNT];\n\t\tfor (int i = 0; i < RING_AMOUNT; i++) {\n\t\t\trings[i] = new TextureRegion(spriteSheet01, i * SQUARE_SIZE,\n\t\t\t\t\tRING_ROW * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tmainColour = new TextureRegion[MAIN_COLOUR_AMOUNT];\n\t\tfor (int i = 0; i < MAIN_COLOUR_AMOUNT; i++) {\n\t\t\tmainColour[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i + MAIN_COLOUR_COLUMN) * SQUARE_SIZE, MAIN_COLOUR_ROW,\n\t\t\t\t\tSQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tspecials = new TextureRegion[SPECIALS_AMOUNT];\n\t\tfor (int i = 0; i < SPECIALS_ROW_ONE_AMOUNT; i++) {\n\t\t\tspecials[i] = new TextureRegion(spriteSheet01, i * SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\t\tfor (int i = SPECIALS_ROW_ONE_AMOUNT; i < SPECIALS_AMOUNT; i++) {\n\t\t\tspecials[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i - SPECIALS_ROW_ONE_AMOUNT) * SQUARE_SIZE,\n\t\t\t\t\tSPECIALS_ROW_TWO * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);\n\t\t}\n\n\t\tenemyBaseColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyBaseColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_BASE_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyHalfColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyHalfColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_HALF_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyThirdColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyThirdColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_THIRD_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyRimColours = new TextureRegion[ENEMY_COLOURS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_COLOURS_AMOUNT; i++) {\n\t\t\tenemyRimColours[i] = new TextureRegion(spriteSheet01, i\n\t\t\t\t\t* SQUARE_SIZE, ENEMY_RIM_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\n\t\tenemyConnectors = new TextureRegion[ENEMY_CONNECTORS_AMOUNT];\n\t\tfor (int i = 0; i < ENEMY_CONNECTORS_AMOUNT; i++) {\n\t\t\tenemyConnectors[i] = new TextureRegion(spriteSheet01,\n\t\t\t\t\t(i + ENEMY_CONNECTORS_COLUMN) * SQUARE_SIZE,\n\t\t\t\t\tENEMY_CONNECTORS_ROW * SQUARE_SIZE, SQUARE_SIZE,\n\t\t\t\t\tSQUARE_SIZE);\n\t\t}\n\t}",
"private void renderUI()\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile image = new File(BASE_DIREC + \"foreground.png\");\n\t\t\tforeground = ImageResizer.resizeImage(ImageIO.read(image), scale * BASE_SCALE);\n\t\t}\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t// System.err.println(ioe);\n\t\t\t// Oh well\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tFile image = new File(BASE_DIREC + \"continue.png\");\n\t\t\tcontinueImage = ImageResizer.resizeImage(ImageIO.read(image), scale * BASE_SCALE);\n\t\t}\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t// System.err.println(ioe);\n\t\t\t// Oh well\n\t\t}\n\t}",
"public void display(GLAutoDrawable drawable) {\t\n\t\n\tSystem.out.println(times++);\n\n\t\n\tfbo.attach(gl);\n\t\n\t\tclear(gl);\n\t\t\n\t\tgl.glColor4f(1.f, 1.f, 1.f, 1f);\n\t\tgl.glBegin(GL2.GL_QUADS);\n\t\t{\n\t\t gl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t\t gl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 0.0f, 1.0f);\n\t\t}\n\t\tgl.glEnd();\n\t\t\n\t\tgl.glColor4f(1.f, 0.f, 0.f, 1f);\n\t\tgl.glBegin(GL2.GL_TRIANGLES);\n\t\t{\n\t\t gl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t\t gl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t\t gl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t\t}\n\t\tgl.glEnd();\n\tfbo.detach(gl);\n\n \n\tclear(gl);\n\n \n gl.glColor4f(1.f, 1.f, 1.f, 1f);\n fbo.bind(gl);\n\t gl.glBegin(GL2.GL_QUADS);\n\t {\n\t gl.glTexCoord2f(0.0f, 0.0f);\n\t \tgl.glVertex3f(0.0f, 1.0f, 1.0f);\n\t gl.glTexCoord2f(1.0f, 0.0f);\n\t \tgl.glVertex3f(1.0f, 1.0f, 1.0f);\n\t gl.glTexCoord2f(1.0f, 1.0f);\n\t \tgl.glVertex3f(1.0f, 0.0f, 1.0f);\n\t gl.glTexCoord2f(0.0f, 1.0f);\n\t \tgl.glVertex3f(0.0f, 0.0f, 1.0f);\n\t }\n gl.glEnd();\n fbo.unbind(gl);\n}",
"private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }",
"@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(\"/gui/book.png\"));\n int var5 = 0;\n int var6 = 192;\n\n if (var4)\n {\n var5 += 23;\n }\n\n if (!this.nextPage)\n {\n var6 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, var6, 23, 13);\n }\n }",
"private void renderGuiLives(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth - 50 - Constants.MAX_LIVES * 50;\n float y = -15;\n \n for (int i = 0; i < worldController.lives; i++)\n {\n batch.draw(Assets.instance.gui.pumpkin, x + i * 50, y, 50, 50, 120, 100, 0.35f, -0.35f, 0);\n batch.setColor(1, 1, 1, 1);\n }\n }",
"private void attachTextures(GameTerrain gameTerrain){\r\n\t\t//Get the texture collection from gameTerrain\r\n\t\tGameTerrainTexture_Collection gameTerrainTexture_Collection = gameTerrain.getGameTerrainTexture_Collection();\r\n\t\t//Activate and attach the background texture to the 1st unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE0);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getBackgroundTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the red texture to the 2nd unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE1);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getRedTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the blue texture to the 3rd unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE2);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getBlueTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the green texture to the 4th unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE3);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrainTexture_Collection.getGreenTexture().getTextureReferenceID());\r\n\t\t//Activate and attach the blendmap to the 5th unit\r\n\t\tGL13.glActiveTexture(GL13.GL_TEXTURE4);\r\n\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, gameTerrain.getBlendMap().getTextureReferenceID());\r\n\t\t\r\n\t}",
"public void draw(SpriteBatch batch) {\n// If there is no image (word button)\n if (texture == null) {\n\n// If any menu cursor...\n for (MenuCursor cursor : Main.cursors) {\n\n// Is over the button, change the colour to the \"selected\" version\n if (isCursorOver(cursor)) {\n layout.setText(Main.menuFont, string, selectedColor, 0, Align.center, false);\n break;\n\n// Is not over the button, change the colour to the \"unselected\" version\n } else {\n layout.setText(Main.menuFont, string, unselectedColor, 0, Align.center, false);\n }\n }\n\n// Draw the text\n Main.menuFont.draw(batch, layout, pos.x, pos.y);\n\n// If there is an image\n } else {\n\n// If there is no cursors\n if (Main.cursors.size() == 0) {\n\n// If previously selected draw regular texture\n if (prevSelect) {\n batch.draw(texture, buttonRect.x, buttonRect.y);\n\n// Otherwise, draw the selected texture\n } else {\n batch.draw(selectTexture, buttonRect.x, buttonRect.y);\n }\n\n// If there is a cursor\n } else {\n\n// Cycle through all cursors\n for (MenuCursor cursor : Main.cursors) {\n\n// If the cursor is over the button, draw the selected texture\n if (isCursorOver(cursor)) {\n batch.draw(selectTexture, buttonRect.x, buttonRect.y);\n prevSelect = false;\n break;\n\n// Otherwise, draw the regular texture, previously selected is now true\n } else {\n batch.draw(texture, buttonRect.x, buttonRect.y);\n prevSelect = true;\n }\n }\n }\n }\n }",
"public void drawPlayerResources(Player player) {\n //This method draws the buttons representing the player's resources, alter this method if you want to change how resources are represented.\n float x = 10.0f;\n //The value of y is set based on how much space the header texts and goals have taken up (assumed that 3 goals are always present for a consistent interface)\n float y = 300.0f;\n \n int xCounter = 0;\n\n //Clears the resource buttons so that the other player's resources are not displayed\n resourceButtons.remove();\n resourceButtons.clear();\n \n resourceImages.remove();\n resourceImages.clear();\n\n for (final Resource resource : player.getResources()) {\n \n \t//This if statement is used to determine what type of resource is being drawn. This is necessary as each resource needs to have a different click listener assigned to its button.\n // draw train boxes first, then skip box after\n \tif (resource instanceof Train) {\n Train train = (Train) resource;\n\n // Don't show a button for trains that have been placed, trains placed are still part of the 7 total upgrades\n //If a train is not placed then its position is null so this is used to check\n if (train.getPosition() == null) {\n //Creates a clickListener for the button and adds it to the list of buttons\n TrainClicked listener = new TrainClicked(context, train);\n //TextButton button = new TextButton(resource.toString(), context.getSkin());\n ImageButton button = new ImageButton(context.getSkin());\n button.setWidth(82);\n button.setHeight(99);\n button.addListener(listener);\n resourceButtons.addActor(button);\n button.setPosition(x, y);\n xCounter += 1;\n \n Texture buttonText = null;\n Image buttonImage;\n \n if (resource.toString().equals(\"Bullet Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_bullet.png\"));\n }\n else if (resource.toString().equals(\"Diesel Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_diesel.png\"));\n }\n else if (resource.toString().equals(\"Electric Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_electric.png\"));\n }\n else if (resource.toString().equals(\"Kamikaze\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_kamikaze.png\"));\n }\n else if (resource.toString().equals(\"MagLev Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_maglev.png\"));\n }\n else if (resource.toString().equals(\"Nuclear Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_nuclear.png\"));\n }\n else if (resource.toString().equals(\"Petrol Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_petrol.png\"));\n }\n else if (resource.toString().equals(\"Pioneer\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_pioneer.png\"));\n }\n else if (resource.toString().equals(\"Steam Train\")) {\n \tbuttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_steam.png\"));\n }\n \n buttonImage = new Image(buttonText);\n buttonImage.setWidth(82);\n buttonImage.setHeight(99);\n resourceImages.addActor(buttonImage);\n buttonImage.setPosition(x, y);\n \n if (xCounter == 3) {\n \ty -= 105;\n \tx = 10.0f;\n \txCounter = 0;\n }\n else {\n \tx += button.getWidth() + 10;\n }\n \n }\n\n } \n }\n \n for (final Resource resource : player.getResources()) {\n \n \t//This if statement is used to determine what type of resource is being drawn. This is necessary as each resource needs to have a different click listener assigned to its button.\n // NEED to draw train boxes first, then skip box after\n \tif (resource instanceof Skip) {\n //Creates a clickListener for the button and adds it to the list of buttons\n Skip skip = (Skip) resource;\n SkipClicked listener = new SkipClicked(context, skip);\n ImageButton button = new ImageButton(context.getSkin());\n button.setWidth(267);\n button.setHeight(40);\n button.addListener(listener);\n resourceButtons.addActor(button);\n \n if (xCounter == 0) {\n \tx = 10.0f;\n \ty += 60;\n }\n else {\n \tx = 10.0f;\n \ty -= 45;\n }\n \n button.setPosition(x, y);\n \n Texture buttonText = new Texture(Gdx.files.internal(\"Resource Buttons/btn_skip.png\"));\n Image buttonImage = new Image(buttonText);\n buttonImage.setWidth(267);\n buttonImage.setHeight(40);\n resourceImages.addActor(buttonImage);\n buttonImage.setPosition(x, y);\n \n \n } \n }\n\n //Adds all generated buttons to the stage\n context.getStage().addActor(resourceImages);\n context.getStage().addActor(resourceButtons);\n }",
"public void drawScreen(int mouseX, int mouseY, float partialTicks)\r\n\t{\r\n\r\n\t\tGL11.glDisable(GL11.GL_ALPHA_TEST);\r\n\t\tGL11.glEnable(GL11.GL_ALPHA_TEST);\r\n\t\tTessellator tessellator = Tessellator.getInstance();\r\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\r\n\t\tMinecraft.getMinecraft().getTextureManager().bindTexture(getRandomTexture());\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tbufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\r\n\t\tbufferbuilder.pos(0.0D, (double)this.height, 0.0D).tex(0, (double) (1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, (double)this.height, 0.0D).tex((double)1F, (double)(1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, 0.0D, 0.0D).tex((double)1F , (double)mouseX).endVertex();\r\n\t\tbufferbuilder.pos(0, 0, 0).tex(0, mouseX).endVertex();\r\n\t\ttessellator.draw();\r\n\r\n\t\t//title textures + splash\r\n\t\tthis.mc.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);\r\n\t\tGlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tint j = this.width / 2 - 137;\r\n\t\tif ((double)this.minceraftRoll < 1.0E-4D)\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 99, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99, 30, 129, 0, 27, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26, 30, 126, 0, 3, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26 + 3, 30, 99, 0, 26, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 155, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\tthis.mc.getTextureManager().bindTexture(field_194400_H);\r\n\t\tdrawModalRectWithCustomSizedTexture(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);\r\n\t\tGlStateManager.pushMatrix();\r\n\t\tGlStateManager.translate((float)(this.width / 2 + 90), 70.0F, 0.0F);\r\n\t\tGlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);\r\n\t\tfloat f = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * ((float)Math.PI * 2F)) * 0.1F);\r\n\t\tf = f * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashText) + 32);\r\n\t\tGlStateManager.scale(f, f, f);\r\n\t\tthis.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, -256);\r\n\t\tGlStateManager.popMatrix();\r\n\t\t//End\r\n\r\n\t\tString s = \"Minecraft 1.12.2\";\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\ts = s + \" Demo\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ts = s + (\"release\".equalsIgnoreCase(this.mc.getVersionType()) ? \"\" : \"/\" + this.mc.getVersionType());\r\n\t\t}\r\n\t\tthis.drawString(this.fontRenderer, \"Frame: \"+RandomTexture, this.width - this.fontRenderer.getStringWidth(\"Frame: \"+RandomTexture) - 2, this.height - 30, 16777215);\r\n\t\tthis.drawString(this.fontRenderer, \"Modified by Will0376\", this.width - this.fontRenderer.getStringWidth(\"Modified by Will0376\") - 2, this.height - 20, 16777215);\r\n\r\n\t\tList<String> brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings(true));\r\n\t\tList<String> brdlist = new ArrayList<>();\r\n\t\tfor(int i = 0;i < brandings.size();i++){\r\n\t\t\tif(brandings.get(i).contains(\"MCP\")){\r\n\t\t\t}\r\n\t\t\telse if(brandings.get(i).contains(\"Forge\")){\r\n\t\t\t\tbrdlist.add(\"Forge:\"+(brandings.get(i).split(\"Forge\")[1]));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tbrdlist.add(brandings.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int brdline = 0; brdline < brdlist.size(); brdline++)\r\n\t\t{\r\n\t\t\tString brd = brdlist.get(brdline);\r\n\t\t\tif (!Strings.isNullOrEmpty(brd))\r\n\t\t\t{\r\n\t\t\t\tthis.drawString(this.fontRenderer, brd, 2, this.height - ( 10 + brdline * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.drawString(this.fontRenderer, \"Copyright Mojang AB. Do not distribute!\", this.widthCopyrightRest, this.height - 10, -1);\r\n\r\n\r\n\t\tsuper.drawScreen(mouseX, mouseY, partialTicks);\r\n\t}",
"private void loadTextures() {\r\n int[] imgData;\r\n int width;\r\n int height;\r\n\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n //圖片質量,數字越大越差\r\n options.inSampleSize = 1;\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(path, 0, path.length, options);\r\n width = bitmap.getWidth();\r\n height = bitmap.getHeight();\r\n imgData = new int[width * height * 4];\r\n bitmap.getPixels(imgData, 0, width, 0, 0, width, height);\r\n bitmap.recycle();\r\n System.gc();\r\n\r\n mTextures.add(Texture.loadTextureFromIntBuffer(imgData, width, height));\r\n }",
"private void DrawPlait(GL gl, float x, float y, float xP, float yP,\n\t\t\tdouble costheta, double sintheta, TextureCoords tc) {\n\n\t\tgl.glPushMatrix();\n\t\tgl.glMatrixMode(gl.GL_MODELVIEW);\n\t\t//gl.glScalef(0.5f, 0.5f, 1f);\n\t\tgl.glTranslatef(x, y, 0.0f);\n\n\t\tgl.glEnable(gl.GL_TEXTURE_2D);\n\t\tgl.glAlphaFunc(gl.GL_GREATER, 0.3f);\n\t\tgl.glEnable(gl.GL_ALPHA_TEST);\n\t\tgl.glEnable(gl.GL_MODULATE);\n\t\tgl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\n\t\tgl.glTexEnvf(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);\n\t\tgl.glDepthMask(false);\n\n\t\tm_txt.enable();\n\t\tm_txt.bind();\n\t\tgl.glBegin(gl.GL_QUADS);\n\t\tgl.glColor3f(m_r, m_g, m_b);\n\t\tgl.glRotatef((float) 180, 1.0f, 0.0f, 0.0f);\n\n\t\tgl.glTexCoord2d(tc.left(), tc.top());\n\t\tgl.glVertex2f((float) (costheta * (-xP) - sintheta * (yP)),\n\t\t\t\t(float) (sintheta * (-xP) + costheta * (yP)));\n\t\tgl.glTexCoord2d(tc.right(), tc.top());\n\t\tgl.glVertex2f((float) (costheta * (xP) - sintheta * (yP)),\n\t\t\t\t(float) (sintheta * (xP) + costheta * (yP)));\n\t\tgl.glTexCoord2d(tc.right(), tc.bottom());\n\t\tgl.glVertex2f((float) (costheta * (xP) - sintheta * (-yP)),\n\t\t\t\t(float) (sintheta * (xP) + costheta * (-yP)));\n\t\tgl.glTexCoord2d(tc.left(), tc.bottom());\n\t\tgl.glVertex2f((float) (costheta * (-xP) - sintheta * (-yP)),\n\t\t\t\t(float) (sintheta * (-xP) + costheta * (-yP)));\n\t\tgl.glEnd();\n\n\t\tm_txt.disable();\n\t\tgl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);\n\t\tgl.glDisable(GL.GL_ALPHA);\n\t\tgl.glDisable(gl.GL_BLEND);\n\t\tgl.glDisable(gl.GL_TEXTURE_2D);\n\t\tgl.glDisable(gl.GL_DEPTH_TEST);\n\t\tgl.glDepthMask(true);\n\n\t\tgl.glPopMatrix();\n\t}",
"private void bindTextures() {\n\t\ttry {\n//\t\t\tif (textureLoadIndex < maxNumTextures) {\n\t\t\tboundAll = true;\n\t\t\tfor (int n=0; n<sortedPanImageList.length; n++) {\n\t\t\t\tPanImageEntry panImageEntry = sortedPanImageList[n];\n\t\t\t\tif (panImageEntry.imageListEntry.enabled && (!panImageEntry.loaded)) {\n\t\t\t\t\tboundAll = false;\n\t\t\t\t}\n\t\t\t\tif (panImageEntry.loadImageBuffer != null) {\n\t\t\t\t\tif (panImageEntry.textureNumber < 0) {\n\t\t\t\t\t\t// find new texture number\n\t\t\t\t\t\tif (textureLoadIndex < maxNumTextures) {\n\t\t\t\t\t\t\tpanImageEntry.textureNumber = textures.get(textureLoadIndex);\n\t\t\t\t\t textureLoadIndex++;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// no more textures available\n\t\t\t\t\t\t\tSystem.out.println(\"out of available textures\");\n\t\t\t\t\t\t\tpanImageEntry.loadImageBuffer = null;\n\t\t\t\t\t\t\timageLoader.suspend();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n//\t\t\t\t System.out.println(\"*** binding texture \"+panImageEntry.textureNumber);\n//\t\t\t\t long startTime = System.currentTimeMillis();\n\t\t\t GL11.glBindTexture(GL11.GL_TEXTURE_2D, panImageEntry.textureNumber);\n/*\t\t\t \n\t\t\t if (mipmap) {\n\t\t\t GLU.gluBuild2DMipmaps(GL11.GL_TEXTURE_2D, GL11.GL_RGB8, panImageEntry.loadImageWidth, panImageEntry.loadImageHeight, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, panImageEntry.loadImageBuffer);\n\t\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n\t\t\t else {\n\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB8, panImageEntry.loadImageWidth, panImageEntry.loadImageHeight, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, panImageEntry.loadImageBuffer);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n*/\n\t\t\t int numLevels = panImageEntry.loadImageBuffer.size();\n\t\t\t if (numLevels == 1) {\n\t\t\t \tint width = ((Integer) panImageEntry.loadImageWidth.get(0)).intValue();\n\t\t\t \tint height = ((Integer) panImageEntry.loadImageHeight.get(0)).intValue();\n\t\t\t \tByteBuffer buffer = (ByteBuffer) panImageEntry.loadImageBuffer.get(0);\n\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB8, width, height, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buffer);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\t\t }\n\t\t\t else {\n\t\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_LINEAR);\n\t\t\t GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR/*GL11.GL_NEAREST*/);\n\t\t\t \tfor (int level=0; level<numLevels; level++) {\n\t\t\t\t \tint width = ((Integer) panImageEntry.loadImageWidth.get(level)).intValue();\n\t\t\t\t \tint height = ((Integer) panImageEntry.loadImageHeight.get(level)).intValue();\n\t\t\t\t \tByteBuffer buffer = (ByteBuffer) panImageEntry.loadImageBuffer.get(level);\n\t\t\t\t GL11.glTexImage2D(GL11.GL_TEXTURE_2D, level, GL11.GL_RGB8, width, height, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buffer);\n\t\t\t \t}\n\t\t\t }\n\t\t\t panImageEntry.loadImageBuffer = null;\n\t\t\t panImageEntry.loadImageHeight = null;\n\t\t\t panImageEntry.loadImageWidth = null;\n\t\t\t panImageEntry.loaded = true;\n//\t\t\t\t System.out.println(\"done\");\n//\t\t\t long time = System.currentTimeMillis() - startTime;\n//\t\t\t System.out.println(\"took \"+time+\" millis\");\n\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\tUnknownExceptionDialog.openDialog(this.getShell(), \"Error loading image\", e);\n\t\t\te.printStackTrace(); \n\t\t}\n\t\t\n\t}",
"public void drawButton(Minecraft par1Minecraft, int par2, int par3) {\r\n\t\tif(this.visible) {\r\n\t\t\tRenderUtils.bindTexture(texture);\r\n\t\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\t\tint posX = 176;\r\n\t\t\tint posY = 10;\r\n\t\t\t\r\n\t\t\tif(this.enabled) {\r\n\t\t\t\tposY = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!this.field_73749_j) {\r\n\t\t\t\tposX += 15;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.drawTexturedModalRect(this.xPosition, this.yPosition, posX, posY, this.width, this.height);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void render(float delta) {\n\t\tbackground.render(camera);\n\t\tui.act();\n\t\tui.draw();\n\t\tif(showG) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t\tif(showA) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture2, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t}",
"public void render() { image.drawFromTopLeft(getX(), getY()); }",
"public void drawButton(Minecraft mc, int mouseX, int mouseY) {\n/* 20 */ if (this.visible) {\n/* */ \n/* 22 */ mc.getTextureManager().bindTexture(GuiButton.buttonTextures);\n/* 23 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 24 */ boolean var4 = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);\n/* 25 */ int var5 = 106;\n/* */ \n/* 27 */ if (var4)\n/* */ {\n/* 29 */ var5 += this.height;\n/* */ }\n/* */ \n/* 32 */ drawTexturedModalRect(this.xPosition, this.yPosition, 0, var5, this.width, this.height);\n/* */ } \n/* */ }",
"public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }",
"private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }",
"public void draw(){\n\t\tString filename = \"images/\" + this.imgFileName;\n\t\tStdDraw.picture(this.xxPos, this.yyPos, filename);\n\t}",
"private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }",
"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}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {\n drawDefaultBackground();\n\n drawGuiContainerBackgroundLayer(renderPartialTicks, mouseX, mouseY);\n GL11.glDisable(GL12.GL_RESCALE_NORMAL);\n RenderHelper.disableStandardItemLighting();\n GL11.glDisable(GL11.GL_LIGHTING);\n GL11.glDisable(GL11.GL_DEPTH_TEST);\n\n // GuiScreen code start\n int k;\n for (k = 0; k < this.buttonList.size(); ++k) {\n ((GuiButton) this.buttonList.get(k)).drawButton(this.mc, mouseX, mouseY);\n }\n\n for (k = 0; k < this.labelList.size(); ++k) {\n ((GuiLabel) this.labelList.get(k)).drawLabel(this.mc, mouseX, mouseY);\n }\n // GuiScreen code end\n\n RenderHelper.enableGUIStandardItemLighting();\n GL11.glPushMatrix();\n GL11.glTranslatef((float) guiLeft, (float) guiTop, 0.0F);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) 240 / 1.0F, (float) 240 / 1.0F);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n\n this.theSlot = getHoveredSlot(mouseX, mouseY);\n\n drawSlots(inventorySlots.inventorySlots, (this.theSlot == null) ? -1 : this.theSlot.slotNumber);\n\n // Forge: Force lighting to be disabled as there are some issue where\n // lighting would\n // incorrectly be applied based on items that are in the inventory.\n GL11.glDisable(GL11.GL_LIGHTING);\n this.drawGuiContainerForegroundLayer(mouseX, mouseY);\n GL11.glEnable(GL11.GL_LIGHTING);\n\n InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;\n ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;\n\n // Draw hold itemStack\n if (itemstack != null) {\n byte b0 = 8;\n int k1 = this.draggedStack == null ? 8 : 16;\n String format = null;\n\n if (this.draggedStack != null && this.isRightMouseClick) {\n itemstack = itemstack.copy();\n itemstack.stackSize = MathHelper.ceiling_float_int((float) itemstack.stackSize / 2.0F);\n } else if (this.dragSplitting && this.dragSplittingSlots.size() > 1) {\n itemstack = itemstack.copy();\n itemstack.stackSize = this.dragSplittingRemnant;\n\n if (itemstack.stackSize == 0) {\n format = \"\" + EnumChatFormatting.YELLOW + \"0\";\n }\n }\n\n this.drawItemStack(itemstack, mouseX - guiLeft - b0, mouseY - guiTop - k1, format);\n }\n\n if (this.returningStack != null) {\n float f1 = (float) (Minecraft.getSystemTime() - this.returningStackTime) / 100.0F;\n\n if (f1 >= 1.0F) {\n f1 = 1.0F;\n this.returningStack = null;\n }\n\n int k1 = this.returningStackDestSlot.xDisplayPosition - this.touchUpX;\n int j2 = this.returningStackDestSlot.yDisplayPosition - this.touchUpY;\n int l1 = this.touchUpX + (int) ((float) k1 * f1);\n int i2 = this.touchUpY + (int) ((float) j2 * f1);\n this.drawItemStack(this.returningStack, l1, i2, null);\n }\n\n GL11.glPopMatrix();\n\n // Render tooltips\n if (inventoryplayer.getItemStack() == null && this.theSlot != null && this.theSlot.getHasStack()) {\n ItemStack itemstack1 = this.theSlot.getStack();\n this.renderToolTip(itemstack1, mouseX, mouseY);\n }\n\n GL11.glEnable(GL11.GL_LIGHTING);\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n RenderHelper.enableStandardItemLighting();\n }",
"public void render(){\n spriteBatch.begin();\n drawEnemies();\n drawPlayer();\n drawBullets();\n spriteBatch.end();\n if(debug){\n drawDebug();\n }\n }",
"public void backBufferIntoTexture()\r\n\t{\r\n\t\tgl.glEnable(GL_TEXTURE_2D);\r\n\t\tgl.glShadeModel(GL_FLAT);\r\n\t\tif (InternalTexture[0] == 0) {\r\n\t\t\tgl.glGenTextures(1,InternalTexture);\r\n\t\t\tSystem.out.print(\"Initializing internal texture \"+InternalTexture[0]+\":[\"+getWidth()+\",\"+getHeight()+\"]\\n\");\r\n\t\t\tgl.glBindTexture(GL_TEXTURE_2D, InternalTexture[0]);\r\n\t\t\tgl.glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, this.getWidth(), this.getHeight(), 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tgl.glBindTexture(GL_TEXTURE_2D, InternalTexture[0]);\r\n\t\t\tgl.glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, this.getWidth(), this.getHeight());\r\n\t\t}\r\n\t\tglut.glutReportErrors();\r\n\t}",
"public void create() {\r\n\t\t\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tGdx.input.setInputProcessor(new MyInputProcessor());\r\n\t\t\r\n\t\t\r\n\t\ttextures = Tex.getTex();\r\n\t\t// load images\r\n\t\ttextures.loadTexture(\"res/images/guyDown.png\", \"guyDown\");\r\n\t\ttextures.loadTexture(\"res/images/guyUp.png\", \"guyUp\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Down.png\", \"guyDown2\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Up.png\", \"guyUp2\");\r\n\t\ttextures.loadTexture(\"res/images/enemyDown.png\", \"enemyDown\");\r\n\t\ttextures.loadTexture(\"res/images/enemyUp.png\", \"enemyUp\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/skyline.png\", \"skyline\");\r\n\t\ttextures.loadTexture(\"res/images/skyline2.jpg\", \"skyline2\");\r\n\t\ttextures.loadTexture(\"res/images/skyline3.png\", \"skyline3\");\t\t\r\n\t\ttextures.loadTexture(\"res/images/circuit board.jpg\", \"fundo2\");\r\n\t\ttextures.loadTexture(\"res/images/grav3.jpg\", \"menu\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/singleplayer.png\", \"single\");\r\n\t\ttextures.loadTexture(\"res/images/multiplayer.png\", \"multi\");\r\n\t\ttextures.loadTexture(\"res/images/exit.png\", \"exit\");\r\n\t\ttextures.loadTexture(\"res/images/level1B.png\", \"B1\");\r\n\t\ttextures.loadTexture(\"res/images/level2B.png\", \"B2\");\r\n\t\ttextures.loadTexture(\"res/images/level3B.png\", \"B3\");\r\n\t\ttextures.loadTexture(\"res/images/mainMenuB.png\", \"mainB\");\r\n\t\ttextures.loadTexture(\"res/images/win1.png\", \"win1\");\r\n\t\ttextures.loadTexture(\"res/images/win2.png\", \"win2\");\r\n\t\ttextures.loadTexture(\"res/images/tryagain.png\", \"retry\");\r\n\t\ttextures.loadTexture(\"res/images/easy.png\", \"easy\");\r\n\t\ttextures.loadTexture(\"res/images/medium.png\", \"medium\");\r\n\t\ttextures.loadTexture(\"res/images/hard.png\", \"hard\");\r\n\t\ttextures.loadTexture(\"res/images/difficulty.png\", \"difficulty\");\r\n\t\ttextures.loadTexture(\"res/images/thunder2.png\", \"thunder\");\r\n\t\r\n\t\ttextures.loadTexture(\"res/images/levelcleared.png\", \"cleared\");\r\n\t\ttextures.loadTexture(\"res/images/you lost.png\", \"lost\");\r\n\t\ttextures.loadTexture(\"res/images/playerpress.png\", \"playerp\");\r\n\t\ttextures.loadTexture(\"res/images/player1press.png\", \"player1p\");\r\n\t\ttextures.loadTexture(\"res/images/player2press.png\", \"player2p\");\r\n\t\ttextures.loadTexture(\"res/images/selectthelevel.png\", \"select\");\r\n\t\t\r\n\t\t\r\n\t\tsb = new SpriteBatch();\r\n\t\tcam = new OrthographicCamera();\r\n\t\tcam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\thudCam = new OrthographicCamera();\r\n\t\thudCam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\tgsm = new GameStateManager(this);\r\n\t\t\t\t\r\n\t}",
"public void renderAlphaBG(int n, int n2, ResourceLocation resourceLocation) {\n void y;\n void x;\n void texture;\n mc.getTextureManager().bindTexture((ResourceLocation)texture);\n GL11.glPushMatrix();\n GL11.glColor4f((float)Float.intBitsToFloat(Float.floatToIntBits(84.80346f) ^ 0x7D299B5F), (float)Float.intBitsToFloat(Float.floatToIntBits(356.26364f) ^ 0x7C3221BF), (float)Float.intBitsToFloat(Float.floatToIntBits(4.4841223f) ^ 0x7F0F7DEE), (float)Float.intBitsToFloat(Float.floatToIntBits(6.9323945f) ^ 0x7F5DD62D));\n Gui.drawScaledCustomSizeModalRect((int)x, (int)y, (float)Float.intBitsToFloat(Float.floatToIntBits(1.9387513E38f) ^ 0x7F11DAFE), (float)Float.intBitsToFloat(Float.floatToIntBits(1.7625584E38f) ^ 0x7F0499A4), (int)104, (int)16, (int)(this.getWidth() - 4), (int)11, (float)Float.intBitsToFloat(Float.floatToIntBits(0.112598404f) ^ 0x7F3699FE), (float)Float.intBitsToFloat(Float.floatToIntBits(0.60222334f) ^ 0x7E9A2B4F));\n GL11.glPopMatrix();\n GlStateManager.clear((int)256);\n }",
"@Override\r\n\tpublic void render() {\r\n\r\n\t\tsb.setProjectionMatrix(cam.combined);\r\n\r\n\t\t// draw background\r\n\t\tbg.render(sb);\r\n\r\n\t\t// draw button\r\n\t\tlevel1.render(sb);\r\n\t\tlevel2.render(sb);\r\n\t\tlevel3.render(sb);\r\n\t\t\r\n\t\tif (gameMode == 1){\r\n\t\t\tplayer1press.render(sb);\r\n\t\t\tplayer2press.render(sb);\r\n\t\t}\r\n\t\telse \r\n\t\t\tplayerpress.render(sb);\r\n\t\t\r\n\t\t\r\n\t selectTheLevel.render(sb);\r\n\t\t\r\n\t\tmainMenuB.render(sb);\r\n\r\n\t\t// debug draw box2d\r\n\t\tif(debug) {\r\n\t\t\tcam.setToOrtho(false, Game.V_WIDTH / 100, Game.V_HEIGHT / 100);\r\n\t\t\tb2dRenderer.render(world, cam.combined);\r\n\t\t\tcam.setToOrtho(false, Game.V_WIDTH, Game.V_HEIGHT);\r\n\t\t}\r\n\r\n\t}",
"public void bind()\n {\n glBindTexture(GL_TEXTURE_2D, texture);\n }",
"private void chargerTextures() {\n String messageErreur = \"\";\n try {\n JETON_2 = new Texture(Gdx.files.internal(\"textures/jeton_2.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_2.png\"+\"\\n\";\n }\n try {\n JETON_3 = new Texture(Gdx.files.internal(\"textures/jeton_3.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_3.png\"+\"\\n\";\n }\n try {\n JETON_4 = new Texture(Gdx.files.internal(\"textures/jeton_4.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_4.png\"+\"\\n\";\n }\n try {\n JETON_5 = new Texture(Gdx.files.internal(\"textures/jeton_5.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_5.png\"+\"\\n\";\n }\n try {\n JETON_6 = new Texture(Gdx.files.internal(\"textures/jeton_6.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_6.png\"+\"\\n\";\n }\n try {\n JETON_8 = new Texture(Gdx.files.internal(\"textures/jeton_8.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_8.png\"+\"\\n\";\n }\n try {\n JETON_9 = new Texture(Gdx.files.internal(\"textures/jeton_9.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_9.png\"+\"\\n\";\n }\n try {\n JETON_10 = new Texture(Gdx.files.internal(\"textures/jeton_10.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_10.png\"+\"\\n\";\n }\n try {\n JETON_11 = new Texture(Gdx.files.internal(\"textures/jeton_11.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_11.png\"+\"\\n\";\n }\n try {\n JETON_12 = new Texture(Gdx.files.internal(\"textures/jeton_12.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/jeton_12.png\"+\"\\n\";\n }\n try {\n FORET = new Texture(Gdx.files.internal(\"textures/texture_foret.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_foret.png\"+\"\\n\";\n }\n try {\n PRE = new Texture(Gdx.files.internal(\"textures/texture_pre.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_pre.png\"+\"\\n\";\n }\n try {\n CHAMP = new Texture(Gdx.files.internal(\"textures/texture_champ.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_champ.png\"+\"\\n\";\n }\n try {\n COLLINE = new Texture(Gdx.files.internal(\"textures/texture_colline.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_colline.png\"+\"\\n\";\n }\n try {\n MONTAGNE = new Texture(Gdx.files.internal(\"textures/texture_montagne.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_montagne.png\"+\"\\n\";\n }\n try {\n DESERT = new Texture(Gdx.files.internal(\"textures/texture_desert.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_desert.png\"+\"\\n\";\n }\n try {\n MER = new Texture(Gdx.files.internal(\"textures/texture_mer.jpg\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_mer.jpg\"+\"\\n\";\n }\n try {\n PORT = new Texture(Gdx.files.internal(\"textures/texture_port2.png\"));\n } catch (Exception e) {\n messageErreur += \"Erreur lors du chargement de la texture : \"+\"textures/texture_port2.png\"+\"\\n\";\n }\n System.err.println(messageErreur);\n }",
"private void loadGLTextures(GL10 gl) throws IOException\t\t\t// Load Bitmaps And Convert To Textures\r\n {\r\n texture[0] = new Texture();\r\n texture[1] = new Texture();\r\n // Load The Bitmap, Check For Errors.\r\n TGALoader.loadTGA(texture[0], \"tga/uncompressed.tga\");\r\n TGALoader.loadTGA(texture[1], \"tga/compressed.tga\");\r\n for (int loop = 0; loop < 2; loop++)\t\t\t\t\t\t// Loop Through Both Textures\r\n {\r\n // Typical Texture Generation Using Data From The TGA ( CHANGE )\r\n gl.glGenTextures(1, texture[loop].texID, 0);\t\t\t\t// Create The Texture ( CHANGE )\r\n gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[loop].texID[0]);\r\n gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, texture[loop].type, texture[loop].width, texture[loop].height, 0, texture[loop].type, GL10.GL_UNSIGNED_BYTE, texture[loop].imageData);\r\n gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);\r\n gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);\r\n \r\n Log.i(\"40\", \"bpp = \" + texture[loop].bpp + \" type = \" + texture[loop].type);\r\n }\r\n }",
"public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }",
"public void draw() {\n \n // TODO\n }",
"public String getGuiTexture() {\n return getGuiTexture(\"\");\n }",
"public void bind() {\n if (isTextureLoaded()) {\n glBindTexture(GL_TEXTURE_2D, texId.getId());\n } else {\n System.err.println(\"[Error] texture::bind() Binding a unloaded texture.\");\n }\n }",
"private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }",
"private void render()\n {\n //Applicazione di un buffer \"davanti\" alla tela grafica. Prima di disegnare \n //sulla tela grafica il programma disegnerà i nostri oggetti grafici sul buffer \n //che, in seguito, andrà a disegnare i nostri oggetti grafici sulla tela\n bufferStrategico = display.getTelaGrafica().getBufferStrategy();\n \n //Se il buffer è vuoto (== null) vengono creati 3 buffer \"strategici\"\n if(bufferStrategico == null)\n {\n display.getTelaGrafica().createBufferStrategy(3);\n return;\n }\n \n //Viene definito l'oggetto \"disegnatore\" di tipo Graphic che disegnerà i\n //nostri oggetti grafici sui nostri buffer. Può disegnare qualsiasi forma\n //geometrica\n disegnatore = bufferStrategico.getDrawGraphics();\n \n //La riga seguente pulisce lo schermo\n disegnatore.clearRect(0, 0, larghezza, altezza);\n \n //Comando per cambiare colore dell'oggetto \"disegnatore\". Qualsiasi cosa\n //disengata dal disegnatore dopo questo comando avrà questo colore.\n \n /*disegnatore.setColor(Color.orange);*/\n \n //Viene disegnato un rettangolo ripieno. Le prime due cifre indicano la posizione \n //da cui il nostro disegnatore dovrà iniziare a disegnare il rettangolo\n //mentre le altre due cifre indicano le dimensioni del rettangolo\n \n /*disegnatore.fillRect(10, 50, 50, 70);*/\n \n //Viene disegnato un rettangolo vuoto. I parametri hanno gli stessi valori\n //del comando \"fillRect()\"\n \n /*disegnatore.setColor(Color.blue);\n disegnatore.drawRect(0,0,10,10);*/\n \n //I comandi seguenti disegnano un cerchio seguendo la stessa logica dei\n //rettangoli, di colore verde\n \n /*disegnatore.setColor(Color.green);\n disegnatore.fillOval(50, 10, 50, 50);*/\n \n /*Utilizziamo il disegnatore per caricare un'immagine. Il primo parametro\n del comando è l'immagine stessa, il secondo e il terzo parametro sono \n le coordinate dell'immagine (x,y) mentre l'ultimo parametro è l'osservatore\n dell'immagine (utilizzo ignoto, verrà impostato a \"null\" in quanto non\n viene usato)*/\n //disegnatore.drawImage(testImmagine,10,10,null);\n \n /*Comando che disegna uno dei nostri sprite attraverso la classe \"FoglioSprite\".*/\n //disegnatore.drawImage(foglio.taglio(32, 0, 32, 32), 10, 10,null);\n \n /*Viene disegnato un albero dalla classe \"Risorse\" attraverso il disegnatore.*/\n //disegnatore.drawImage(Risorse.omino, x, y,null);\n \n /*Se lo stato di gioco esiste eseguiamo la sua renderizzazione.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().renderizzazione(disegnatore);\n }\n \n //Viene mostrato il rettangolo\n bufferStrategico.show();\n disegnatore.dispose();\n }",
"public static void loadBlockTextures() {\n\t\tspriteTopOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOn.png\");\n\t\tspriteTopOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOff.png\");\n\t\tspriteROn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOn.png\");\n\t\tspriteROff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOff.png\");\n\t\tspriteTOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOn.png\");\n\t\tspriteTOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOff.png\");\n\t}",
"private boolean load() {\r\n \t\r\n int[] textureIds = new int[1];\r\n GLES10.glGenTextures(1, textureIds, 0);\r\n this.textureId = textureIds[0];\r\n \r\n InputStream in = null;\r\n // try loading from assets\r\n try {\r\n \t\r\n in = FileIO.getInstance().readAsset(\"textures\" + File.separator + this.fileName);\r\n Bitmap bitmap = BitmapFactory.decodeStream(in);\r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, this.textureId);\r\n GLUtils.texImage2D(GLES10.GL_TEXTURE_2D, 0, bitmap, 0);\r\n this.setFilters(GLES10.GL_NEAREST, GLES10.GL_NEAREST); \r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, 0);\r\n this.width = bitmap.getWidth();\r\n this.height = bitmap.getHeight();\r\n bitmap.recycle();\r\n \r\n } catch (IOException e) {\r\n \t\r\n \t// if not found in assets try loading from sd-card\r\n try {\r\n \t\r\n \tin = FileIO.getInstance().readFile(APP_FOLDER + File.separator + \"textures\" + File.separator + this.fileName);\r\n Bitmap bitmap = BitmapFactory.decodeStream(in);\r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, this.textureId);\r\n GLUtils.texImage2D(GLES10.GL_TEXTURE_2D, 0, bitmap, 0);\r\n this.setFilters(GLES10.GL_NEAREST, GLES10.GL_NEAREST); \r\n GLES10.glBindTexture(GLES10.GL_TEXTURE_2D, 0);\r\n this.width = bitmap.getWidth();\r\n this.height = bitmap.getHeight();\r\n bitmap.recycle();\r\n \r\n } catch (IOException e2) {\r\n \t\r\n \treturn false;\r\n \t\r\n } finally {\r\n \t\r\n if (in != null) {\r\n \r\n \ttry { in.close(); } catch (IOException e2) {}\r\n }\r\n }\r\n \r\n } finally {\r\n \t\r\n if (in != null) {\r\n \r\n \ttry { in.close(); } catch (IOException e) {}\r\n }\r\n }\r\n \r\n return true;\r\n }",
"public void loadTextures(){\n switch (playerCarColor){\n case \"Black\":\n playerTexture = new Texture(Gdx.files.internal(\"images/playerCarBlack.png\"));\n fadedPlayerTexture = new Texture(Gdx.files.internal(\"images/playerCarBlackFaded.png\"));\n break;\n case \"White\":\n playerTexture = new Texture(Gdx.files.internal(\"images/playerCarWhite.png\"));\n fadedPlayerTexture = new Texture(Gdx.files.internal(\"images/playerCarWhiteFaded.png\"));\n break;\n }\n\n enemyPistolTexture = new Texture(Gdx.files.internal(\"images/enemyPistol.png\"));\n enemyAWPTexture = new Texture(Gdx.files.internal(\"images/enemyAWP.png\"));\n enemyStalkerTexture = new Texture(Gdx.files.internal(\"images/enemyStalker.png\"));\n bulletTexture = new Texture(Gdx.files.internal(\"images/bullet.png\"));\n enemyBossTexture = new Texture(Gdx.files.internal(\"images/enemyBoss.png\"));\n }",
"@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)\n {\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);\n int i = (this.width - this.xSize) / 2;\n int j = (this.height - this.ySize) / 2;\n this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.inventoryRows * 18 + 17);\n this.drawTexturedModalRect(i, j + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);\n }",
"@Override\n\tpublic void drawButton(Minecraft par1Minecraft, int par2, int par3)\n {\n if (this.drawButton)\n {\n boolean var4 = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n par1Minecraft.renderEngine.bindTexture(par1Minecraft.renderEngine.getTexture(SteamCraft.guiLocation + \"researchpaper.png\"));\n int var5 = 209;\n int var6 = 13;\n\n if (this.nextPage)\n {\n var6 += 91;\n var5 += 13;\n }\n\n this.drawTexturedModalRect(this.xPosition, this.yPosition, var5, 0, 10, var6);\n }\n }",
"@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}",
"public static void loadTextures() {\n loadFontTextures();\n loadAlternatePaletteTextures(); // Load alternate tiles.\n findAllTextures(); // Should be run last.\n System.out.println(\"Textures have been successfully loaded.\");\n }",
"private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }",
"public void render();",
"public void drawScreen(int var1, int var2, float var3) {\r\n\t\tthis.drawDefaultBackground();\r\n\t\tthis.guiLeft = (this.width - this.xSize) / 2;\r\n\t\tthis.guiTop = (this.height - this.ySize) / 2;\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glTranslatef(this.guiLeft, this.guiTop, 0.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(this.mc.renderEngine\r\n\t\t\t\t.getTexture(\"/gui/elevatorgui.png\"));\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.drawTexturedModalRect(0, 0, 0, 0, this.xSize, this.ySize);\r\n\t\tGL11.glTranslatef(0.0F, 0.0F, 0.0F);\r\n\t\tGL11.glPopMatrix();\r\n\t\tsuper.drawScreen(var1, var2, var3);\r\n\r\n\t\tif (!this.optionsOpen) {\r\n\t\t\tif (!this.screenTitle.equals(\"\")) {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\tthis.screenTitle, this.width / 2, this.titleTop, 0);\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"\"\r\n\t\t\t\t\t\t+ this.screenSubtitle + \"\", this.width / 2,\r\n\t\t\t\t\t\tthis.subtitleTop, 0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"\"\r\n\t\t\t\t\t\t+ this.screenSubtitle + \"\", this.width / 2,\r\n\t\t\t\t\t\tthis.titleTop, 0);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.screenTitle != null && !this.screenTitle.equals(\"\")) {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\tthis.screenTitle, this.width / 2 - 20,\r\n\t\t\t\t\t\tthis.subtitleTop, 0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer,\r\n\t\t\t\t\t\t\"[Unnamed Elevator]\", this.width / 2, this.subtitleTop,\r\n\t\t\t\t\t\t0);\r\n\t\t\t}\r\n\r\n\t\t\tthis.drawUnshadedCenteredString(this.fontRenderer, \"Options\",\r\n\t\t\t\t\tthis.width / 2, this.titleTop, 0);\r\n\t\t\tthis.floorNamesList.drawScreen(var1, var2, var3);\r\n\t\t}\r\n\t}",
"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}",
"@Override\n public void render(GL2 gl)\n {\n if(useClearColor)\n {\n gl.glClearColor(color[0], color[1], color[2], color[3]);\n gl.glClear(GL.GL_COLOR_BUFFER_BIT);\n }\n\n // Texture stuff now, if we have one.\n if(stateChanged)\n {\n for(int i = 0; i < 6; i++)\n {\n synchronized(textureIdMap[i])\n {\n textureIdMap[i].clear();\n }\n }\n stateChanged = false;\n }\n\n\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glActiveTexture(GL.GL_TEXTURE0);\n gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);\n\n for(int i = 0; i < 6; i++)\n renderGeom(gl, i);\n }"
]
| [
"0.7371593",
"0.7182336",
"0.69926864",
"0.68884444",
"0.68071264",
"0.6766632",
"0.6757245",
"0.66342056",
"0.65027916",
"0.6470329",
"0.64278746",
"0.64025897",
"0.6397245",
"0.6348024",
"0.6304453",
"0.629396",
"0.6261718",
"0.62561363",
"0.62510914",
"0.6218809",
"0.6209328",
"0.6196788",
"0.6189997",
"0.61665756",
"0.61510015",
"0.6150883",
"0.61265486",
"0.61193687",
"0.61099124",
"0.6093513",
"0.6084067",
"0.6070786",
"0.6065969",
"0.60554856",
"0.6050297",
"0.6038685",
"0.6038406",
"0.6038406",
"0.6037207",
"0.6029192",
"0.60146147",
"0.60111964",
"0.6000819",
"0.59991336",
"0.59897816",
"0.5982341",
"0.595969",
"0.595638",
"0.59543085",
"0.59497875",
"0.5945034",
"0.59434897",
"0.59380704",
"0.5927429",
"0.59253013",
"0.5924797",
"0.5923395",
"0.5896383",
"0.5895666",
"0.5894116",
"0.5893914",
"0.5892326",
"0.58907783",
"0.58860946",
"0.58811736",
"0.5880396",
"0.588026",
"0.5873728",
"0.5873417",
"0.58697414",
"0.5868635",
"0.5864798",
"0.58613104",
"0.5847387",
"0.5843342",
"0.58432996",
"0.58418053",
"0.58381754",
"0.5833271",
"0.5830525",
"0.58043486",
"0.5804314",
"0.57967764",
"0.5796141",
"0.5794689",
"0.5793073",
"0.5792983",
"0.5782642",
"0.57763207",
"0.577537",
"0.5773378",
"0.57729083",
"0.57659304",
"0.57649374",
"0.5762155",
"0.5750967",
"0.573734",
"0.57308686",
"0.5724547",
"0.5724273",
"0.572414"
]
| 0.0 | -1 |
use this method to access to database | public static synchronized DatabaseUserHelper getInstance(Context context) {
if (sInstance == null) {
mContext = context.getApplicationContext();
sInstance = new DatabaseUserHelper(mContext);
}
return sInstance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectDatabase(){\n }",
"private void getDatabase(){\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}",
"DBConnect() {\n \n }",
"Object getDB();",
"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}",
"public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}",
"public void conectionSql(){\n conection = connectSql.connectDataBase(dataBase);\n }",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"private Connection dbacademia() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void dbConnection()\n {\n\t try {\n\t \t\tClass.forName(\"org.sqlite.JDBC\");\n // userName=rpanel.getUserName();\n String dbName=userName+\".db\";\n c = DriverManager.getConnection(\"jdbc:sqlite:database/\"+dbName);\n }\n //catch the exception\n catch ( Exception e ) \n { \n System.err.println( \"error in catch\"+e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\t if(c!=null)\n\t {\n System.out.println(\"Opened database successfully\");\n\t System.out.println(c);\n createData();\n\t}\n }",
"private void dbConn()\n {\n\ttry\t\t\n\t{\t\n\t\t\t// driver to use with named database\n\t\tString url = \"jdbc:ucanaccess://c:/AH/AthloneHospital.mdb\";\n \n\t\t\t// connection represents a session with a specific database\n\t\tcon = DriverManager.getConnection(url);\n\n\t\t\t// stmt used for executing sql statements and obtaining results\n\t\tstmt = con.createStatement();\n\n\t\trs = stmt.executeQuery(\"SELECT * FROM Login\");\n\n\t\twhile(rs.next())\t// count number of rows in table\n\t\t\tcount++;\n\t\trs.close();\n System.out.println(\"Success!!!!\");\n\t}\n\tcatch(Exception e) { System.out.println(\"Error in start up......\");}\n }",
"private Connection database() {\n Connection con = null;\n String db_url = \"jdbc:mysql://localhost:3306/hospitalms\";\n String db_driver = \"com.mysql.jdbc.Driver\";\n String db_username = \"root\";\n String db_password = \"\";\n \n try {\n Class.forName(db_driver);\n con = DriverManager.getConnection(db_url,db_username,db_password);\n } \n catch (SQLException | ClassNotFoundException ex) { JOptionPane.showMessageDialog(null,ex); }\n return con;\n }",
"DatabaseSession openSession();",
"private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}",
"public ConnectDB(){\r\n\r\n\t}",
"private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }",
"public static Connection databaseConnection()\n {\n try{\n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n \n String path=\"E:\\\\Bloodbank.accdb\";\n String url=\"jdbc:ucanaccess://\"+path;\n con=DriverManager.getConnection(url);\n \n Statement st=con.createStatement();\n String sql=\"select * from Admin\";\n ResultSet rs=st.executeQuery(sql);\n while(rs.next()){\n System.out.println(\"\\n\"+rs.getString(1)+\"\\t\"+rs.getString(2));\n \n }\n con.close();\n }\n catch(ClassNotFoundException | SQLException e)\n {\n System.out.println(e);\n \n }\n return null; \n }",
"private RefereesInLeagueDBAccess() {\n\n }",
"public void connectToDB(){\n\ttry {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/patient\",\"root\",\"7417899737\");\n\t} catch (ClassNotFoundException e) {\n\t\t\n\t\te.printStackTrace();\n\t} catch (SQLException e) {\n\t\t\n\t\te.printStackTrace();\n\t}\n\t\n}",
"DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}",
"public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"public abstract ODatabaseInternal<?> openDatabase();",
"private DAOOfferta() {\r\n\t\ttry {\r\n\t\t\tClass.forName(driverName);\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(createQuery);\r\n\r\n\t\t\tps.executeUpdate();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ConnectionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*closeResource()*/;\r\n\t\t}\r\n\t}",
"public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }",
"private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }",
"private void ini_SelectDB()\r\n\t{\r\n\r\n\t}",
"public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}",
"public void connectDB(){\r\n\r\n try{\r\n /*\r\n //commands to open up database\r\n Class.forName(\"com.mysql.jdbc.Driver\"); //maybe add .newInstance();\r\n String connectionStringURL = \"jdbc:mysql://us-cdbr-azure-west-b.cleardb.com:3306/acsm_54270fa45d472fa\";\r\n mysql = DriverManager.getConnection(connectionStringURL, \"b1d0beb2ed12fc\", \"ba632151\");\r\n //if no connection let user know it failed, if connect works print success\r\n */\r\n mainController mainTreat = new mainController(); //new\r\n mysql = mainTreat.connectTheDB(); //new\r\n\r\n if(mysql == null)\r\n System.out.println(\"Connection Failed to treatment\");\r\n else\r\n System.out.println(\"Success connecting to treatment\");\r\n\r\n String searchStatement = \"select * from treatment\";\r\n st = mysql.createStatement();\r\n rs = st.executeQuery(searchStatement);\r\n while(rs.next()){\r\n treatment tm = new treatment();\r\n tm.setIdProperty(rs.getString(1));\r\n tm.setTreatmentNameProperty(rs.getString(2));\r\n tm.setMedicineIDProperty(rs.getString(3));\r\n tm.setDepartmentIDProperty(rs.getString(4));\r\n tm.setDiseaseIDProperty(rs.getString(5));\r\n treatmentData.add(tm);\r\n }\r\n st.close();\r\n st = null;\r\n }\r\n //exception and maybe more exceptions\r\n catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n }",
"private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}",
"public List<CustomerModel> readDatabase() throws Exception{\n\nList<CustomerModel> list = new ArrayList<CustomerModel>();\n\ntry{\nlog.info(\"Loading MySql driver\");\nClass.forName(\"com.mysql.jdbc.Driver\");\n\nlog.info(\"Setting up connection with db\");\nconnect= DriverManager.getConnection(\"jdbc:mysql://localhost:3306/apidft\",\"root\",\"cisco\");\nlog.info(\"Database connection successful\");\nstatement = connect.createStatement();\n\nresultSet= statement.executeQuery(\"select * from customer\");\n\nwhile(resultSet.next()){\nlist.add(processRow(resultSet));\n}\n}\n\ncatch(Exception e){\nlog.error(\"Database connection fail\");\n}\n\nfinally{\nconnect.close();\n}\nreturn list;\n}",
"public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}",
"private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }",
"public DatabaseManagement() throws SQLException {\n\t\n\t\ttry {\n\t\t\t//use driver\n\t\t\tClass.forName(MYSQL_DRIVER);\n\t\t System.out.println(\"Class Loaded....\");\n\t\t\t\n\t\t //get connection to database\n\t\t\tmyConn = DriverManager.getConnection(getDbUrl(), getUserName(), getPassword());\n\t\t\t//System.out.println(\"Connected to database...\");\n\t\t\t\n\t\t\t//create a statement\n\t\t\tmyStmt = myConn.createStatement();\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\tcatch (Exception exc){\n\t\t\texc.printStackTrace();\n\t\t}\t\t\n\t}",
"private void openDatabase() {\n database = new DatabaseExpenses(this);\n database.open();\n }",
"private void open_db() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\"); \n Con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/projectlaundry\",\"root\",\"\");\n stm = Con.createStatement();\n }\n catch (Exception e){\n JOptionPane.showMessageDialog(null,\"Koneksi gagal\");\n System.out.println(e.getMessage());\n }\n }",
"private void connectToDB() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n this.conn = DriverManager.getConnection(prs.getProperty(\"url\"),\n prs.getProperty(\"user\"), prs.getProperty(\"password\"));\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}",
"public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }",
"private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }",
"public String getDatabase();",
"String getDatabase();",
"public static void connect() {\n\t\tString url = \"jdbc:sqlite:C:/sqlite/db/sample.db\";\r\n\t\ttry {\r\n\t\t\tconn= DriverManager.getConnection(url);\r\n\t\t\tSystem.out.println(\"연결성공!!!\");\r\n\t\t\t\r\n//\t\t\tPreparedStatement psmt = conn.prepareStatement(\"select * from person\");\r\n//\t\t\tResultSet rs =psmt.executeQuery();\r\n//\t\t\t\r\n//\t\t\twhile(rs.next()) {\r\n//\t\t\t\tSystem.out.printf(\"id: %3d, name: %4s, age: %2d, phone: %10s\",rs.getInt(\"id\"),rs.getString(\"name\"),rs.getInt(\"age\"),rs.getString(\"phone\"));\r\n//\t\t\t\tSystem.out.println();//줄바꿈\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n//\t\t\tfinally {\r\n//\t\t\tif(conn!=null) {\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tconn.close();\r\n//\t\t\t\t} catch (SQLException e) {\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t}",
"private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }",
"public interface DatabaseAccessInterface {\n\t\n\t/**\n\t * Closes the database connection.\n\t * @throws SQLException\n\t */\n\tpublic void closeConnection() throws SQLException;\n\t\n\t/**\n\t * Registers the action on Raspberry Pi into database.\n\t * @param rpiId\n\t * @param time\n\t * @param action\n\t * @param level\n\t * @throws SQLException\n\t */\n\tpublic void addRpiAction(String rpiId, String time, String action, String level) throws SQLException;\n\t\n\t/**\n\t * Adds photo to the database.\n\t * @param rpiId\n\t * @param time\n\t * @param name\n\t * @param photo\n\t * @throws SQLException\n\t */\n\tpublic void addRpiPhoto(String rpiId, String time, String name, byte[] photo) throws SQLException, IOException;\n\t\n\t/**\n\t * Registers the user for the given Raspberry Pi.\n\t * @param rpiId\n\t * @param user\n\t * @throws SQLException\n\t */\n\tpublic void addRpiUserRelation(String rpiId, String user) throws SQLException;\n\t\n\t\n\t/**\n\t * Adds user credentials to the database.\n\t * @param login\n\t * @param password\n\t */\n\tpublic void addUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Adds user token for communication authorization with the token.\n\t * @param login\n\t * @param token\n\t */\n\tpublic void addUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Deletes photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @throws SQLException\n\t */\n\tpublic void deleteRpiPhoto(String rpiId, String time) throws SQLException;\n\t\n\t/**\n\t * Deletes user credentials and all data connected to the user from the database.\n\t * @param login\n\t */\n\tpublic void deleteUserCredentials(String login) throws SQLException;\n\t\n\t/**\n\t * Returns the time of most recent action on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic String getLatestDateOnActions(String rpiId) throws SQLException, IOException;\n\t\n\t/**\n\t * Returns the time of most recent photo on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date String\n\t * @throws SQLException\n\t */\n\tpublic String getLatestDateOnPhotos(String rpiId) throws SQLException;\n\t\n\t/**\n\t * Gets the photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @return byte array\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent photos before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfDates\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhotoTimesBefore(String rpiId, String time, int numberOfDates) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent actions before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfActions\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getRpiActionsBefore(String rpiId, String time, int numberOfActions) throws SQLException, IOException;\n\t\n\t/**\n\t * Retrieves information about user and Rpi relation.\n\t * @param user\n\t * @return Rpi ID for the given user\n\t * @throws SQLException\n\t */\n\tpublic String getRpiByUser(String user) throws SQLException;\n\t\n\t/**\n\t * Gets the user, which is identified be the token.\n\t * @param token\n\t * @return user name or empty string, if the user does not exist.\n\t */\n\tpublic String getUserByToken(String token) throws SQLException;\n\t\n\t\n\t/**\n\t * Validates user's login and password.\n\t * @param login\n\t * @param password\n\t * @return true, if data are valid, false otherwise.\n\t */\n\tpublic boolean validateUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Validates user's token for communication.\n\t * @param login\n\t * @param token\n\t * @return true, if token is valid, false otherwise.\n\t */\n\tpublic boolean validateUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Validates that such Raspberry Pi is registered.\n\t * @param rpiId\n\t * @return true, if such id exists in the database and device is active.\n\t */\n\tpublic boolean verifyRpiRegistration(String rpiId) throws SQLException;\n\t\n}",
"DatabaseClient newModulesDbClient();",
"public static void establishConnection()throws IOException, SQLException {\n connection= DriverManager.getConnection(\n Configuration.fileReader(\"dbhostname\"),\n Configuration.fileReader(\"dbusername\"),\n Configuration.fileReader(\"dbpassword\"));\n statement=connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n }",
"public Connection DbConnection() throws Exception {\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n // Creating a new connection\n // String myDB = \"jdbc:sqlite:C:\\\\Users\\\\kapersky\\\\Documents\\\\NetBeansProjects\\\\Library Management System\\\\src\\\\librarydb.db\";\n String myDB = \"jdbc:mysql://localhost:3306/librarydb\";\n con = DriverManager.getConnection(myDB, \"root\", \"\");\n return con;\n\n }",
"DataBase createDataBase();",
"public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void connectToDB() throws Exception\n\t{\n\t\tcloseConnection();\n\t\t\n\t\tcon = Env.getConnectionBradawl();\n\t}",
"private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }",
"public void test() throws SQLException{\n /*try {\n Class.forName(\"org.sqlite.JDBC\");\n //DriverManager.registerDriver(new org.sqlite.JDBC());\n\n String dbURL=\"JDBC:sqlite://data/data/com.example.boris.myandroidapp/databases/myapp\";\n Connection conn=DriverManager.getConnection(dbURL);\n if(conn!=null){\n System.out.println(\"Connected to the database\");\n DatabaseMetaData dm=(DatabaseMetaData)conn.getMetaData();\n System.out.println(\"Driver name: \"+dm.getDriverName());\n System.out.println(\"Driver version: \"+dm.getDriverVersion());\n System.out.println(\"Product name: \"+dm.getDatabaseProductName());\n System.out.println(\"Product version: \"+dm.getDatabaseProductVersion());\n conn.close();\n }\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();}\n catch(SQLException ex){\n ex.printStackTrace();\n }*/\n\n }",
"private DatabaseHandler(){\n createConnection();\n }",
"public void DBConnect() {\n \tdatabase = new DatabaseAccess();\n \tif (database != null) {\n \t\ttry {\n \t\t\tString config = getServletContext().getInitParameter(\"dbConfig\");\n \t\t\tdatabase.GetConnectionProperties(config);\n \t\t\tdatabase.DatabaseConnect();\n \t\t}\n \t\tcatch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}\n }",
"public D4mDbQuerySql(String url, String user, String pword) {\n super();\n try {\n conn = DriverManager.getConnection(url, user, pword);\n } catch (SQLException e) {\n log.warn(\"\",e);\n }\n\n }",
"private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }",
"public void connectToDb(){\n\t log.info(\"Fetching the database name and other details ... \");\n\t dbConnect.setDbName(properties.getProperty(\"dbName\"));\n\t dbConnect.setUsrName(properties.getProperty(\"dbUsrname\"));\n\t dbConnect.setPassword(properties.getProperty(\"dbPassword\"));\n\t dbConnect.setSQLType(properties.getProperty(\"sqlServer\").toLowerCase());\n\t log.info(\"Trying to connect to the database \"+dbConnect.getDbName()+\" ...\\n with user name \"+dbConnect.getUsrname()+\" and password ****** \");\n\t dbConnect.connectToDataBase(dbConnect.getSQLType(), dbConnect.getDbName(), dbConnect.getUsrname(), dbConnect.getPswd());\n\t log.info(\"Successfully connected to the database \"+dbConnect.getDbName());\n }",
"private void updateDB() {\n }",
"private void openConnection() {\n try {\n dbConnection\n = DriverManager.getConnection(url, user, password);\n } catch (SQLException ex) {\n System.err.println(\"Exception in connecting to mysql database\");\n System.err.println(ex.getMessage());\n }\n }",
"public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }",
"private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }",
"public Connection OpenConnection() {\n try {\n //obtenemos el driver para SQLSERVER\n Class.forName(driver);\n //obtenemos la conexion\n con = DriverManager.getConnection(url, user, pass);\n if (con != null) {\n System.out.println(\"OK base de datos \" + bd + \" listo\");\n }\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n }\n return con;\n }",
"@Override\r\n public Db_db currentDb(){return curDb_;}",
"private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}",
"public abstract void loadFromDatabase();",
"public void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Connection\");\n //characterEncoding=latin1&\n //Class.forName(\"org.apache.derby.jdbc.EmbeddedDriver\");\n //Connection conn = new Connection();\n url += \"?characterEncoding=latin1&useConfigs=maxPerformance&useSSL=false\";\n conn = DriverManager.getConnection(url, userName, password);\n if (conn != null) {\n System.out.println(\"Established connection to \"+url+\" Database\");\n }\n }\n catch(SQLException e) {\n throw new IllegalStateException(\"Cannot connect the database \"+url, e);\n }\n catch(ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"public void PrepararBaseDatos() { \r\n try{ \r\n conexion=DriverManager.getConnection(\"jdbc:ucanaccess://\"+this.NOMBRE_BASE_DE_DATOS,this.USUARIO_BASE_DE_DATOS,this.CLAVE_BASE_DE_DATOS);\r\n \r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al realizar la conexion \"+e);\r\n } \r\n try { \r\n sentencia=conexion.createStatement( \r\n ResultSet.TYPE_SCROLL_INSENSITIVE, \r\n ResultSet.CONCUR_READ_ONLY); \r\n \r\n System.out.println(\"Se ha establecido la conexión correctamente\");\r\n } \r\n catch (Exception e) { \r\n JOptionPane.showMessageDialog(null,\"Error al crear el objeto sentencia \"+e);\r\n } \r\n }",
"private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"private DatabaseAccess(Context context) {\n this.openHelper = new RecipesDatabase(context);\n }",
"Database getDataBase() {\n return database;\n }",
"private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}",
"private DBConnection() \n {\n initConnection();\n }",
"private void createDBConnection() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\n \"jdbc:mysql://10.27.8.144:3306/databasename5\", \"user5\", \"p4ssw0rd\");\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from emp\");\n while (rs.next())\n System.out.println(rs.getInt(1) + \" \" + rs.getString(2) + \" \" + rs.getString(3));\n con.close();\n } catch (Exception e) {\n System.out.println(e);\n }\n }",
"public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }",
"@Override\n protected Void doInBackground(Void... params) {\n try{\n System.setProperty(\"FBAdbLog\", \"true\");\n Class.forName(\"org.firebirdsql.jdbc.FBDriver\");\n String sCon = \"jdbc:firebirdsql:\"+Server+\":C:/\"+Database+\".FDB?encoding=ISO8859_1\";\n if(con == null){\n\n }\n Connection con = DriverManager.getConnection(sCon, \"SYSDBA\", \"masterkey\");\n etatCon = true;\n String sql = \"SELECT * FROM CLIENT\";\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n\n while(rs.next()){\n Log.v(\"TRACKKK\", \"Client : \"+ rs.getString(\"RECORDID\")+ \" \" + rs.getString(\"NAME\") + rs.getString(\"PHONE\") );\n }\n Log.v(\"TRACKKK\", \"==============================================\");\n rs.close();\n\n }\n catch(Exception e){\n Log.e(\"FirebirdExample\", e.getMessage());\n etatCon = false;\n }\n return null;\n }",
"private GestionBD(){\r\n\t\tlineConnection=SingleDBConnection.getConexionBD().conectarBD();\r\n\t}",
"private DatabaseAccess(Context context){\n this.openHelper=new DatabaseOpenHelper(context);\n }",
"private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }",
"private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }",
"public Connection connectToDb() throws Exception\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tString url= \"jdbc:mysql://83.212.122.254:3306/travlos\";\r\n\t\t\tString username=\"travlos\";\r\n\t\t\tString password=\"travlos\";\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"found\");\r\n\t\t\t\r\n\t\t\t\r\n\t\tConnection con=null;\t\r\n\t\t\tcon=DriverManager.getConnection(url, username, password);\r\n\t\t\tStatement statement= con.createStatement();\r\n\t\t\t\r\n\t System.out.println(\"egine syndesh!\");\r\n\t return con;\r\n\t\t\r\n\t\t}\r\n\t\tcatch (SQLException ee)\r\n\t\t{\r\n\t\t\tthrow new RuntimeException(\"cannot connect the database!\", ee);\r\n\t\t}\r\n\t\r\n\t\r\n\t}",
"public void open() throws SQLException {\n\t\t \n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\n\t\t //refreshCompanies();\n\t }",
"void getConnectiondb() throws SQLException, ClassNotFoundException{\n // TODO code application logic here\n \n String user = \"root\";\n String pass = \"test\";\n\n myConn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/aud_jdbms\", user, pass);\n \n\n \n }",
"public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }",
"@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"public void setDatabase(Connection _db);",
"public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}",
"DatabaseConnector getConnector() {return db;}",
"private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}",
"public connect_db() {\n initComponents();\n }",
"private void executeQuery() {\n }",
"private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}",
"public void open(){\n\t\tbdd = maBaseSQLite.getWritableDatabase();\n\t}",
"public Connection connect(){\n try{\n \n Class.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n conn = DriverManager.getConnection(dbUrl, name, pass);\n System.out.println(\"connected\");\n }\n catch(Exception e){\n System.out.println(\"connection problem\");\n }\n return conn;\n }",
"Database createDatabase();",
"public DB getDB() {\n\treturn _db;\n }",
"public void CDatabase()\r\n\t{\n\t\ttry{\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tConnection con=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"12345\");\r\n\t\t\tStatement stmt=con.createStatement();\r\n\t\t\tResultSet rs=stmt.executeQuery(\"select * from StudentsList\");\r\n\t\t\tNames.clear();\r\n\t\t\t//Names1.clear();\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\t\tNames.add(rs.getString(1));\t\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\te.printStackTrace();\t\r\n\t\t\t}\r\n\t}",
"@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }",
"public Connection connect(){\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n System.out.println(\"Berhasil koneksi ke JDBC Driver MySQL\");\n }catch(ClassNotFoundException ex){\n System.out.println(\"Tidak Berhasil Koneksi ke JDBC Driver MySQL\");\n }\n //koneksi ke data base\n try{\n String url=\"jdbc:mysql://localhost:3306/enginemounting\";\n koneksi=DriverManager.getConnection(url,\"root\",\"\");\n System.out.println(\"Berhasil koneksi ke Database\");\n }catch(SQLException e){\n System.out.println(\"Tidak Berhasil Koneksi ke Database\");\n }\n return koneksi;\n}"
]
| [
"0.7537335",
"0.7372528",
"0.73027456",
"0.72373176",
"0.6994434",
"0.6854638",
"0.6820698",
"0.6793964",
"0.67596453",
"0.67401266",
"0.67294997",
"0.6691717",
"0.6670594",
"0.6599488",
"0.65877944",
"0.657187",
"0.6568222",
"0.65593565",
"0.6534975",
"0.65193117",
"0.64630383",
"0.64583707",
"0.6452277",
"0.64456177",
"0.64451617",
"0.6435412",
"0.64329916",
"0.6424156",
"0.6421822",
"0.64156777",
"0.6411624",
"0.64110684",
"0.64085156",
"0.6356029",
"0.6320079",
"0.6304539",
"0.63031477",
"0.62970394",
"0.62911814",
"0.6287218",
"0.62823945",
"0.62807083",
"0.6263933",
"0.6263452",
"0.62576675",
"0.62561846",
"0.62380606",
"0.623782",
"0.6235758",
"0.62264395",
"0.62149304",
"0.621491",
"0.62029713",
"0.6201161",
"0.6200999",
"0.6185718",
"0.6185303",
"0.6181894",
"0.6176119",
"0.6174958",
"0.61746985",
"0.61721915",
"0.6171954",
"0.616704",
"0.6164295",
"0.6162172",
"0.61600906",
"0.61567885",
"0.6153173",
"0.6147333",
"0.61410326",
"0.6136573",
"0.6135291",
"0.61168873",
"0.610408",
"0.609788",
"0.6094158",
"0.6090819",
"0.60796446",
"0.6075414",
"0.6073544",
"0.60731304",
"0.60717183",
"0.6069126",
"0.6065102",
"0.60642284",
"0.60639817",
"0.60624796",
"0.6060172",
"0.60586685",
"0.6054581",
"0.6053793",
"0.60529745",
"0.60499316",
"0.60498405",
"0.6049243",
"0.6048863",
"0.6046093",
"0.6046081",
"0.6041956",
"0.603849"
]
| 0.0 | -1 |
Called when the database is created for the FIRST time. If a database already exists on disk with the same DATABASE_NAME, this method will NOT be called. | @Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(KEY_CREATE_USER_TABLE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dbCreate() {\n Logger.write(\"INFO\", \"DB\", \"Creating database\");\n try {\n if (!Database.DBDirExists())\n Database.createDBDir();\n dbConnect(false);\n for (int i = 0; i < DBStrings.createDB.length; i++)\n execute(DBStrings.createDB[i]);\n } catch (Exception e) {\n Logger.write(\"FATAL\", \"DB\", \"Failed to create databse: \" + e);\n }\n }",
"private static void initializeDatabase()\n\t{\n\t\tResultSet resultSet = dbConnect.getMetaData().getCatalogs();\n\t\tStatment statement = dbConnect.createStatement();\n\t\t\n\t\tif (resultSet.next())\n\t\t{\n\t\t\tstatement.execute(\"USE \" + resultSet.getString(1));\n\t\t\tstatement.close();\n\t\t\tresultSet.close();\n\t\t\treturn; //A database exists already\n\t\t}\n\t\tresultSet.close();\n\t\t//No database exists yet, create it.\n\t\t\n\t\tstatement.execute(\"CREATE DATABASE \" + dbName);\n\t\tstatement.execute(\"USE \" + dbName);\n\t\tstatement.execute(createTableStatement);\n\t\tstatement.close();\n\t\treturn;\n\t}",
"private void initialize() {\n if (databaseExists()) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n int dbVersion = prefs.getInt(SP_KEY_DB_VER, 1);\n if (DATABASE_VERSION != dbVersion) {\n File dbFile = mContext.getDatabasePath(DBNAME);\n if (!dbFile.delete()) {\n Log.w(TAG, \"Unable to update database\");\n }\n }\n }\n if (!databaseExists()) {\n createDatabase();\n }\n }",
"public void dbCreate() throws IOException\n {\n boolean dbExist = dbCheck();\n\n if(!dbExist)\n {\n //By calling this method an empty database will be created into the default system patt\n //of the application so we can overwrite that db with our db.\n this.getReadableDatabase(); // create a new empty database in the correct path\n try\n {\n //copy the data from the database in the Assets folder to the new empty database\n copyDBFromAssets();\n }\n catch(IOException e)\n {\n throw new Error(\"Error copying database\");\n }\n }\n }",
"public void createDatabase() throws IOException {\n boolean dbExists = checkDatabase();\n\n if (dbExists) {\n // Do nothing - database already exists\n } else {\n // By calling this method an empty database will be created into the\n // default system path of our application so we are going to be able\n // to overwrite the database with our database.\n this.getReadableDatabase();\n\n try {\n copyDatabase();\n } catch (IOException e) {\n throw new Error(\"Error copying database\");\n }\n }\n }",
"private void createDatabase() throws SQLException\r\n {\r\n myStmt.executeUpdate(\"create database \" + dbname);\r\n }",
"public void createDatabase() throws IOException{\r\n\r\n boolean dbDoesExist = checkDatabase();\r\n if(!dbDoesExist)\r\n {\r\n // Create or open db if db is not connected\r\n this.getReadableDatabase();\r\n try{\r\n createNewDB();\r\n }catch (IOException e){\r\n throw new Error(\"DB Copy Failed\");\r\n }\r\n }\r\n }",
"public void createNewDB(String DB_Name) {\n //SQL statement\n String query = \"CREATE database if NOT EXISTS \" + DB_Name;\n\n try {\n //Connection\n stmt = con.createStatement();\n //Execute statement\n stmt.executeUpdate(query);\n System.out.println(\"\\n--Database \" + DB_Name + \" created--\");\n } catch (SQLException ex) {\n //Handle SQL exceptions\n System.out.println(\"\\n--Statement did not execute--\");\n ex.printStackTrace();\n }\n }",
"@Override\n public boolean onCreate() {\n Log.e(TAG,\"onCreate\");\n DatabaseHelper.createDatabase(getContext(), new AppDb());\n return true;\n }",
"public void createDataBase() throws IOException{\n \n \tboolean dbExist = checkDataBase();\n \t\n \n \tif(dbExist){\n \t\t//do nothing - database already exists\n \t\tLog.d(\"Database Check\", \"Database Exists\");\n\n \t}else{\n \t\tLog.d(\"Database Check\", \"Database Doesn't Exist\");\n \t\tthis.close();\n \t\t//By calling this method and empty database will be created into the default system path\n //of your application so we are gonna be able to overwrite that database with our database.\n \tthis.getReadableDatabase();\n \tthis.close();\n \ttry {\n \t\t\tcopyDataBase();\n \t\t\tLog.d(\"Database Check\", \"Database Copied\");\n \n \t\t} catch (IOException e) {\n \t\tLog.d(\"I/O Error\", e.toString());\n\n \t\tthrow new Error(\"Error copying database\");\n \t}\n \tcatch (Exception e) { \n \t\tLog.d(\"Exception in createDatabase\", e.toString());\n \t\t\n \t}\n \t}\n \n }",
"public static void createDatabase() throws SQLException {\n\t\tSystem.out.println(\"DROP database IF EXISTS project02;\");\n\t\tstatement = connection.prepareStatement(\"DROP database IF EXISTS project02;\");\n\t\tstatement.executeUpdate();\n\t\tSystem.out.println(\"CREATE database project02;\");\n\t\tstatement = connection.prepareStatement(\"CREATE database project02;\");\n\t\tstatement.executeUpdate();\n\t\tSystem.out.println(\"USE project02;\");\n\t\tstatement = connection.prepareStatement(\"USE project02;\");\n\t\tstatement.executeUpdate();\n\t}",
"public void createDataBase() throws IOException {\n\n boolean dbExist = checkDataBase();\n\n if(dbExist){\n //do nothing - database already exist\n }else{\n\n //By calling this method and empty database will be created into the default system path\n //of your application so we are gonna be able to overwrite that database with our database.\n this.getReadableDatabase();\n\n try {\n\n copyDataBase();\n\n } catch (IOException e) {\n\n throw new Error(\"Error copying database\");\n\n }\n }\n\n }",
"public void createDataBase() throws IOException {\n\n boolean dbExist = checkDataBase();\n\n if(dbExist){\n //do nothing - database already exist\n }else{\n\n //By calling this method and empty database will be created into the default system path\n //of your application so we are gonna be able to overwrite that database with our database.\n this.getReadableDatabase();\n\n try {\n\n copyDataBase();\n\n } catch (IOException e) {\n\n throw new Error(\"Error copying database\");\n\n }\n }\n\n }",
"void createDatabaseOnDevice() throws IOException {\n boolean databaseExists = checkIfDatabaseOnDevice();\n\n if (!databaseExists) {\n this.getReadableDatabase();\n\n try {\n copyDatabaseToDevice();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"private void createDatabase() {\n String parentPath = mContext.getDatabasePath(DBNAME).getParent();\n String path = mContext.getDatabasePath(DBNAME).getPath();\n\n File file = new File(parentPath);\n if (!file.exists()) {\n if (!file.mkdir()) {\n Log.w(TAG, \"Unable to create database directory\");\n return;\n }\n }\n\n InputStream is = null;\n OutputStream os = null;\n try {\n is = mContext.getAssets().open(DBNAME);\n os = new FileOutputStream(path);\n\n byte[] buffer = new byte[1024];\n int length;\n while ((length = is.read(buffer)) > 0) {\n os.write(buffer, 0, length);\n }\n os.flush();\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(mContext);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(SP_KEY_DB_VER, DATABASE_VERSION);\n editor.commit();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private void setupDatabase() {\r\n\t\tDatabaseHelperFactory.init(this);\r\n\t\tdatabase = DatabaseHelperFactory.getInstance();\r\n\t}",
"public void createDatabase(String databaseName)\n\t{\n\t\tclearConnection();\n\t\ttry\n\t\t{\n\t\t\tStatement createDatabaseStatement = databaseConnection.createStatement();\n\t\t\t\n\t\t\tint result = createDatabaseStatement.executeUpdate(\"CREATE DATABASE IF NOT EXISTS \" + databaseName + \";\");\n\t\t}\n\t\tcatch (SQLException currentSQLError)\n\t\t{\n\t\t\tdisplaySQLErrors(currentSQLError);\n\t\t}\n\t}",
"@Override\n public void onCreate(SQLiteDatabase database) {\n database.execSQL(DATABASE_CREATE);\n }",
"@Override\n public void onCreate(SQLiteDatabase database) {\n database.execSQL(DATABASE_CREATE);\n }",
"@Override\n public void onCreate(SQLiteDatabase _db) {\n _db.execSQL(DATABASE_CREATE);\n }",
"public void createDatabase() throws IOException {\n boolean dbExist = checkDataBase();\n// if(dbExist) {\n// Log.d(\"E\", \"Database exists.\");\n// try {\n// copyDataBase();\n// } catch (IOException e) {\n// Log.e(\"Error\", e.getMessage());\n// }\n// } else {\n// try {\n// copyDataBase();\n// } catch (IOException e) {\n// Log.e(\"Error1\", e.getMessage());\n// }\n// }\n\n if (!dbExist) {\n this.getReadableDatabase();\n this.close();\n try {\n //Copy the database from assests\n copyDataBase();\n Log.e(TAG, \"createDatabase database created\");\n } catch (IOException mIOException) {\n throw new Error(\"ErrorCopyingDataBase\");\n }\n }\n\n }",
"@Override\n\tpublic void onCreate(SQLiteDatabase database) {\n\t\tAppDBTableCreation.onCreate(database);\n\t}",
"private void createDatabase() throws Exception{\n Statement stm = this.con.createStatement();\n stm.execute(\"CREATE DATABASE IF NOT EXISTS \" + database +\n \" DEFAULT CHARACTER SET utf8 COLLATE utf8_persian_ci\");\n }",
"public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(uniqueID != 0) {\n uniqueID++;\n databaseStatement.executeQuery(\"CREATE DATABASE OSM\"+uniqueID+\";\");\n }\n }",
"@Override\n\t\tpublic void onCreate(SQLiteDatabase database) {\n\t\t\tcreateTable(database);\n\n\t\t}",
"@Override\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n String sql = \"drop table \" + MelodyData.CreateDB._TABLENAME;\n sqLiteDatabase.execSQL(AccompanimentData.CreateDB._CREATE);\n sqLiteDatabase.execSQL(MelodyData.CreateDB._CREATE);\n }",
"@Override\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(DATABASE_CREATE);\n }",
"public void createDatabase(String sDBName) throws SQLException{\n\t\tloadDriver();\n\t\tConnection conn = DriverManager.getConnection(protocol + dbName\n + \";create=true\", new Properties());\n\t\tcloseJDBCResources(conn);\t\t\n\t}",
"@Override\n public void onCreate(SQLiteDatabase database) {\n database.execSQL(DATABASE_CREATE);\n Log.i(TAG, \"onCreate()\");\n }",
"Database createDatabase();",
"public synchronized void createIfNotExists(SQLiteDatabase db) {\n db.execSQL(SQL_CREATE_DATASOURCE);\n }",
"@Override\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(DATABASE_CREATE);\n }",
"@Override\n public void onCreate(SQLiteDatabase db) throws SQLException {\n db.execSQL(DATABASE_CREATE);\n //Log.d(\"OnCreate\",\"Database on create method\");\n }",
"@Override\n //\n public void onCreate(SQLiteDatabase db)\n {\n db.execSQL(DATABASE_CREATE);\n }",
"public void initializeDataBase() {\r\n\r\n\r\n\r\n\t\tgetWritableDatabase();\r\n\t\tLog.e(\"DBHelper initializeDataBase \", \"Entered\");\r\n\t\tcreateDatabase = true;\r\n\t\tif (createDatabase) {\r\n\t\t\tLog.e(\"DBHelper createDatabase \", \"true\");\r\n\t\t\t/*\r\n\t\t\t * If the database is created by the copy method, then the creation\r\n\t\t\t * code needs to go here. This method consists of copying the new\r\n\t\t\t * database from assets into internal storage and then caching it.\r\n\t\t\t */\r\n\t\t\ttry {\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t} \r\n\t\telse if (upgradeDatabase) \r\n\t\t{\r\n\t\t\tLog.e(\"DBHelper upgradeDatabase \", \"true\");\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\t * Write over the empty data that was created in internal\r\n\t\t\t\t * storage with the one in assets and then cache it.\r\n\t\t\t\t */\r\n\t\t\t\tcopyStream(DB_PATH_IN, new FileOutputStream(DB_PATH));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tthrow new Error(\"Error copying database\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tLog.e(\"DBHelper clear \", \"true\");\r\n\t}",
"@Override\n public Database getInitialized() {\n return Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseReady);\n }",
"@Override\n public void onCreate(final ODatabaseInternal iDatabase) {\n if (iDatabase.getName().equalsIgnoreCase(OSystemDatabase.SYSTEM_DB_NAME)) return;\n\n final OAuditingHook hook = defaultHook(iDatabase);\n hooks.put(iDatabase.getName(), hook);\n iDatabase.registerHook(hook);\n iDatabase.registerListener(hook);\n }",
"public void createDataBase() throws IOException {\n boolean dbExist = checkDataBase();\n\n if (dbExist) {\n\n } else {\n this.getReadableDatabase();\n try {\n copyDataBase();\n } catch (IOException e) {\n Log.e(\"tle99 - create\", e.getMessage());\n }\n }\n }",
"@Override\n public void onCreate( SQLiteDatabase db) {\n try {Log.i(\"55555555\",\"ONCreat\");\n db.execSQL(DATABASE_CREATE);\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n }\n }",
"protected void setupDB() {\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database started\");\n\t\tlog.info(\"ddl: db-config.xml\");\n\t\tlog.info(\"------------------------------------------\");\n\t\ttry {\n\t\t\tfinal List<String> lines = Files.readAllLines(Paths.get(this.getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getClassLoader()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getResource(\"create-campina-schema.sql\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toURI()), Charset.forName(\"UTF-8\"));\n\n\t\t\tfinal List<String> statements = new ArrayList<>(lines.size());\n\t\t\tString statement = \"\";\n\t\t\tfor (String string : lines) {\n\t\t\t\tstatement += \" \" + string;\n\t\t\t\tif (string.endsWith(\";\")) {\n\t\t\t\t\tstatements.add(statement);\n\t\t\t\t\tstatement = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry (final Connection con = conManager.getConnection(Boolean.FALSE)) {\n\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(\"DROP SCHEMA IF EXISTS campina\")) {\n\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t}\n\t\t\t\tfor (String string : statements) {\n\t\t\t\t\tlog.info(\"Executing ddl: \" + string);\n\t\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(string)) {\n\t\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new IllegalStateException(\"Could not setup db\", e);\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Could not setup database\", e);\n\t\t\tthrow new IllegalStateException(\"ddl file load failed\", e);\n\t\t}\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database finished\");\n\t\tlog.info(\"------------------------------------------\");\n\t}",
"@Override\n public void onDbStarted() {\n }",
"public void createDatabase(String dbName, String owner) throws Exception;",
"private static void doCreate(SQLiteDatabase db) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"*** execute doCreate\");\r\n final Version version = new Version(VERSION_1, Names.GHOST_SMS, DateTimeUtils.currentDateWithoutSeconds());\r\n Versions.insert(db, version);\r\n doUpgrade(db, version.version);\r\n }",
"public boolean databaseExists() {\n return defaultDatabaseExists();\n }",
"@Override\n\tpublic void onCreate(SQLiteDatabase database) {\n\t\tcreateTables(database);\n\t}",
"public boolean initializeDB() {\n return false;\n }",
"@Override\n public Database getAndInitialize() throws IOException {\n Database database = Databases.createPostgresDatabaseWithRetry(\n username,\n password,\n connectionString,\n isDatabaseConnected(databaseName));\n\n new ExceptionWrappingDatabase(database).transaction(ctx -> {\n boolean hasTables = tableNames.stream().allMatch(tableName -> hasTable(ctx, tableName));\n if (hasTables) {\n LOGGER.info(\"The {} database has been initialized\", databaseName);\n return null;\n }\n LOGGER.info(\"The {} database has not been initialized; initializing it with schema: {}\", databaseName, initialSchema);\n ctx.execute(initialSchema);\n return null;\n });\n\n return database;\n }",
"public boolean databaseExists() {\n\t\treturn defaultDatabaseExists();\n\t}",
"@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tLog.v(\"open onCreate\", \"Creating all the tables\");\n\n\t\ttry {\n\t\t\n\t\t\tdb.execSQL(CREATE_TABLE1);\n\t\t} catch (SQLiteException ex) {\n\t\t\tLog.v(\"open exception caught\", ex.getMessage());\n\n\t\t}\n\t}",
"public static void createDB(String name) {\n\t\ttry {\n\t\t\tString Query = \"CREATE DATABASE \" + name;\n\t\t\tStatement st = conexion.createStatement();\n\t\t\tst.executeUpdate(Query);\n\t\t\tSystem.out.println(\"DB creada con exito!\");\n\n\t\t\tJOptionPane.showMessageDialog(null, \"Se ha creado la DB \" + name + \"de forma exitosa.\");\n\t\t} catch (SQLException ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tSystem.out.println(\"Error creando la DB.\");\n\t\t}\n\t}",
"public void setCheckDatabaseExistence(boolean checkDatabaseExistence) {\n this.checkDatabaseExistence = checkDatabaseExistence;\n }",
"public static void createDatabase() throws ArcException {\n\t\tcreateDatabase(userWithRestrictedRights);\t\t\n\t}",
"@Override\n public boolean onCreate() {\n myDB = new MyDBHandler(getContext(), null, null, 1);\n return false;\n }",
"public void createNewDataBase() {\n try (Connection conn = DriverManager.getConnection(url)) {\n if (conn != null) {\n DatabaseMetaData meta = conn.getMetaData();\n createNewTable();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"void createDb(String dbName);",
"public void onCreate(SQLiteDatabase db) {\n Cursor cursor = db.rawQuery(\n \"SELECT name FROM sqlite_master \" +\n \"WHERE type='table' AND name='\" +\n SymptomCheckinTable.TABLE_NAME + \"' \", null);\n try {\n if (cursor.getCount()==0) {\n db.execSQL(SymptomCheckinTable.DATABASE_CREATE);\n db.execSQL(MedicationIntakeTable.DATABASE_CREATE);\n }\n }\n finally {\n cursor.close();\n }\n }",
"@Override\n public void onCreate(SQLiteDatabase db) {\n executeSQLScript(db, \"sql/cstigo_v\" + DATABASE_VERSION + \".sql\");\n }",
"private void createDataBase() throws IOException {\n\n boolean dbExist = checkDataBase();\n\n if (dbExist) {\n // do nothing - database already exist\n Log.d(\"DATABASE\",\"Database Exit Already.\");\n\n } else {\n\n // Create Folder\n String newFolder = \"/games\";\n String extStorageDirectory = Environment.getExternalStorageDirectory().toString();\n File myNewFolder = new File(extStorageDirectory + newFolder);\n myNewFolder.mkdir();\n\n // Create Folder\n// newFolder = \"/FishRisk/Game\";\n// extStorageDirectory = Environment.getExternalStorageDirectory().toString();\n// myNewFolder = new File(extStorageDirectory + newFolder);\n// myNewFolder.mkdir();\n\n // Create Folder\n newFolder = \"/games/Report\";\n extStorageDirectory = Environment.getExternalStorageDirectory().toString();\n myNewFolder = new File(extStorageDirectory + newFolder);\n myNewFolder.mkdir();\n\n // Create Folder\n newFolder = \"/games/Config\";\n extStorageDirectory = Environment.getExternalStorageDirectory().toString();\n myNewFolder = new File(extStorageDirectory + newFolder);\n myNewFolder.mkdir();\n\n //copyConfigFile();\n\n // By calling this method an empty database will be created into\n // the default system path\n // of your application so we are gonna be able to overwrite that\n // database with our database.\n this.getReadableDatabase();\n\n try {\n copyDataBase();\n copyConfigFile();\n } catch (IOException e) {\n\n throw new Error(\"Error copying database\");\n }\n }\n }",
"public void createNewDatabase(String dbName) {\r\n\t\t// connects to given database - relative path points to inside project folder\r\n\t\ttry {\r\n\t\t\tConnection conn = this.connect(dbName);\t\t\t\t\t\t// open connection\r\n\t\t\tif (conn != null) {\r\n\t\t\t\tDatabaseMetaData meta = conn.getMetaData();\r\n\t\t\t\tSystem.out.println(\"The driver name is \" + meta.getDriverName());\r\n\t\t\t\tSystem.out.println(\"A new database has been created.\");\r\n\t\t\t}\r\n\t\t\tconn.close(); \t\t\t\t\t\t\t\t\t\t\t\t// close connection\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"private boolean initDB() {\n\t\tDataBaseHelper myDbHelper = new DataBaseHelper(this);\n\t\tif (!myDbHelper.checkDataBase()) {\n\t\t\tmyDbHelper.dbDelete();\n\t\t\tdownloadDB();\n\t\t\treturn false;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tif (!myDbHelper.openDataBase()) {\n\t\t\t\t\tLog.e(TAG, \"Unable to open database\");\n\t\t\t\t\tstopService();\n\t\t\t\t\tmyDbHelper.dbDelete();\n\t\t\t\t\tdownloadDB();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Unable to open database\", e);\n\t\t\t\tstopService();\n\t\t\t\tmyDbHelper.dbDelete();\n\t\t\t\tdownloadDB();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tstartSync();\n\t\t\t\treturn initUI();\n\t\t\t} catch (Exception ioe) {\n\t\t\t\tLog.e(TAG, \"Unable to launch activity\");\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\t}",
"private void initDb() {\n\t\tif (dbHelper == null) {\n\t\t\tdbHelper = new DatabaseOpenHelper(this);\n\t\t}\n\t\tif (dbAccess == null) {\n\t\t\tdbAccess = new DatabaseAccess(dbHelper.getWritableDatabase());\n\t\t}\n\t}",
"public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void initDb() {\n String createVac = \"create table if not exists vacancies(id serial primary key,\"\n + \"name varchar(1500) NOT NULL UNIQUE, url varchar (1500), description text, dateVac timestamp);\";\n try (Statement st = connection.createStatement()) {\n st.execute(createVac);\n } catch (SQLException e) {\n LOG.error(e.getMessage());\n }\n }",
"public Database()\r\n\t{\r\n\t\tinitializeDatabase();\r\n\t\t\r\n\t}",
"@Override\n public boolean onCreate() {\n myDB = new DBHelperActivity(getContext(), null, null, 1);\n return false;\n }",
"public void setupDB()\r\n\t{\n\tjdbcTemplateObject.execute(\"DROP TABLE IF EXISTS employee1 \");\r\n\r\n\tjdbcTemplateObject.\r\n\texecute(\"CREATE TABLE employee1\"\r\n\t+ \"(\" + \"name VARCHAR(255), id SERIAL)\");\r\n\t}",
"@Override\n\t\tpublic void onCreate(SQLiteDatabase db) {\n\t\t\ttry {\n\t\t\t\tdb.execSQL(TABLE_CREATE);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t\n\t\t\t}\n\t\t}",
"@Override\n\t\tpublic void onCreate(SQLiteDatabase db) {\n\t\t\tdb.execSQL(DATABASE_CHECKLISTITEM_CREATE);\n\t\t\tdb.execSQL(DATABASE_MEDIAITEM_CREATE);\n\t\t\tdb.execSQL(DATABASE_POLLINGPLACE_CREATE);\n\t\t}",
"private boolean createDatabase(CreateDatabaseStatement cds) {\n\t\tif(dbs.containsKey(cds.dbname)) {\n\t\t\tSystem.out.println(\"Error: Can't create database \" + cds.dbname + \"; database exists\");\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tDatabase newdb = new Database();\n\t\t\tdbs.put(cds.dbname, newdb);\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t}",
"@Before\n public void createDatabase() {\n dbService.getDdlInitializer()\n .initDB();\n kicCrud = new KicCrud();\n }",
"private void configureDB() {\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t}",
"public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}",
"@Override\n public boolean onCreate() {\n\n // password helper that uses Android shared preferences\n passwordHelper = new SharedPreferencesPasswordHelper();\n\n // Creates a new database helper object.\n // Note: database itself isn't opened until something tries to access it,\n // and it's only created if it doesn't already exist.\n databaseHelper = new DatabaseHelper(getContext());\n\n try {\n SQLiteDatabase.loadLibs(getContext());\n } catch (Exception e) {\n Log.e(DATABASE_NAME, e.getMessage(), e);\n }\n return true;\n }",
"@Override\n public void onCreate(SQLiteDatabase db) {\n try {\n db.execSQL(BD_CREATE);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Before\n public void initDb() {\n mDatabase = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(),\n ToDoDatabase.class).build();\n }",
"private void createNewDatabase() throws ConnectException {\n try (Connection sqlConnection = connect()) {\n if (sqlConnection != null) {\n sqlConnection.getMetaData();\n sqlConnection.close();\n }\n\n } catch (SQLException e) {\n LOGGER.error(\"Error when trying to create new database: {}\\n{}\", e.getMessage(), e);\n }\n }",
"public void createDB(String filename) throws SQLException {\n //System.out.printf(\"Connecting to the database %s.%n\", filename);\n /* \n * Connect to the database (file). If the file does not exist, create it.\n */\n Connection db_connection = DriverManager.getConnection(SQLITEDBPATH + filename);\n this.createTables(db_connection);\n this.initTableCities(db_connection);\n this.initTableTeams(db_connection);\n //System.out.printf(\"Connection to the database has been established.%n\");\n db_connection.close();\n //System.out.printf(\"Connection to the database has been closed.%n\");\n }",
"public MongoDatabase createDatabase(MongoClient mongoClient) {\n\t\ttry {\n\t \tmongoClient.dropDatabase(GenericConstants.dbName);\n\t }catch(Exception e){}\n\t MongoDatabase database = mongoClient.getDatabase(GenericConstants.dbName);\n\t\tSystem.out.println(\"Connected to the database successfully\");\n\t return database;\n\t}",
"private DBMaster() {\r\n\t\t//The current address is localhost - needs to be changed at a later date\r\n\t\t_db = new GraphDatabaseFactory().newEmbeddedDatabase(\"\\\\etc\\\\neo4j\\\\default.graphdb\");\r\n\t\tregisterShutdownHook();\r\n\t}",
"@Override\r\n public boolean onCreate(){\n db = new DatabaseHelper(getContext()).getWritableDatabase();\r\n return true;\r\n }",
"private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }",
"@Override\n public void onCreate(SQLiteDatabase database) {\n ShoulderWatchTable.onCreate(database);\n }",
"public void creatDataBase(String dbName);",
"private void initDB() {\n dataBaseHelper = new DataBaseHelper(this);\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}",
"@Override\n\tpublic Database createDatabase(Type type) throws FSException {\n\t\treturn new DummyDatabase();\n\t}",
"@Override\n\tpublic void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {\n\t\ttry {\n\t\t\tLog.i(DatabaseHelper.class.getName(), \"onCreate\");\n\t\t\tTableUtils.createTable(connectionSource, Place.class);\n\t\t\tTableUtils.createTable(connectionSource, Lock.class);\n\t\t\tTableUtils.createTable(connectionSource, User.class);\n\t\t\tTableUtils.createTable(connectionSource, Locator.class);\n\t\t} catch (SQLException e) {\n\t\t\tLog.e(DatabaseHelper.class.getName(), \"Can't create database\", e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public void initEDBConnection(String name) throws SQLException {\n String dbName = buildDBName(name);\n cache = new CacheManager<>(1024);\n File f = new File(dbName);\n\n if (!f.exists())\n createDB(dbName);\n else if(!f.isDirectory())\n createDB(dbName);\n else\n connectDB(dbName);\n\n refreshCurrentAccountId();\n refreshCurrentOperationId();\n }",
"private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }",
"private void createDatabase(final String databaseName) {\n\n try {\n final Connection connection =\n DriverManager.getConnection(url + databaseName, databaseProperties);\n\n try {\n NaviLogger.info(\"[i] Generating database tables for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_schema.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final File testDataDir = new File(\n \"./third_party/zynamics/javatests/com/google/security/zynamics/binnavi/testdata/\"\n + databaseName + \"/\");\n\n final CopyManager manager = new CopyManager((BaseConnection) connection);\n\n for (final File currentFile : testDataDir.listFiles()) {\n try (FileReader reader = new FileReader(currentFile)) {\n final String tableName = currentFile.getName().split(\".sql\")[0];\n NaviLogger.info(\"[i] Importing: %s.%s from %s\", databaseName, tableName,\n currentFile.getAbsolutePath());\n manager.copyIn(\"COPY \" + tableName + \" FROM STDIN\", reader);\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n }\n\n try {\n NaviLogger.warning(\"[i] Generating constraints for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_constraints.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final String findSequencesQuery = \"SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| \"\n + \"', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' \"\n + \" FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C \"\n + \" WHERE S.relkind = 'S' AND S.oid = D.objid AND D.refobjid = T.oid \"\n + \" AND D.refobjid = C.attrelid AND D.refobjsubid = C.attnum ORDER BY S.relname; \";\n\n try (PreparedStatement statement = connection.prepareStatement(findSequencesQuery);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n final PreparedStatement fixSequence = connection.prepareStatement(resultSet.getString(1));\n fixSequence.execute();\n }\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n }",
"@Override\n public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) {\n\n try {\n TableUtils.createTableIfNotExists(connectionSource, MessageBoard.class);\n TableUtils.createTableIfNotExists(connectionSource, User.class);\n TableUtils.createTableIfNotExists(connectionSource, ChatServerBean.class);\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public boolean checkIfDatabaseExists() {\r\n return database.exists();\r\n }",
"public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }",
"@Override\n\tpublic boolean onCreate() {\n\t\tmOpenHelper = new myDbHelper(getContext(), DBNAME, null, 1);\n\t\treturn (mOpenHelper == null) ? false : true;\n\t}",
"public static void createNewDatabaseFile(String startPath)\r\n throws ConnectionFailedException, DatabaseException {\r\n boolean databaseCreated;\r\n try {\r\n databaseCreated = database.createNewFile();\r\n if (!databaseCreated) {\r\n throw new IOException(\"Cannot create file\");\r\n }\r\n\r\n URL databaseResource = Objects.requireNonNull(Paths.get(\r\n startPath + \"resources/database/database.sql\").toUri().toURL());\r\n String decodedPath = URLDecoder.decode(databaseResource.getPath(), \"UTF-8\");\r\n\r\n try (BufferedReader in = new BufferedReader(new FileReader(decodedPath))) {\r\n StringBuilder sqlQuery = new StringBuilder();\r\n while (in.ready()) {\r\n sqlQuery.append(in.readLine());\r\n if (sqlQuery.toString().endsWith(\";\")) {\r\n createBasicSqlTable(sqlQuery.toString());\r\n sqlQuery = new StringBuilder();\r\n }\r\n }\r\n }\r\n } catch (IOException e) {\r\n throwException(e);\r\n }\r\n }",
"public static void createDatabaseIfNotExists() throws DaoException {\n\n Path data = Paths.get(DATA_DIR);\n if (!Files.exists(data)) {\n try {\n Files.createDirectory(data);\n Files.createDirectory(Paths.get(DATA_DIR, ACCOUNT_DATA_DIR));\n } catch (IOException ex) {\n throw new DaoException(\"Could not create data directory\", ex);\n }\n }\n\n }",
"@Override\r\n\tpublic Database getDefaultDatabase() {\r\n\t\treturn databases.getDatabase( \"default\" );\r\n\t}",
"public void initDatabase() {\n Datastore mongoDataStore = DatabaseHandler.getInstance().getMongoDataStore();\n initUsers();\n initAccounts();\n mongoDataStore.save(users);\n }",
"public void setAutoCreateDatabase(boolean autoCreateDatabase) {\n this.autoCreateDatabase = autoCreateDatabase;\n }",
"@Override\r\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tFormDAO.createTable(db);\r\n//\t\tCreate table ENumber\r\n\t\tENumberDAO.createTable(db);\r\n\t\t\r\n\r\n\t}",
"private void checkDB() {\n\t\tif (couchDB_ip == null) {\n\t\t\tsetCouchDB_ip();\n\t\t}\n\n\t\tif (!databaseExist) {\n\n\t\t\tsynchronized (databaseExist) {\n\n\t\t\t\tif (!databaseExist) {\n\n\t\t\t\t\tif (couchDB_USERNAME != null\n\t\t\t\t\t\t\t&& !couchDB_USERNAME.trim().isEmpty()\n\t\t\t\t\t\t\t&& couchDB_PASSWORD != null\n\t\t\t\t\t\t\t&& !couchDB_PASSWORD.trim().isEmpty()) {\n\t\t\t\t\t\tUsernamePasswordCredentials creds = new UsernamePasswordCredentials(\n\t\t\t\t\t\t\t\tcouchDB_USERNAME, couchDB_PASSWORD);\n\t\t\t\t\t\tauthentication = BasicScheme.authenticate(creds,\n\t\t\t\t\t\t\t\t\"US-ASCII\", false).toString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (CouchDBUtil.checkDB(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\tauthentication)) {\n\n\t\t\t\t\t\t\tdatabaseExist = true;\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tCouchDBUtil.createDb(getCouchDB_ip(), couchDB_NAME,\n\t\t\t\t\t\t\t\t\tauthentication);\n\t\t\t\t\t\t\tdatabaseExist = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t\tlogger.info(\"Impossible to access CouchDB\", e);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.73322296",
"0.73086715",
"0.7205008",
"0.7053697",
"0.7039152",
"0.6921914",
"0.68765765",
"0.6818082",
"0.6754678",
"0.6742818",
"0.6720616",
"0.6713481",
"0.6713481",
"0.6707026",
"0.6706885",
"0.6692763",
"0.6659863",
"0.6622707",
"0.6622707",
"0.66212875",
"0.65816516",
"0.6573375",
"0.6560968",
"0.6553523",
"0.6551506",
"0.6531996",
"0.6529037",
"0.6524976",
"0.6489146",
"0.64842474",
"0.6479674",
"0.64727086",
"0.64725107",
"0.6449746",
"0.64273715",
"0.64144266",
"0.64027256",
"0.63966066",
"0.63479245",
"0.63251495",
"0.6316241",
"0.6299955",
"0.6299524",
"0.62900984",
"0.6283065",
"0.6279806",
"0.6268226",
"0.6261116",
"0.6220802",
"0.6218364",
"0.61854684",
"0.6180603",
"0.61769265",
"0.61613137",
"0.6145344",
"0.6128462",
"0.6126621",
"0.61214006",
"0.61042243",
"0.60739857",
"0.6059815",
"0.6055218",
"0.60380995",
"0.6030493",
"0.60289294",
"0.60282815",
"0.60258317",
"0.60224533",
"0.602122",
"0.6019731",
"0.6009684",
"0.60055363",
"0.59993774",
"0.59925616",
"0.59891105",
"0.5988681",
"0.5986808",
"0.59808016",
"0.5976254",
"0.59759617",
"0.59654206",
"0.5961223",
"0.5938758",
"0.5936955",
"0.593059",
"0.5926946",
"0.59202373",
"0.59104687",
"0.59060085",
"0.5905153",
"0.5894317",
"0.58932364",
"0.58837223",
"0.5882705",
"0.588125",
"0.587927",
"0.5876386",
"0.5873182",
"0.5872135",
"0.58668804",
"0.58668524"
]
| 0.0 | -1 |
because email id unique, so we user email to get userAccount | @Nullable
public User getUserFromDatabase(String email) {
User userAccount = null;
try {
SQLiteDatabase db = getReadableDatabase();
Cursor userAccountCursor = db.query(
TABLE_USERS,
new String[]{KEY_USER_NAME, KEY_USER_EMAIL, KEY_USER_PASS, KEY_USER_PROFILE_PICTURE_URL, KEY_USER_HAS_POST_TABLE},
KEY_USER_EMAIL + " = ?",
new String[]{email},
null,
null,
null
);
if (userAccountCursor != null && userAccountCursor.getCount() > 0 && userAccountCursor.moveToFirst()) {
userAccount = new User(
userAccountCursor.getString(0),
userAccountCursor.getString(1),
userAccountCursor.getString(2),
userAccountCursor.getInt(3),
userAccountCursor.getInt(4)
);
}
if (userAccountCursor != null) {
userAccountCursor.close();
}
} catch (SQLiteException e) {
Log.d(TAG, "Can get user account");
}
return userAccount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User getUser(String emailId);",
"private static void lookupAccount(String email) {\n\t\t\n\t}",
"UserAccount getUserAccountById(long id);",
"@Override\r\n\tpublic AccountDTO getAccount(String email) {\n\t\treturn accountDao.getAccount(email);\r\n\t}",
"User getUserByEmail(String email);",
"User getUserByEmail(final String email);",
"public String getEmailAccount() {\n return emailAccount;\n }",
"public User get(String emailID);",
"public User getUser(String email);",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"java.lang.String getUserEmail();",
"@Override\n\tpublic IUserAccount getByEMail(String eMail) {\n\t\treturn null;\n\t}",
"@Override\n public String getUserId() {\n return email;\n }",
"ServiceUserEntity getUserByEmail(String email);",
"public User retrieveUserByEmail(String email) throws ApplicationException;",
"@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }",
"public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }",
"Account findByEmail(String email);",
"@Override\n\tpublic OrderBean getUser(String email) {\n\t\treturn null;\n\t}",
"User findUserByEmail(String email) throws Exception;",
"Account getAccount();",
"@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}",
"@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }",
"public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }",
"java.lang.String getAccount();",
"@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}",
"@Override\n\tpublic UserVO getUserIdToEmail(String email, String pw) {\n\t\treturn mapper.getUserIdToEmail(email, pw);\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }",
"User findUserByEmail(String userEmail);",
"@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }",
"public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"private Account findAccount(String name, String email) throws AccountNotFoundException {\n for (Account current: accounts) {\n if (name.equals(current.getName()) && email.equals(current.getEmail())) {\n return current;\n }\n }\n throw new AccountNotFoundException();\n }",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"java.lang.String getAccountId();",
"@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}",
"public User findUserByEmail(final String email);",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"public String getUserEmail() {\r\n return userEmail;\r\n }",
"User find(String email);",
"@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}",
"public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }",
"@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}",
"public void getAccount( String email ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"email\", email);\r\n String url = API_DOMAIN + ACCOUNT_EXT;\r\n this.makeVolleyRequest( url, params );\r\n }",
"public UsersModel getUserById(String userEmail);",
"java.lang.String getLoginAccount();",
"java.lang.String getLoginAccount();",
"public User readByEmail(String email) throws DaoException;",
"public String getUserEmail() {\n return userEmail;\n }",
"public String getEmail() {\n return userItem.getEmail();\n }",
"public UserAccount getUser(long accountId) {\n\t\treturn null;\n\t}",
"Account getAccount(int id);",
"@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}",
"@Transactional\r\n\t\t\t@Override\r\n\t\t\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\r\n\t\t\t\tco.simplon.users.User account = service.findByEmail(email);\r\n\t\t\t\tif(account != null) {\r\n\t\t\t\t\treturn new User2(account.getEmail(), account.getPassword(), true, true, true, true,\r\n\t\t\t\t\t\t\tgetAuthorities(account.getRole()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new UsernameNotFoundException (\"Impossible de trouver le compte :\"+ email +\".\");\n\t\t\t\t}\r\n\t\t\t}",
"public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }",
"private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}",
"public static String getUserEmail(String accountNumber){\n return \"select ui_email from user_information where ui_account = '\"+accountNumber+\"'\";\n }",
"Optional<JUser> readByEmail(String email);",
"public String getUserAccount() {\n return sessionData.getUserAccount();\n }",
"public Email getEmail() { return this.email; }",
"public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }",
"@Override\n\tpublic User getUser(Account account) {\n\t\treturn usersHashtable.get(account);\n\t\t\n\t}",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public String getUserEmail(String userId)\n {\n return null;\n }",
"@Override\n\tpublic User findDuplicateByEmail(String email) {\n\t\tUser dbUser = userRepository.findByEmail(email);\n\t\tif (dbUser != null) {\n\t\t\tthrow new RuntimeException(\"User Already Registered.\");\n\t\t}\n\t\treturn null;\n\t}",
"public AppUser findByEmail(String email);",
"@Override\n public Client findClientByEmail(String email) {\n Client client = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n CriteriaBuilder cb = session.getCriteriaBuilder();\n CriteriaQuery cr = cb.createQuery(Client.class);\n Root root = cr.from(Client.class);\n cr.select(root);\n Query query = session.createQuery(cr);\n List<Client> results = query.getResultList();\n\n\n\n for (Client clt : results) {\n if (clt.getEmail().equals(email)) client = clt;\n }\n\n if (client==null) return null;\n\n\n\n /*\n Add accounts to List<Accounts> for client with specific parameters\n */\n String hql = \"FROM Account WHERE client_id = :paramId\";\n Query queryAccounts = session.createQuery(hql);\n queryAccounts.setParameter(\"paramId\", client.getId());\n List<Account> accounts = ((org.hibernate.query.Query) queryAccounts).list();\n client.setAccounts(accounts);\n }\n return client;\n }",
"public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public String getEmail() {return email; }",
"public synchronized String getUserString(String email) {\r\n User user = email2user.get(email);\r\n return (user == null) ? null : user2xml.get(user);\r\n }",
"private User getUserFromUsersBy(String email, String password){\n \tUser user=null;\n \tfor(User u : users ){\n \t\tif(u.getEmail().equals(email)&&u.getPassword().equals(password)){\n \t\t\tuser = u;\n \t\t}\n \t}\n \treturn user;\n }",
"public String getEmail() { return email; }",
"@Override\n\tpublic Account findByRegisteredEmail(String email) {\n\t\treturn m_managementDao.findByRegisteredEmail(email);\n\t}",
"public String getEmail()\r\n {\r\n return email;\r\n }",
"public String getEmail() {return email;}",
"public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}",
"public Long getUserAccountId() {\r\n return userAccountId;\r\n }",
"public Email getEmail() {\n return email;\n }",
"public UserAccount getUserAccountByLoginId(String loginId);",
"public EmailVendor getGmailAccount() {\r\n return GmailAccount;\r\n }",
"UserDTO findUserByEmail(String email);",
"public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}",
"@Override\npublic String getUsername() {\n\treturn email;\n}",
"public String getCurrentUserAccount();",
"Optional<Account> findByEmail(@Param(\"email\") String email);"
]
| [
"0.7508362",
"0.7369822",
"0.73009086",
"0.7299779",
"0.7289626",
"0.72521365",
"0.7248117",
"0.71683335",
"0.7158507",
"0.71565616",
"0.71565616",
"0.70796746",
"0.70465213",
"0.7039671",
"0.7036865",
"0.70039",
"0.6915365",
"0.690701",
"0.6897481",
"0.6879514",
"0.6878097",
"0.6877061",
"0.6859296",
"0.6858278",
"0.6845169",
"0.6818673",
"0.67965865",
"0.67693853",
"0.67120916",
"0.66922575",
"0.66725904",
"0.667036",
"0.6659466",
"0.6623196",
"0.66130316",
"0.66130316",
"0.66130316",
"0.66130316",
"0.66130316",
"0.66130316",
"0.66041917",
"0.66041917",
"0.66041917",
"0.6586069",
"0.65822846",
"0.6575232",
"0.6575232",
"0.6567461",
"0.65641147",
"0.6547747",
"0.6547747",
"0.6547747",
"0.6547747",
"0.6547747",
"0.6545787",
"0.6540037",
"0.6539708",
"0.6538102",
"0.65378654",
"0.6535168",
"0.6535168",
"0.6528738",
"0.6518944",
"0.64859444",
"0.648573",
"0.6483885",
"0.6479743",
"0.6477621",
"0.64772236",
"0.6465438",
"0.6461375",
"0.64374226",
"0.6436301",
"0.64336616",
"0.64303756",
"0.6427893",
"0.6416235",
"0.6408329",
"0.6405489",
"0.6401409",
"0.6400689",
"0.6392819",
"0.6391522",
"0.63852847",
"0.6384141",
"0.63822865",
"0.6380334",
"0.6379546",
"0.63644",
"0.63591737",
"0.63591665",
"0.6348094",
"0.63476485",
"0.6340084",
"0.63331735",
"0.63308376",
"0.63277644",
"0.6324417",
"0.6318748",
"0.6317441"
]
| 0.6592165 | 43 |
update column hasPost table User | public void updateSQL(String email) {
try {
ContentValues drinkValues = new ContentValues();
drinkValues.put(KEY_USER_HAS_POST_TABLE, 1);
SQLiteDatabase db = DatabaseUserHelper.getInstance(mContext).getWritableDatabase();
db.update(TABLE_USERS, drinkValues,KEY_USER_EMAIL + " = ?",new String[] {email});
} catch (SQLiteException e) {
Log.e(TAG, "updateSQL: " + e.toString() );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BlogPost updateLikes(BlogPost blogPost, User user);",
"@Override\n\tpublic Post updatePost(Post post) {\n\t\treturn null;\n\t}",
"@PutMapping(\"/\")\n private ResponseEntity<Post> updatePost(@RequestBody Post post) {\n User user = getCurrentUser();\n Post oldPost = postService.findById(post.getId()).orElse(null);\n\n if (oldPost == null && !user.getId().equals(post.getId()))\n return ResponseEntity.notFound().build();\n\n if (oldPost != null) {\n oldPost.setCreated(new Date());\n oldPost.setSubject(post.getSubject());\n oldPost.setContent(post.getContent());\n\n postService.add(oldPost);\n return new ResponseEntity<>(oldPost, HttpStatus.OK);\n } else\n return ResponseEntity.badRequest().build();\n }",
"@Override\r\n\tpublic void updatePost(Post post) {\n\t\tPost p = getPostById(post.getPost_id());\r\n\t\tp.setDepartment(post.getDepartment());\r\n\t\tp.setDescription(post.getDescription());\r\n\t\tp.setEmployeeSet(post.getEmployeeSet());\r\n\t\tp.setPost_id(post.getPost_id());\r\n\t\tp.setPost_name(post.getPost_name());\r\n\t\tp.setPost_wage(post.getPost_wage());\r\n\t\tgetHibernateTemplate().update(p);\r\n\t}",
"public boolean update(User u);",
"public void updatePost(Long id, BlogPost post);",
"public boolean upadte(User user);",
"@Override\n\tpublic boolean updateUser(Integer Id, User user) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}",
"void editMyPost(Post post);",
"int updateByPrimaryKey(WpPosts record);",
"CompletableFuture<PostResponse> updatePost(Post post);",
"public User updateUser(User user);",
"void setPostId(int postId);",
"UserEntity updateUser(UserEntity userEntity);",
"@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic Boolean updateUser(User user) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void updateUser(user theUser) {\n\t}",
"@Override\r\n\tpublic boolean updateUser(user user) {\n\t\tif(userdao.updateByPrimaryKey(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"@Override\n\tpublic void updateUser(User user)\n\t{\n\n\t}",
"public void setPostId(long postId);",
"public void update(User user);",
"@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 }",
"@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}",
"public void updateUser(User user) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic int updateOne(GuestUserVo bean) throws SQLException {\n\t\treturn 0;\r\n\t}",
"public void upVote(Post p) {\n p.upvote();\n }",
"@Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }",
"@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}",
"@Override\r\n\tpublic boolean releasePost(Post post) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tif(postDao.insert(post)>0)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic void addPost(Post post) {\n\t\tgetHibernateTemplate().save(post);\r\n\t}",
"@Override\r\n\tpublic int update(SpUser t) {\n\t\treturn 0;\r\n\t}",
"@Override\n public Task<Boolean> then(@NonNull Task task) throws Exception {\n return addPostScoreToUser(postObject.getOp(), 1L).continueWithTask(new Continuation<Long, Task<Boolean>>() {\n @Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n // Add post to user's upvoted posts\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }\n });\n }",
"@Override\r\n\tpublic boolean updateUser() {\n\t\treturn false;\r\n\t}",
"@Transactional(propagation = Propagation.REQUIRED, readOnly = false)\n\t@Override\n\tpublic void addPost(Post post) {\n\t\tpostDao.addPost(post);\n\t}",
"private void writeNewPost(String userId, String username, String title, String body) {\n String key = mDatabase.child(\"posts\").push().getKey();\n Post post = new Post(userId, username, title, body);\n Map<String, Object> postValues = post.toMap();\n\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n childUpdates.put(\"/user-posts/\" + userId + \"/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n }",
"private void updateCommentCount() {\n mProceessComment = true;\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Posts\").child(postId);\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (mProceessComment){\n\n String comment =\"\"+ dataSnapshot.child(\"pComments\").getValue();\n int newCommentVal = Integer.parseInt(comment)+1;\n ref.child(\"pComments\").setValue(\"\"+newCommentVal);\n mProceessComment = false ;\n\n\n\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n\n\n }",
"User modifyUser(Long user_id, User user);",
"public void update(User u) {\n\r\n\t}",
"@Override\n\tpublic User update(User t) {\n\t\treturn null;\n\t}",
"@RequestMapping(method = RequestMethod.PUT, value = \"update/{id}\")\n public Post updatePost(@RequestBody UpdatePostBean updateBean, @PathVariable Long id, String userTokenId) {\n\treturn service.updatePost(updateBean, id, userTokenId);\n }",
"int updateUserById( User user);",
"private void updatePostPut() {\n PostModel model = new PostModel(12, null, \"This is the newest one.\");\n Call<PostModel> call = jsonPlaceHolderAPI.putPosts(5, model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"void updateNotSeen( Long userId, Long newsId );",
"@Override\n public void modifyPost(List<Post> posts, int type) {\n\n\t}",
"public void updateUser(User oldUser, User newUser) ;",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User user = dataSnapshot.getValue(User.class);\n if (binding.basicInfo.postAuthorLayout.surveyAuthor.getText().equals(user.username)) {\n\n // delete post\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + mPostKey, null);\n childUpdates.put(\"/user-posts/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/\" + mPostKey, null);\n childUpdates.put(\"/survey-questions/\" + mPostKey, null);\n mDatabase.updateChildren(childUpdates);\n\n Toast.makeText(VotingPage.this, \"Deletion Success\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(VotingPage.this, \"Only creator can delete.\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"void update(User user);",
"void update(User user);",
"void savePost(Post post);",
"int updateByPrimaryKeySelective(LikeUser record);",
"int updateByPrimaryKey(LikeUser record);",
"private void addUserToDatabase( DatabaseReference postRef) {\n\n // check username, password cannot be null and may not have spaces\n final String usernameChecked = checkNullString(usernameText.getText().toString());\n final String password = checkNullString(passwordText.getText().toString());\n final String confirmPassword = checkNullString(confirmPasswordText.getText().toString());\n\n if (usernameChecked == null || password == null) {\n Toast.makeText(this, \"Entries may not be null, and may not have spaces!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (!password.equals(confirmPassword)){\n Toast.makeText(this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (users.contains(usernameChecked)){\n Toast.makeText(this, \"Username is already taken\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // initialize data for SentCount\n postRef\n .child(\"Users\")\n .child(usernameChecked)\n .runTransaction(new Transaction.Handler() {\n\n @NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData currentData) {\n User newUser = new User(usernameChecked, password);\n currentData.setValue(newUser);\n return Transaction.success(currentData);\n }\n\n @Override\n public void onComplete(@Nullable DatabaseError error, boolean committed,\n @Nullable DataSnapshot currentData) {\n Log.d(TAG, \"postTransaction:onComplete:\" + currentData);\n Toast.makeText(getApplicationContext(), \"Sign up successful!\", Toast.LENGTH_LONG);\n finish();\n }\n });\n }",
"public void likePost(String userKey) {\n if (!this.likes.contains(userKey)) {\n this.likes.add(userKey);\n }\n }",
"public void updatePost(PostInfo postInfo) throws SQLException {\n String sql = \"UPDATE `post` SET `place_id`=?,`post_text`=?,`post_time`=?,`status`=?,`user_id`=?,`editor_id`=? WHERE `post_id` = ?\";\n preparedStatement = connection.prepareStatement(sql);\n preparedStatement.setInt(1, postInfo.getPlace_id());\n preparedStatement.setString(2, postInfo.getPost_text());\n preparedStatement.setDate(3, postInfo.getPost_time());\n preparedStatement.setInt(4, postInfo.getStatus());\n preparedStatement.setInt(5, postInfo.getUser_id());\n preparedStatement.setInt(6, postInfo.getEditor_id());\n preparedStatement.setInt(7, postInfo.getPost_id());\n\n preparedStatement.executeUpdate();\n }",
"BlogPostLikes userLikes(BlogPost blogPost,User user);",
"@RequestMapping(value = \"/blog/{postId}\", method = RequestMethod.PUT)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void updateBlogPostPage(@PathVariable(\"postId\") int postId, @RequestBody Post post) {\n post.setPostId(postId);\n daoP.updatePost(post);\n\n }",
"public void update(User obj) {\n\t\t\n\t}",
"@Override\n\tpublic boolean updateUserz(Userz userz) {\n\t\tint i = userzDao.updateUserz(userz);\n\t\tif(i>0)\treturn true;\n\t\treturn false;\n\t}",
"private static void updateUserTest(Connection conn) {\n\t\t\n\t\ttry {\n\t\t\tUser existingUser = User.loadUserById(conn, 3); // User user = User.loadUserById(conn, 3);\n\t\t\t// the same id is preserved\n\t\t\texistingUser.setUsername(\"jo\");\n\t\t\texistingUser.setEmail(\"[email protected]\");\n\t\t\texistingUser.setUserGroupId(2);\n\t\t\texistingUser.saveToDB(conn);\n\t\t\t\n\t\t\t/*Następnie\tnależy\tsprawdzić,\tczy:\n\t\t\t\t1.\t Czy\twpis\tw\tbazie\tdanych\tma\twszystkie\n\t\t\t\tdane\todpowiednio\tponastawiane?\n\t\t\t\t2.\t Czy\tobiekt\tma\tnastawione\tpoprawne\tid? - czyli niezmienione, bo nie mamy settera dla id\n\t\t\t\t3.\t Czy\tnie\tdodał\tsię\tnowy\twpis\tw\tbazie?*/\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"int updateByPrimaryKey(PmPost record);",
"void saveOrUpdate(User user);",
"int updateByPrimaryKeySelective(WpPostsWithBLOBs record);",
"public boolean updateContent(User user, Object obj) {\n if (hasGrant(user,\n toGrant(getRelevantURIForSecurity(obj, false, false, false), GrantType.UPDATE_CONTENT))) {\n return true;\n }\n return false;\n }",
"@Override\n public User update(User user) {\n return dao.update(user);\n }",
"void updateUser(User entity) throws UserDaoException;",
"@Override\n public boolean updateUser(User user) {\n return controller.updateUser(user);\n }",
"@Test(expected = NoResultException.class)\r\n public void updatePosts(){\r\n\r\n Post post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 3000l)\r\n .getSingleResult();\r\n \r\n post.setDescription(\"TRASHED ELECTRONICS ARE PILING UP ACROSS ASIA\");\r\n post.setLikes(500);\r\n \r\n \r\n entityTransaction.begin();\r\n entityManager.createNamedQuery(\"Post.updateDescriptionAndLikesByPostId\", Post.class)\r\n .setParameter(\"value1\", post.getDescription())\r\n .setParameter(\"value2\", post.getLikes())\r\n .setParameter(\"value3\", post.getPostId())\r\n .executeUpdate();\r\n entityManager.refresh(post);\r\n entityTransaction.commit();\r\n\r\n post = entityManager.createNamedQuery(\"Post.fetchAllRecordsByUserId\", Post.class)\r\n .setParameter(\"value1\", 300l)\r\n .getSingleResult(); \r\n assertNotNull(post); \r\n }",
"int updateByPrimaryKeySelective(PmPost record);",
"@Override\n\tpublic void updateOne(User u) {\n\t\tdao.updateInfo(u);\n\t}",
"@Override\r\n\tpublic boolean updateUsuario(Usuario user) {\n\t\treturn false;\r\n\t}",
"public void setHideSettings(String un, boolean friends, boolean posts, boolean age, boolean status){\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n // updating user database\n collRU.findOneAndUpdate(\n eq(\"username\", un),\n and(\n Updates.set(\"hidefriends\", friends),\n Updates.set(\"hideposts\",posts),\n Updates.set(\"hideage\",age),\n Updates.set(\"hidestatus\",status)\n )\n );\n }",
"@Override\n\tpublic void onUserProfileUpdate(User updatedUser) {\n\n\t}",
"@Override\n\tpublic void updateItem(User entity) {\n\t\tuserRepository.save(entity);\n\t}",
"@Override\n\tpublic User updateUser(User user) {\n\t\treturn null;\n\t}",
"int updateByPrimaryKey(UserTopic record);",
"int updateByPrimaryKey(UserTopic record);",
"@RequestMapping(value = \"/post/{postId}\", method = RequestMethod.PUT)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void putPost(@PathVariable(\"postId\") int postId, @RequestBody Post post) {\n post.setPostId(postId);\n daoP.updatePost(post);\n }",
"@Override\n\n public void update(UserInfoVo userInfoVo) {\n\n userDao.update(userInfoVo);\n\n }",
"void update(User user) throws SQLException;",
"public void savePost(VBeatPostModel post) {\n AppLocalDB.getInstance().db.postDao().insertAll(post);\n }",
"public void update(Integer userId, Short tutorGroupId, Integer announcementId, Integer groupPostId) {\r\n for (Upload ul: uploads) {\r\n ul.setUserId(userId);\r\n ul.setTutorGroupId(tutorGroupId);\r\n ul.setAnnouncementId(announcementId);\r\n ul.setGroupPostId(groupPostId);\r\n }\r\n readyToSave = true;\r\n }",
"@Override\r\n\tpublic void deletePost(Post post) {\n\t\tgetHibernateTemplate().delete(post);\r\n\t}",
"int updateByPrimaryKeySelective(T00RolePost record);",
"public Post addNewPost(@RequestBody NewPostBean post, String userTokenId);",
"@Override\n public void updateForumAccess(String userId, String forumId) {\n\n\t}",
"@Override\n\t\tpublic void onUserProfileUpdate(User arg0) {\n\t\t\t\n\t\t}",
"public void updateUser(User detachedUser) throws Exception;",
"@Update(\"update website_cooperativeuser set title = #{title},imgurl=#{imgurl}, `order`= #{order},createtime = #{createtime} where id = #{id}\")\r\n int updateByPrimaryKey(WebsiteCooperativeuser record);",
"@Override\r\n\t@Transactional(readOnly = false)\r\n\tpublic boolean updateUserProfile(UserProfileRemote profile) {\n\t\tUserProfile domain = retrieve(profile.getId());\r\n\t\tdomain = _userProfileConverter.convertRemoteToDomain(domain, profile);\r\n\t\tsaveOrUpdate(domain);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic void update(User user) {\n\t\tuserDao.update(user);\r\n\t}",
"int updateByPrimaryKeySelective(UserTopic record);",
"int updateByPrimaryKeySelective(UserTopic record);",
"void editUser(String uid, User newUser);",
"@Override\n public void updateUser(EntityManager entityManager,User user) {\n entityManager.merge(user);\n //entityManager.getTransaction().commit();\n }",
"boolean adminUpdate(int userId, int statusId, int reimbId);",
"public boolean update(String keywordSoure,String keywordTarget, String username, String email) {\n\t\tUserKeyword userKeyword = userKeywordsRepo.findByUsernameAndNameAndEmail(username,keywordSoure,email);\n\t\tif( userKeyword != null){\n\t\t\tuserKeywordsRepo.delete(userKeyword);\n\t\t\tuserKeyword.setName(keywordTarget);\n\t\t\tuserKeywordsRepo.save(userKeyword);\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean updateUser (User bean) {\n \n String sql = \"UPDATE $tablename SET firstName = ?, lastName = ?, email = ? WHERE $idType = ?\";\n \n String query = sql.replace(\"$tablename\", bean.getTable()).replace(\"$idType\", bean.getIdType());\n \n try(\n Connection conn = DbUtil.getConn(DbType.MYSQL);\n PreparedStatement stmt = conn.prepareStatement(query);\n ) {\n \n stmt.setString(1, bean.getFirstName());\n stmt.setString(2, bean.getLastName());\n stmt.setString(3, bean.getEmail());\n stmt.setInt(4, bean.getID());\n \n int affected = stmt.executeUpdate();\n \n return affected == 1;\n \n } catch (Exception e) {\n System.out.println(e);\n return false;\n }\n }",
"@Modifying(clearAutomatically = true)\n @Transactional\n @Query(\"update Site s set s.url = ?3, s.description = ?4 where s.userId = ?1 and s.id = ?2\")\n void updateSiteInfo(Long userId, Long id, String url, String description);",
"public void updateUser(Person user) {\n\t\t\n\t}"
]
| [
"0.6255247",
"0.59029394",
"0.5885915",
"0.5837337",
"0.57846516",
"0.57155204",
"0.5584478",
"0.5551046",
"0.54745084",
"0.5467874",
"0.54477376",
"0.54088336",
"0.54083145",
"0.5387505",
"0.5382502",
"0.53782034",
"0.5367814",
"0.5325564",
"0.53077346",
"0.5298328",
"0.5289946",
"0.5286269",
"0.5285922",
"0.5285822",
"0.52502",
"0.5249248",
"0.5246492",
"0.5221793",
"0.5215356",
"0.5178992",
"0.5178744",
"0.51702034",
"0.5169992",
"0.5164136",
"0.51619846",
"0.5152699",
"0.51522785",
"0.51490885",
"0.51458967",
"0.5144159",
"0.51413745",
"0.51241165",
"0.5115364",
"0.5109857",
"0.51093614",
"0.509915",
"0.5092459",
"0.5090836",
"0.5090836",
"0.5090525",
"0.50712174",
"0.5068613",
"0.5061496",
"0.5055696",
"0.5053588",
"0.5045094",
"0.50436133",
"0.50401616",
"0.5033572",
"0.5032334",
"0.50301063",
"0.5029026",
"0.50231564",
"0.5020524",
"0.5014691",
"0.50139636",
"0.50062275",
"0.50060546",
"0.5004026",
"0.49968955",
"0.49856004",
"0.49812624",
"0.4973538",
"0.4972599",
"0.4971371",
"0.4942666",
"0.4942666",
"0.4941481",
"0.49316362",
"0.49309418",
"0.4926913",
"0.49232718",
"0.49214804",
"0.49168938",
"0.49148446",
"0.4913408",
"0.49095833",
"0.49057525",
"0.4903971",
"0.49038914",
"0.49016663",
"0.48978767",
"0.48978767",
"0.48953792",
"0.48950163",
"0.4884583",
"0.4882998",
"0.48796856",
"0.48782542",
"0.48766539"
]
| 0.5602936 | 6 |
get table Post including image and title text, | public void queryPostTable(Context activityContext, String postTableName) {
new GetCursorTablePost(activityContext).execute(postTableName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }",
"public void getPostInfo(String objectId){\n final Post.Query query = new Post.Query();\n query.getTop().withUser();\n query.getInBackground(objectId, new GetCallback<Post>() {\n @Override\n public void done(Post object, ParseException e) {\n if (e == null){\n // populate fields with information\n\n if (!object.getDescription().equals(\"\")){\n SpannableString ss1= new SpannableString(object.getHandle() + \" \");\n ss1.setSpan(new StyleSpan(Typeface.BOLD), 0, ss1.length(), 0);\n tvCaption2.append(ss1);\n tvCaption2.append(object.getDescription());\n } else{\n tvCaption2.setText(\"\");\n tvCaption2.setVisibility(View.GONE);\n }\n\n tvHandle2.setText(object.getHandle());\n if (object.getImage() != null){\n GlideApp.with(PostDetails.this)\n .load(object.getImage().getUrl())\n .placeholder(R.drawable.placeholder)\n .into(ivImage2);\n }\n if (object.getProfileImage() != null) {\n GlideApp.with(PostDetails.this)\n .load(object.getProfileImage().getUrl())\n .transform(new CircleCrop())\n .placeholder(R.drawable.instagram_user)\n .into(ivProfileImage2);\n }\n\n tvTimeStamp2.setText(TimeFormatter.getTimeDifference(object.getCreatedAt().toString()));\n } else{ e.printStackTrace(); }\n }\n });\n }",
"WpPostsWithBLOBs selectByPrimaryKey(Long id);",
"public PdfPTable getTable(DatabaseConnection connection)\n throws SQLException, DocumentException, IOException {\n PdfPTable table = new PdfPTable(new float[] { 1, 2, 2, 5, 1 });\n table.setTableEvent(new PressPreviews());\n table.setWidthPercentage(100f);\n table.getDefaultCell().setPadding(5);\n table.getDefaultCell().setBorder(PdfPCell.NO_BORDER);\n table.getDefaultCell().setCellEvent(new PressPreviews());\n for (int i = 0; i < 2; i++) {\n table.addCell(\"Location\");\n table.addCell(\"Date/Time\");\n table.addCell(\"Run Length\");\n table.addCell(\"Title\");\n table.addCell(\"Year\");\n }\n table.getDefaultCell().setBackgroundColor(null);\n table.setHeaderRows(2);\n table.setFooterRows(1);\n List<Screening> screenings = PojoFactory.getPressPreviews(connection);\n Movie movie;\n for (Screening screening : screenings) {\n movie = screening.getMovie();\n table.addCell(screening.getLocation());\n table.addCell(String.format(\"%s %2$tH:%2$tM\",\n screening.getDate().toString(), screening.getTime()));\n table.addCell(String.format(\"%d '\", movie.getDuration()));\n table.addCell(movie.getMovieTitle());\n table.addCell(String.valueOf(movie.getYear()));\n }\n return table;\n }",
"public Post getPost(int postID)\n {\n Post post = null;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE postID=\"+\"'\"+postID+\"'\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst()) {\n post = new Post();\n post.setPostID(c.getColumnIndex(\"postID\"));\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n }\n else\n {\n Log.i(TAG, \"This postID doesn't exist in the DB.\");\n }\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n Log.i(TAG, \"Error in getting post from DB.\");\n\n }\n return post;\n }",
"public ArrayList<PostInfo> getPost() throws SQLException {\n ArrayList<PostInfo> postInfoList = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `status` = 1 ORDER BY `post_time` DESC\";\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n postInfoList.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n return postInfoList;\n }",
"private List<Text> getPosts() {\n\t\tList<Text> result = new ArrayList<>();\n\t\tObservableList<Post> postList = PostDAO.searchPosts(String.valueOf(friendsID));\n\t\tfor(Post post : postList) {\n\t\t\tString postTime = post.getPostTime();\n\t\t\tString content = post.getPostContent();\n\t\t\tString editTime = post.getEditTime();\n\t\t\tString toPost;\n\t\t\tif(editTime != null) {\n\t\t\t\ttoPost = \"Post on \" + postTime + \" Last edit on \" + editTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttoPost = \"Post on \" + postTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\tText text = new Text(toPost);\n\t\t\tresult.add(text);\n\t\t}\n\t\treturn result;\n\t}",
"public static GridPane showPostDetails(Post post) {\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 20, 20, 20));\n\t\t\n\t\tString imagePath = post.getImagePath();\n\t\tif(imagePath.equalsIgnoreCase(\"none\") || imagePath.isEmpty()) {\n\t\t\timagePath = \"../../Images/No_image_available.jpg\";\n\t\t}\n\t\tImageView image = new ImageView(new Image(\"file:\" + imagePath, 300, 300, false, false));\n\t\tgrid.add(image, 0, 0);\n\t\t\n\t\tButton uploadImage = new Button(\"Upload Image\");\n\t\tuploadImage.setOnAction(PostDetailsController.uploadImageHandler(postStage, post));\n\t\tHBox hbBtn = new HBox(300);\n\t\thbBtn.getChildren().add(uploadImage);\n\t\thbBtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(hbBtn, 0, 1);\n\t\t\n\t\tVBox details = new VBox();\n\t\tdetails.setSpacing(10);\n\t\t\n\t\tdetails.getChildren().add(getLabel(\"Post ID: \", post.getId(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Title: \", post.getTitle(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Description: \", post.getDescription(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Creator ID: \", post.getCid(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Status: \", post.getStatus(), false, \"string\"));\n\t\tif(post instanceof Event) {\n\t\t\tdetails.getChildren().add(getLabel(\"Venue: \", ((Event) post).getVenue(), true, \"string\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Date: \", ((Event) post).getDate(), true, \"date\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Capacity: \", Integer.toString(((Event) post).getCapacity()), true, \"int\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Attendee Count: \", Integer.toString(((Event) post).getAttcount()), false, \"int\"));\n\t\t}\n\t\telse if(post instanceof Job) {\n\t\t\tdetails.getChildren().add(getLabel(\"Proposed Price: \", Double.toString(((Job) post).getProprice()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Lowest Offer: \", Double.toString(((Job) post).getLowoffer()), false, \"double\"));\n\t\t}\n\t\telse {\n\t\t\tdetails.getChildren().add(getLabel(\"Highest Offer: \", Double.toString(((Sale) post).getHighoffer()), false, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Minimum Raise: \", Double.toString(((Sale) post).getMinraise()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Asking Price: \", Double.toString(((Sale) post).getAskprice()), true, \"double\"));\n\t\t}\n\t\tgrid.add(details, 3, 0);\n\t\t\n\t\tButton closePost = new Button(\"Close Post\");\n\t\tclosePost.setOnAction(PostDetailsController.closePostHandler(userId));\n\t\t\n\t\tButton deletePost = new Button(\"Delete Post\");\n\t\tdeletePost.setOnAction(PostDetailsController.deletePostHandler(userId));\n\t\t\n\t\tButton savePost = new Button(\"Save(after edit)\");\n\t\tsavePost.setOnAction(PostDetailsController.savePostHandler(userId, post));\n\t\t\n\t\tRegion region1 = new Region();\n HBox.setHgrow(region1, Priority.ALWAYS);\n Region region2 = new Region();\n HBox.setHgrow(region2, Priority.ALWAYS);\n\t\tHBox btn = new HBox(closePost, region1, deletePost, region2, savePost);\n\t\t\n\t\tbtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(btn, 3, 1, 10, 1);\n\t\t\n\t\treturn grid;\n\t}",
"private Table getHeaderForAssetDetailTable() {\n\n\t\tTableHeaderData facilityHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Facility\"));\n\t\tfacilityHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData workCenterHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Work Center\"));\n\t\tworkCenterHeaderData.addAttribute(\"style\", \"width: 15%\");\n\n\t\tTableHeaderData assetNumberHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Asset\"));\n\t\tassetNumberHeaderData.addAttribute(\"style\", \"width: 20%\");\n\n\t\tTableHeaderData descriptionHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Description\"));\n\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 35%\");\n\n\t\tTableHeaderData statusHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Active\"));\n\t\tstatusHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData editHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Edit\"));\n\t\teditHeaderData.addAttribute(\"style\", \"width: 16%\");\n\n\t\tArrayList<TableHeaderData> headers = new ArrayList<TableHeaderData>();\n\t\theaders.add(facilityHeaderData);\n\t\theaders.add(workCenterHeaderData);\n\t\theaders.add(assetNumberHeaderData);\n\t\theaders.add(descriptionHeaderData);\n\t\theaders.add(statusHeaderData);\n\t\theaders.add(editHeaderData);\n\n\t\tTableHeader tableHeader = new TableHeader(headers);\n\t\ttableHeader.addAttribute(\"style\", \"text-align: center;\");\n\t\tTable table = new Table();\n\t\ttable.setTableHeader(tableHeader);\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 610px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\treturn table;\n\n\t}",
"List<WpPostsWithBLOBs> selectByExampleWithBLOBs(WpPostsExample example);",
"public ArrayList<Object> post_detail_image(Connection con, int user_id,int post_id[],String type_of_post[],String purpose)\n\t{\n\t\tResultSet rs = null; \n\t\tPreparedStatement pst;\n\t\tDate date;\t\t\n\t\tArrayList<Object> post = new ArrayList<Object>();\n\t\tArrayList<Object> post_list = new ArrayList<Object>();\n\t\tint sample_product_media_id,i=0;\n\t\tint post_id_array[]=new int[post_id.length];\n\t\tString sample_product_media_type,sample_product_media_text,type_of_promotional_post,type_of_project_post ,sample_product_media_description;\n\t\tString[] type_of_post_array = new String[type_of_post.length];\n\t\tString sample_product_text=null;\n\t\tBlob sample_product_media,detail_image;\n\t\tbyte[] sample_product_media_bytes,detail_image_bytes;\n\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//for all post irrespective of their type\n\t\t\t\tif(post_id==null && type_of_post==null)\n\t\t\t\t{\n\t\t\t\t\tpst=con.prepareStatement(\"select post_id, type_of_post from all_post order by date_of_post desc where e_id=?\"); \n\n\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\n\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\t\twhile(rs.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tpost_id_array[i]=rs.getInt(1);\n\t\t\t\t\t //post_id = rs.getInt(1);\n\t\t\t\t\t\ttype_of_post_array[i]=rs.getString(2);\t\n\t\t\t\t\t// type_of_post= rs.getString(2);\t\n\t\t\t\t\t //date = rs.getDate(3);\n\t\t\t\t\t \n\t\t\t\t\t //post_id_array[i]=post_id;\n\t\t\t\t\t// type_of_post_array[i]= type_of_post;\n\t\t\t\t\t i++;\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(post_id==null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;i<type_of_post.length;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tpst=con.prepareStatement(\"select post_id, date_of_post from all_post order by date_of_post desc where e_id=? and type_of_post=?\"); \n\n\t\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\tpst.setString(2,type_of_post[k]);\n\t\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(rs.next()) \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t //post_id = rs.getInt(1);\n\t\t\t\t\t\t //date = rs.getDate(2);\n\t\t\t\t\t\t \n\t\t\t\t\t\t post_id_array[i]=rs.getInt(1);\n\t\t\t\t\t\t type_of_post_array[i]= type_of_post[k];\n\t\t\t\t\t\t i++;\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse //for specific post \n\t\t\t\t{\t\n\t\t\t\t\tfor(int j=0;j<post_id.length;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(post_id[j]);\n\t\t\t\t\t\t//System.out.println(type_of_post[j]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpost_id_array[j]=post_id[j];\n\t\t\t\t\t\ttype_of_post_array[j]= type_of_post[j];\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tfor(int ctr =0;ctr < post_id_array.length; ctr++)\n\t\t\t\t{\n\t\t\t\t\tint post_id_ = post_id_array[ctr];\n\t\t\t\t\tString type_of_post_ = type_of_post_array[ctr];\n\t\t\t\t\t\n\t\t\t\t\tif(purpose.equals(\"show\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpost.add(user_id);\n\t\t\t\t\t\t\tpost.add(post_id_);\n\t\t\t\t\t\t\tpost.add(type_of_post_);\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if(type_of_post.equals(\"class_promotional_post\") ||type_of_post.equals(\"workshop_promotional_post\") )\n\t\t\t\t\t\t\tif(type_of_post_.contains(\"promotion\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpst=con.prepareStatement(\"select promotional_post_detail_image from promotional_post where e_id=? and promotional_post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // else if(type_of_post.contains(\"project_post\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpst=con.prepareStatement(\"select project_post_detail_image from project_post where e_id=? and project_post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\t\tpst.setInt(2,post_id_);\n\t\t\t\t\t\t\tpst.setString(3,type_of_post_);\n\t\t\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t while(rs.next())\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t detail_image = rs.getBlob(1);\n\t\t\t\t\t\t\t\t if(detail_image!=null)\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t detail_image_bytes = detail_image.getBytes(1,(int)detail_image.length());\t\n\t\t\t\t\t\t\t\t\t post.add(detail_image_bytes);\n\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 \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t pst=con.prepareStatement(\"select sample_product_media_id,sample_product_media,sample_product_media_type,media_description from sample_post_product_media where e_id=? and post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t\t rs=pst.executeQuery();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t while(rs.next())\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t sample_product_media_id = rs.getInt(1);\n\t\t\t\t\t\t\t\t sample_product_media_type = rs.getString(3);\n\t\t\t\t\t\t\t\t sample_product_media_description = rs.getString(4);\n\t\t\t\t\t\t\t\t sample_product_media = rs.getBlob(2);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t if(sample_product_media!=null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t sample_product_media_bytes = sample_product_media.getBytes(1,(int)sample_product_media.length());\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_bytes);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_description);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_id);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_type);\n\t\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\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t post_list.add(post);\n\t\t\t\t\t\t\t //System.out.println(post_list);\n\t\t\t}\n\t\t\telse //delete case\n\t\t\t{\n \n\t\t\t\t if(type_of_post_.contains(\"promotion\"))\n\t\t\t\t {\n\t\t\t\t\t \t pst=con.prepareStatement(\"delete from promotional_post where e_id= ? and promotional_post_id =? and type_of_post=?\");\n\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t pst.executeUpdate();\t\t\n\t\t\t\t }\n\t\t\t\t else//if(type_of_post.contains(\"project_post\"))\n\t\t\t\t {\n\t\t\t\t\t \t pst=con.prepareStatement(\"delete from project_post where e_id= ? and project_post_id =? and type_of_post=? \");\n\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t pst.executeUpdate();\t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t pst=con.prepareStatement(\"delete from sample_post_product_media where e_id= ? and post_id =? and type_of_post=? \");\n\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t pst.executeUpdate();\t\n\t\t\t\t \n\t\t\t\t pst=con.prepareStatement(\"delete from all_post where e_id= ? and post_id =? and type_of_post=? \");\n\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t pst.executeUpdate();\t\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t\t\n\t}\n\tcatch (Exception e)\t\n\t{\n\t\te.printStackTrace();\n\t}\n\n\t\t\treturn post_list;\n\t}",
"public static ResultSet getPosts(){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts\");\n result = pst.executeQuery();\n\n System.out.println(\"PostDAO: getting posts\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"List<Post> getAllPost() throws Exception;",
"public void Select(){\n Cursor cursor = sqlDB.rawQuery(\"SELECT * FROM posts \",null);\n\n if (cursor != null && cursor.moveToFirst()) {\n String title = cursor.getString(cursor.getColumnIndex(PostDatabase.COL_TITLE));\n String content = cursor.getString(cursor.getColumnIndex(PostDatabase.COL_CONTENT));\n\n // Dumps \"Title: Test Title Content: Test Content\"\n Log.d(\"PostDataBase\", \"Title: \" + title + \" Content: \" + content);\n\n cursor.close();\n }\n\n // `query()` method\n /* Cursor query (String table, String[] columns, String selection, String[] selectionArgs,\n String groupBy, String having, String orderBy, String limit)*/\n }",
"public void readTable() throws SQLException\n\t{\n\t\tStatement stm = conn.createStatement();\n\t\tResultSet rs = stm.executeQuery(READ_QUERY);\n\t\t\n\t\twhile(rs.next())\n\t\t{\n\t\t\tWPPost post = new WPPost(rs.getInt(ID), rs.getInt(POST_AUTHOR), rs.getTimestamp(POST_DATE),\n\t\t\t\t\trs.getTimestamp(POST_DATE_GMT), rs.getString(POST_CONTENT), rs.getString(POST_TITLE), \n\t\t\t\t\trs.getString(POST_EXCERPT), rs.getString(POST_STATUS), rs.getString(COMMENT_STATUS),\n\t\t\t\t\trs.getString(PING_STATUS), rs.getString(POST_PASSWORD), rs.getString(POST_NAME),\n\t\t\t\t\trs.getString(TO_PING), rs.getString(PINGED), rs.getTimestamp(POST_MODIFIED), \n\t\t\t\t\trs.getTimestamp(POST_MODIFIED_GMT), rs.getString(POST_CONTENT_FILTERED), rs.getInt(POST_PARENT),\n\t\t\t\t\trs.getString(GUID), rs.getInt(MENU_ORDER), rs.getString(POST_TYPE), rs.getString(POST_MIME_TYPE),\n\t\t\t\t\trs.getInt(COMMENT_COUNT));\n\t\t\treadValues.add(post);\n\t\t}\n\t}",
"private void createCoverTable(Document document, Image img) throws IOException, DocumentException {\n\n //PEI NAME IN BLUE\n Table table = new Table(1);\n table.setBorder(Table.NO_BORDER);\n table.setWidth(100);\n Font font = getFontBig();\n font.setColor(Color.BLUE);\n font.setStyle(Font.BOLD);\n font.setSize(34);\n Cell cell = new Cell(new Paragraph(peiName, font));\n cell.setHorizontalAlignment(Cell.ALIGN_CENTER);\n cell.setVerticalAlignment(Cell.ALIGN_TOP);\n cell.setBorder(Cell.NO_BORDER);\n table.addCell(cell);\n document.add(table);\n\n //PEI ATTRS\n table = new Table(2);\n table.setCellsFitPage(true);\n table.setBorder(Table.NO_BORDER);\n table.setAlignment(Table.ALIGN_LEFT);\n table.setWidth(100);\n table.setWidths(new float[]{150, 300});\n\n font = getFontSmall();\n font.setStyle(Font.BOLD);\n Paragraph p1 = new Paragraph(getMessage(\"pei.version\") + \":\", font);\n p1.setAlignment(Paragraph.ALIGN_LEFT);\n cell = new Cell(p1);\n Paragraph p2 = new Paragraph(version != null ? version : \"\", getFontSmall());\n p2.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p2);\n Paragraph p3 = new Paragraph(getMessage(\"pei.versionDate\") + \":\", font);\n p3.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p3);\n Paragraph p4 = new Paragraph(versionDate != null ? dateFormat.format(versionDate) : \"\", getFontSmall());\n p4.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p4);\n Paragraph p5 = new Paragraph(simulationDate != null ? getMessage(\"pei.simulationDate\") + \":\" : \"\", font);\n p5.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p5);\n Paragraph p6 = new Paragraph(simulationDate != null ? dateFormat.format(simulationDate) : \"\", getFontSmall());\n p6.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p6);\n Paragraph p7 = new Paragraph(getMessage(\"pei.authorName\") + \":\", font);\n p7.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p7);\n Paragraph p8 = new Paragraph(authorName != null ? authorName : \"\", getFontSmall());\n p8.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p8);\n\n cell.setBackgroundColor(Color.LIGHT_GRAY);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\n cell.setVerticalAlignment(Element.ALIGN_BOTTOM);\n table.addCell(cell);\n\n if (img != null) {\n if (img.getWidth() > 295) {\n img.scaleAbsoluteWidth(295);\n img.scaleAbsoluteHeight(img.getHeight() / img.getWidth() * 295);\n }\n img.setAlignment(Image.ALIGN_RIGHT);\n Paragraph p = new Paragraph(\" \");\n p.setAlignment(Paragraph.ALIGN_RIGHT);\n cell = new Cell(p);\n cell.setHorizontalAlignment(Cell.ALIGN_RIGHT);\n cell.addElement(img);\n } else {\n cell = new Cell(\" \");\n }\n cell.setBorder(Cell.NO_BORDER);\n\n table.addCell(cell);\n\n document.add(table);\n }",
"private String getBlogContent(String postId){\n String reqUrl = \"https://www.tistory.com/apis/post/read\";\n String data = String.format(\"access_token=%s&output=%s&blogName=%s&postId=%s\"\n ,blog.getAccess_token(),\"json\",blog.getBlogName(),postId);\n try{\n HttpURLConnection conn = initConnGET(reqUrl,data);\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n if (conn.getResponseCode() == conn.HTTP_OK) {\n InputStreamReader isr = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n BufferedReader reader = new BufferedReader(isr);\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n reader.close();\n }\n conn.disconnect();\n String content = new JSONObject(builder.toString())\n .getJSONObject(\"tistory\")\n .getJSONObject(\"item\")\n .optString(\"content\");\n return content;\n }catch(Exception err){\n return \"\";\n }\n }",
"public Image getTableTabContentAsImage() {\r\n\t\treturn this.dataTableTabItem.getContentAsImage();\r\n\t}",
"String getItemImage();",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"List<PostInfo> getPostList();",
"public static ArrayList<Post> ParsePosts(JSONObject jsonTotalObject)\n {\n ArrayList<Post> posts = new ArrayList<>();\n try\n {\n JSONArray postArray = jsonTotalObject.getJSONArray(\"posts\");\n for(int i = 0 ;i<postArray.length();i++)\n {\n JSONObject object = postArray.getJSONObject(i);\n Post post = new Post();\n // Notice,use \"opt\" instead of \"get\" to avoid null value exception\n post.setTitle(object.optString(\"title\"));\n post.setId(object.optInt(\"id\"));\n post.setThumbnailUrl(Settings.DEFAULT_THUMBNAIL_URL);\n post.setUrl(object.optString(\"url\"));\n // Set to zero if there's no comment.\n post.setCommentCount(object.optInt(\"comment_count\", 0));\n post.setDate(object.optString(\"date\", \"N/A\"));\n post.setExcerpt(object.optString(\"excerpt\",\"N/A\"));\n post.setContent(object.optString(\"content\",\"N/A\"));\n // Care that author is not a String,it is a JSONObject\n JSONObject author = object.getJSONObject(\"author\");\n post.setAuthor(author.optString(\"name\", \"N/A\"));\n // if the post has it's thumbnail image,use it,or just keep default\n JSONObject featuredImages = object.optJSONObject(\"thumbnail_images\");\n if(featuredImages != null)\n {\n post.setFeaturedImageUrl(featuredImages.optJSONObject(\"full\")\n .optString(\"url\", Settings.DEFAULT_THUMBNAIL_URL));\n }\n posts.add(post);\n }\n return posts;\n }\n catch (JSONException e)\n {\n Log.e(TAG,\"JSONException when loading Posts\",e);\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n\tpublic List<String> getAllImages() {\n\t\t\n\t\treturn jdbcTemplate.query(\"select * from news\", new BeanPropertyRowMapper<News>());\n\t}",
"public List<Getable> data() {\n assertVisible();\n String[] headings = headings();\n List<List<String>> rowsWithTdStrings = get().findElements(By.tagName(\"tr\")).stream()\n // Ignore rows without TD elements\n .filter(e -> !e.findElements(By.tagName(\"td\")).isEmpty())\n // Then turn each row of TDs into a list of their string-contents\n .map(row -> row.findElements(By.tagName(\"td\")).stream().map(e -> e.getText()).collect(toList()))\n .collect(toList());\n\n List<Getable> result = new ArrayList<>();\n for (List<String> rowWithTdStrings : rowsWithTdStrings) {\n GetableMap aResult = new GetableMap();\n assertEquals(\"Different number of headings and columns\",\n headings.length, rowWithTdStrings.size());\n for (int i = 0; i < headings.length; i++) {\n aResult.put(headings[i], rowWithTdStrings.get(i));\n }\n result.add(aResult);\n }\n return result;\n }",
"@Override\n public ArrayList<PostVo> get_post_by_page(int page) {\n ArrayList<PostVo> posts = (ArrayList<PostVo>) baseDAO.findBySQLForVO(\"\" +\n \"select p.p_id as pId , p.p_floor as pFloor , p.p_main as pMain , p.p_title as pTitle\" +\n \" , u.u_name as uName from Post as p join user as u on p.u_id = u.u_id \"\n ,PostVo.class,null,10*(page-1),10);\n return posts;\n }",
"private VBox showReplyList(Post post) {\n\t\tArrayList<Reply> reply = Post.getReplies(post.getId());\n\t\tTableView<Reply> tableView = new TableView<Reply>();\n\t\tif(post instanceof Event) { \n\t\t TableColumn<Reply, String> responder = new TableColumn<Reply, String>(\"Users Participating in the Event\");\n\t\t responder.setCellValueFactory(new PropertyValueFactory<>(\"responderId\"));\n\t\t responder.setMinWidth(500);\n\t\t responder.setStyle(\"-fx-alignment: CENTER\");\n\t\t tableView.getColumns().add(responder);\n\t\t \n\t\t for(int i = 0; i < reply.size(); i++) {\n\t\t \ttableView.getItems().add(reply.get(i));\n\t\t }\n\t\t}\n\t\telse if(post instanceof Job || post instanceof Sale) {\n\t\t\tTableColumn<Reply, String> responder = new TableColumn<Reply, String>(\"Responder ID\");\n\t\t responder.setCellValueFactory(new PropertyValueFactory<>(\"responderId\"));\n\t\t responder.setStyle(\"-fx-alignment: CENTER\");\n\t\t responder.setMinWidth(150);\n\t\t \n\t\t TableColumn<Reply, Double> offerValue = new TableColumn<Reply, Double>(\"Offer Amount\");\n\t\t offerValue.setCellValueFactory(new PropertyValueFactory<>(\"value\"));\n\t\t offerValue.setStyle(\"-fx-alignment: CENTER\");\n\t\t offerValue.setMinWidth(150);\n\t\t \n\t\t tableView.getColumns().add(responder);\n\t\t tableView.getColumns().add(offerValue);\n\t\t for (int i = reply.size() - 1; i >= 0; i--) {\n\t\t \ttableView.getItems().add(reply.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\tText replyTitle = new Text(\"Reply Details\");\n\t\treplyTitle.setFont(Font.font(\"Tahoma\", FontWeight.BOLD, 20));\n\t\t\n\t\tVBox vbox = new VBox(replyTitle, tableView);\n\t\t\n\t\treturn vbox;\n\t}",
"@Override\n public String getText() {\n try {\n return doc.select(\".post-content\").get(0).text().replaceAll(\"\\n\", \" \").\n // removing references\n replaceAll(\"\\\\[[\\\\w\\\\s\\\\.\\\\-\\\\,;\\\\?\\\\!\\\\:]+\\\\]\", \"\");\n } catch (NullPointerException e) {\n return null;\n }\n }",
"public Image getHistoTableContentAsImage() {\r\n\t\treturn this.histoTableTabItem.getContentAsImage();\r\n\t}",
"private SafeHtml getDataTypeColumnToolTip(String columnText, StringBuilder title, boolean hasImage) {\n\t\tif (hasImage) {\n\t\t\tString htmlConstant = \"<html>\"\n\t\t\t\t\t+ \"<head> </head> <Body><img src =\\\"images/error.png\\\" alt=\\\"Arugment Name is InValid.\\\"\"\n\t\t\t\t\t+ \"title = \\\"Arugment Name is InValid.\\\"/>\" + \"<span tabIndex = \\\"0\\\" title='\" + title + \"'>\"\n\t\t\t\t\t+ columnText + \"</span></body>\" + \"</html>\";\n\t\t\treturn new SafeHtmlBuilder().appendHtmlConstant(htmlConstant).toSafeHtml();\n\t\t} else {\n\t\t\tString htmlConstant = \"<html>\" + \"<head> </head> <Body><span tabIndex = \\\"0\\\" title='\" + title + \"'>\"\n\t\t\t\t\t+ columnText + \"</span></body>\" + \"</html>\";\n\t\t\treturn new SafeHtmlBuilder().appendHtmlConstant(htmlConstant).toSafeHtml();\n\t\t}\n\t}",
"public String getTitleImage() {\n return titleImage;\n }",
"public VBeatPostModel getPost(String postId){\n List<VBeatPostModel> postList = AppLocalDB.getInstance().db.postDao().getPost(postId);\n\n if(postList.size() == 0) {\n return null;\n } else {\n return postList.get(0);\n }\n\n }",
"Table getTable();",
"public Table<Integer, Integer, String> getData();",
"public static List<Book> getAllBook(Connection conn) {\n\t\tList<Book> listbook = new ArrayList<>();\n\t\tString sql = \"select * from book\";\n\t\tSystem.out.println(\"dsds\");\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tBook book=new Book(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getFloat(4),rs.getBytes(5));\n\t\t\t\tlistbook.add(book);\n\t\t\t\tBlob blob = rs.getBlob(\"img\");\n\t\t\t InputStream inputStream = blob.getBinaryStream();\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte[] buffer = new byte[4096];\n int bytesRead = -1;\n\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead); \n }\n \n byte[] img = outputStream.toByteArray();\n String base64Image = Base64.getEncoder().encodeToString(img);\n \n \n inputStream.close();\n outputStream.close();\n// \t\tBook book = new Book(id , title , detail , price ,base64Image);\n//\t\t\t listbook.add(book);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listbook;\n\t\t\n\t}",
"public void getImage(){\n Cursor c = db.rawQuery(\"SELECT * FROM Stories\",null);\n if(c.moveToNext()){\n byte[] image = c.getBlob(0);\n Bitmap bmp = BitmapFactory.decodeByteArray(image,0,image.length);\n }\n}",
"public Image getObjectTabContentAsImage() {\r\n\t\treturn this.objectDescriptionTabItem.getContentAsImage();\r\n\t}",
"public long ashirPostCreating(AshirBlogPostingHelper post) {\n long result;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(Col_2, post.getPost());\n values.put(Col_3, post.getImage());\n //inserting valuse into table columns\n result = db.insert(NAME_OF_TABLE, null, values);\n db.close();\n return result;\n\n }",
"private static ArrayList<Posts> extractFeatureFromJson(String postJSON) {\n if (TextUtils.isEmpty(postJSON)) {\n\n //Toast.makeText(this , \"null json string\", Toast.LENGTH_SHORT).show();\n return null;\n }\n ArrayList<Posts> posts = new ArrayList<>();\n\n try {\n JSONObject baseJsonResponse = new JSONObject(postJSON);\n JSONArray feed = baseJsonResponse.getJSONArray(\"posts\");\n\n JSONObject c = feed.getJSONObject(0);\n JSONObject insta = c.getJSONObject(\"instagram\");\n JSONArray profile = insta.getJSONArray(\"profile_posts\");\n\n JSONObject f = profile.getJSONObject(0);\n\n JSONObject entry =f.getJSONObject(\"entry_data\");\n JSONArray ProfilePage = entry.getJSONArray(\"ProfilePage\");\n JSONObject d= ProfilePage.getJSONObject(0);\n JSONObject user = d.getJSONObject(\"user\");\n\n JSONObject media = user.getJSONObject(\"media\");\n JSONArray nodes = media.getJSONArray(\"nodes\");\n\n for(int i=0;i<nodes.length();i++)\n {\n JSONObject ca = nodes.getJSONObject(i);\n\n\n String text= ca.getString(\"caption\");\n String time = ca.getString(\"date\");\n posts.add(new Posts(time, text));\n\n }\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Problem parsing the posts JSON results\", e);\n }\n return posts;\n }",
"Forumpost selectByPrimaryKey(Integer postid);",
"@Override\n public String toString() {\n return \"Post number: \" + this.id + \"\\n\" +\n this.content + \"\\n\" +\n \"Written by: \" + this.user.getUsername() + \"\\n\" +\n //The expression below checks if the url\n //field is null. If not, it displays the url.\n //If it is, it just displays an empty string\n \"URL: \" + (this.url != null ? this.url : \"\");\n\n }",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"@Override\n\tpublic void getPost(Scanner sc) {\n\t\tPost p;\n\t\tgetAll();\n\t\tSystem.out.print(\"보고 싶은 리뷰의 번호를 입력해 주세요 >>\");\n\t\tp = dao.selectPost(sc.nextInt());\n\t\tSystem.out.println(p.getPostName());\n\t\tSystem.out.println(p.getContent());\n\t}",
"void displayPostWithId(String id);",
"ImageContentData findContentData(String imageId);",
"public Image getImage() {\n if (tamagoStats.getAge() <= 0) {\n return images.get(\"oeuf\").get(\"noeuf\");\n } else if (tamagoStats.getAge() <= 3) {\n return images.get(\"bebe\").get(\"metamorph\");\n } else if (tamagoStats.getAge() <= 7) {\n return images.get(\"enfant\").get(\"evoli\");\n } else {\n return images.get(\"adulte\").get(\"noctali\");\n }\n }",
"@Override\r\n public List<Post> findAll() {\r\n List<Post> posts = new ArrayList<>();\r\n List<Map<String, Object>> rows = jdbcOp.queryForList(SQL_SELECT_ALL_TICKET);\r\n\r\n for (Map<String, Object> row : rows) {\r\n Post post = new Post();\r\n \r\n int id = (int)row.get(\"id\");\r\n post.setId(id); \r\n \r\n String customername = (String)row.get(\"customername\");\r\n post.setCustomerName(customername); \r\n \r\n String subject = (String)row.get(\"subject\");\r\n post.setSubject(subject);\r\n \r\n String body = (String)row.get(\"body\");\r\n post.setBody(body);\r\n \r\n String categories = (String)row.get(\"categories\");\r\n post.setCategories(categories);\r\n \r\n posts.add(post);\r\n }\r\n return posts;\r\n }",
"public String getTableCaption() {\n return \"The table title\";\n }",
"public List<Post> all() throws DataAccessException{\n String sql = \"select posts.id, posts.user_id, users.name, posts.title, posts.content, posts.create_date from posts join users on posts.user_id=users.id\";\n List<Post> posts = this.jdbcTemplate.query(sql, mapper);\n return posts;\n }",
"public InlineImage getInlineImage(\n )\n {return getBaseDataObject();}",
"List<Forumpost> selectByExampleWithBLOBs(ForumpostExample example);",
"private List<StorageAccPrefPageTableElement> getTableContent() {\n // loads data from preference file.\n AzureSettings.getSafeInstance(myProject).loadStorage();\n List<StorageAccount> strgList = StorageAccountRegistry.getStrgList();\n List<StorageAccPrefPageTableElement> tableRowElements = new ArrayList<StorageAccPrefPageTableElement>();\n for (StorageAccount storageAcc : strgList) {\n if (storageAcc != null) {\n StorageAccPrefPageTableElement ele = new StorageAccPrefPageTableElement();\n ele.setStorageName(storageAcc.getStrgName());\n ele.setStorageUrl(storageAcc.getStrgUrl());\n tableRowElements.add(ele);\n }\n }\n StorageAccPrefPageTableElements elements = new StorageAccPrefPageTableElements();\n elements.setElements(tableRowElements);\n return elements.getElements();\n }",
"public String getThumbnail();",
"public Image getFileDescriptionTabContentAsImage() {\r\n\t\treturn this.fileCommentTabItem.getContentAsImage();\r\n\t}",
"public String[] findPost(String username, int postid){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n String[] data = null;\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=? AND postid=?\");\n ps.setString(1, username);\n ps.setInt(2, postid);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n if(rs.next()){\n data = new String[2];\n data[0] = rs.getString(\"title\");\n data[1] = rs.getString(\"body\");\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"public Collection getPosts() throws DatabaseException;",
"public static void displayTableTitle()\r\n {\n }",
"Post getPostByID(long postId);",
"void insertDetailCaptionByPost(Detail detail);",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"void displayAllPosts();",
"public PdfPTable createTable() {\n\t\tPdfPTable t = new PdfPTable(2);\n\t\tt.setWidthPercentage(100);\n\t\tt.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\tt.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n\t\t// set up the table headers for albums\n\t\tif (state.equals(\"a\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell artistCell = new PdfPCell();\n\t\t\tartistCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase artist = new Phrase(\"Artist\", bold);\n\t\t\tartistCell.addElement(artist);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(artistCell);\n\t\t}\n\t\t// set up the table headers for publications\n\t\telse if (state.equals(\"p\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell devisorCell = new PdfPCell();\n\t\t\tdevisorCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase devisor = new Phrase(\"Devisor\", bold);\n\t\t\tdevisorCell.addElement(devisor);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(devisorCell);\n\t\t}\n\t\ttry {\n\t\t\tResultSet results = db.searchTableByName(table, \"\", true);\n\t\t\twhile(results.next()) {\n\t\t\t\t// add album info to table\n\t\t\t\tif (state.equals(\"a\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"artist\"));\n\t\t\t\t}\n\t\t\t\t// add publication info to table\n\t\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"devisor\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn t;\n\t}",
"public String getHeadimg() {\n return headimg;\n }",
"public String getHeadimg() {\n return headimg;\n }",
"public List<BlogPost> getPosts();",
"List<TargetTable> retrieveBackgroundTargetTable(TargetTable ttable);",
"private Table getHeaderForNewAssetTable(ManufacturingOrder dto) {\n\n\t\tTableHeaderData assetNumberHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Asset #\"));\n\t\tassetNumberHeaderData.addAttribute(\"style\", \"width: 22%\");\n\n\t\tTableHeaderData descriptionHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Description\"));\n\n\t\tTableHeaderData statusHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Active\"));\n\n\t\tArrayList<TableHeaderData> headers = new ArrayList<TableHeaderData>();\n\n\t\tif (dto.getEditFlag()) {\n\n\t\t\tTableHeaderData facilityHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Facility\"));\n\t\t\tfacilityHeaderData.addAttribute(\"style\", \"width:10%\");\n\n\t\t\tTableHeaderData workCenterHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Work Center\"));\n\t\t\tworkCenterHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\t\tTableHeaderData assetHeaderData = new TableHeaderData(\n\t\t\t\t\tnew SimpleText(\"Asset\"));\n\t\t\tassetHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\t\tstatusHeaderData.addAttribute(\"style\", \"width: 10%\");\n\t\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 30%\");\n\t\t\theaders.add(facilityHeaderData);\n\t\t\theaders.add(workCenterHeaderData);\n\t\t\theaders.add(assetHeaderData);\n\t\t\theaders.add(descriptionHeaderData);\n\t\t\theaders.add(statusHeaderData);\n\t\t} else {\n\t\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 30%\");\n\t\t\tstatusHeaderData.addAttribute(\"style\", \"width: 15%\");\n\n\t\t\theaders.add(assetNumberHeaderData);\n\t\t\theaders.add(descriptionHeaderData);\n\t\t\theaders.add(statusHeaderData);\n\n\t\t}\n\n\t\tTableHeader tableHeader = new TableHeader(headers);\n\t\ttableHeader.addAttribute(\"style\", \"text-align: center;\");\n\t\tTable table = new Table();\n\t\ttable.setTableHeader(tableHeader);\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 500px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\treturn table;\n\n\t}",
"private void getOGTag(String url){\n String imageUrl = null;\n String linkTitle = null;\n if (isValidURL(url)) {\n Document doc = null;\n\n try {\n doc = Jsoup.connect(url).get(); // -- 1. get방식의 URL에 연결해서 가져온 값을 doc에 담는다.\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n Elements titles = doc.select(\"meta\"); // -- 2. doc에서 selector의 내용을 가져와 Elemntes 클래스에 담는다.\n for(Element element: titles) { // -- 3. Elemntes 길이만큼 반복한다.\n if(element.attr(\"property\").equals(\"og:image\"))\n imageUrl = element.attr(\"content\");\n if(element.attr(\"property\").equals(\"og:title\"))\n linkTitle = element.attr(\"content\");\n System.out.println(element.attr(\"content\")); // -- 4. 원하는 요소가 출력된다.\n }\n }\n else{\n imageUrl = \"https://github.com/HGUMOA/MOA/blob/master/app/src/main/res/drawable-xxhdpi/logosmall.png?raw=true\";\n linkTitle = \" \";\n }\n\n if(imageUrl == null)\n imageUrl = \"https://github.com/HGUMOA/MOA/blob/master/app/src/main/res/drawable-xxhdpi/logosmall.png?raw=true\";\n\n if(linkTitle == null)\n linkTitle = \" \";\n\n stuffRoomInfo.setImageUrl(imageUrl);\n stuffRoomInfo.setOgTitle(linkTitle);\n }",
"public String printImage() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"ID:\" + this.id + \"; Data:\\n\");\n\n for (int i = 1; i <= this.data.length; i++) {\n T t = data[i - 1];\n builder.append(t.toString() + \" \");\n if (i % 28 == 0) {\n builder.append(\"\\n\");\n }\n }\n return builder.toString().replace('0', ' ');\n }",
"public PagedList<Post> getTimeline() {\n return this.getTimeline(null);\n }",
"private Object[][] getTableData() {\n Object[][] lclArray = null;\n\n if (articles.size() == 0) {\n lclArray = new Object[1][NUM_COLS];\n lclArray[0][0] = \"\";\n lclArray[0][1] = \"\";\n lclArray[0][2] = \"\";\n return lclArray;\n } // no articles yet !!!!\n if (articles != null) {\n lclArray = new Object[articles.size()][NUM_COLS];\n }\n for (int i = 0; i < articles.size(); i++) {\n NewsArticle article = (NewsArticle) articles.elementAt(i);\n\n lclArray[i][0] = article.getSubject();\n lclArray[i][1] = String.valueOf(article.getScore(filterType));\n lclArray[i][2] = article.getUserRating();\n }\n return lclArray;\n }",
"public List<PropertyImages> findWhereTitleEquals(String title) throws PropertyImagesDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(\"SELECT ID, TITLE, TYPE, SIZE, SRC_URL, PROPERTY_DATA_UUID FROM \" + getTableName() + \" WHERE TITLE = ? ORDER BY TITLE\", this,title);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new PropertyImagesDaoException(\"Query failed\", e);\n\t\t}\n\t\t\n\t}",
"public Image getImage(T anItem) { return null; }",
"public String getTabledesc() {\n return tabledesc;\n }",
"@Override\r\n\tpublic blog_tb_blog getFirstEntity() throws Exception {\n\t\tString sql = \"select * from blog_tb_blog where blogIsDisabled=0 limit 0,1\";\r\n\t\tResultSet rs = this.getIDbHelper().GetResultSet(sql);\r\n\t\tblog_tb_blog blog = EntityHelper.getEntity(blog_tb_blog.class, rs);\r\n\t\tthis.getIDbHelper().closeResultSet(rs);\r\n\t\t\r\n\t\treturn blog;\r\n\t}",
"@Override\n\tpublic List<Historic_siteVO> readThemaImage(int bno) throws Exception {\n\t\treturn dao.readThemaImage(bno);\n\t}",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn String.format(\"#%1$d *%2$s* (%3$s@doc): %4$s\\n%5$s\",\n\t\t\t id, poster_name, poster_uid, title,\n\t\t\t mlong.replaceAll(\"</?(br|BR)( ?/)?>\", \"\").replaceAll(\"</?(p|P) ( ?/)?>\", \"\\n\")\n\t\t\t);\n\t\t}",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"private WebElement getTHead() {\r\n\t\tif (null == this.thead) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.thead = this.findElement(By.xpath(HtmlTags.THEAD));\r\n\t\t\t}\r\n\t\t\tcatch (NotFoundException ex) {\r\n\t\t\t\tif (this.logger.isDebugEnabled()) {\r\n\t\t\t\t\tthis.logger.debug(ex.getMessage(), ex);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.thead;\r\n\t}",
"@Transactional\n\tpublic List<PostComment> findAll(ForumPost forumPost){\n\t\tQuery q = entityManager.createQuery(\"SELECT pc FROM PostComment pc WHERE pc.forumPost = :forumPost\");// \"SELECT p FROM Photo p WHERE p.name = :name\";\n\t\tq.setParameter(\"forumPost\", forumPost);\n\t\t\n//\t\tif (!q.getResultList().isEmpty())\n//\t\t\tphoto = (Photo)q.getResultList().get(0);\n//\t\treturn photo;\n\n\t\treturn (List<PostComment>)q.getResultList();\n\t}",
"public static ResultSet getAllItem() {\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT itemID, ownerID, Name, status, description,category,image1,image2,image3,image4 FROM iteminformation\");\n return rs;\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"List<Post> findAll();",
"public String getSrc(String index) {\n String src = null;\n try {\n Document doc = Jsoup.connect(index).get();\n Element comic_body = doc.select(\"div#comic\").get(0);\n src = \"http://www.sandraandwoo.com\" + comic_body.select(\"img\").get(0).attr(\"src\");\n } catch (Exception ex) {ex.printStackTrace();}\n return src;\n }",
"private ArrayList<BrowsePosts> getDataSet() {\n String[] projection = {\n Posts.PostEntry.COLUMN_NAME_TITLE,\n Posts.PostEntry.COLUMN_NAME_PRICE,\n Posts.PostEntry.COLUMN_NAME_PHOTO_DIR,\n Posts.PostEntry.COLUMN_NAME_DESCRIPTION,\n Posts.PostEntry.COLUMN_NAME_ADDRESS,\n };\n\n // How you want the results sorted in the resulting Cursor\n String sortOrder =\n Posts.PostEntry.COLUMN_NAME_PRICE + \" DESC\";\n\n Cursor cursor = db.query(\n Posts.PostEntry.TABLE_NAME, // The table to query\n projection, // The columns to return\n null, // The columns for the WHERE clause\n null, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n sortOrder // The sort order\n );\n\n ArrayList<BrowsePosts> browsePosts = new ArrayList<BrowsePosts>();\n if (cursor.moveToFirst()) {\n do {\n browsePosts.add(new BrowsePosts(\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_TITLE)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_PRICE)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_PHOTO_DIR)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_DESCRIPTION)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_ADDRESS))));\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n\n return browsePosts;\n }",
"private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\n\t}",
"public String getData() {\n\t\t\tString[] columns = new String[] { KEY_ID, KEY_IMAGE, KEY_NAME ,KEY_DES};\n\t\t\tCursor c = ourDatabase.query(DATABASE_NAME, columns, null, null, null, null, null);\n\t\t\tString result = \"\";\n\n\t\t\tint irow = c.getColumnIndex(KEY_ID);\n\t\t\tint iimg = c.getColumnIndex(KEY_IMAGE);\n\t\t\tint iname = c.getColumnIndex(KEY_NAME);\n\t\t\tint ides = c.getColumnIndex(KEY_DES);\n\n\t\t\tfor (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {\n\t\t\t\tresult = result + c.getString(irow) + \" \"+c.getString(iimg) + \" \"+c.getString(iname) + \" \"+c.getString(ides) + \" \"+\"\\n\";\n\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}",
"private JSONArray getBlogItems(){\n String reqUrl = \"https://www.tistory.com/apis/post/list\";\n String data = String.format(\"access_token=%s&output=%s&blogName=%s&count=%d\"\n ,blog.getAccess_token(),\"json\",blog.getBlogName(),itemCnt);\n try{\n HttpURLConnection conn = initConnGET(reqUrl,data);\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n if (conn.getResponseCode() == conn.HTTP_OK) {\n InputStreamReader isr = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n BufferedReader reader = new BufferedReader(isr);\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n reader.close();\n }\n conn.disconnect();\n JSONArray items = new JSONObject(builder.toString())\n .getJSONObject(\"tistory\")\n .getJSONObject(\"item\")\n .getJSONArray(\"posts\");\n return items;\n }catch(Exception err){\n return null;\n }\n }",
"public String getHtml(PbReturnObject retObj) {\n\r\n StringBuilder tableBuilder = new StringBuilder();\r\n// \r\n// \r\n //try\r\n {\r\n\r\n // retObj = execSelectSQL(sqlQuery);\r\n if (retObj != null && retObj.getRowCount() > 0) {\r\n tableBuilder = tableBuilder.append(\"<table class=\\\"tablesorter\\\" border =1 cellpadding=1 cellspacing=1> \");\r\n tableBuilder.append(\"<tr>\");\r\n for (int iloop = 0; iloop < CrossTabfinalOrder.size(); iloop++) {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(CrossTabfinalOrder.get(iloop)).append(\"</td>\");\r\n }\r\n tableBuilder.append(\"</tr>\");\r\n for (int iloop = 0; iloop < finalColViewSortedValues.length; iloop++) {\r\n tableBuilder.append(\"<tr>\");\r\n for (int k = 0; k < rowViewCount; k++) {\r\n// ArrayList a =nonViewByMapNew.get(retObj.getColumnNames()[k]);\r\n// if(a!=null){\r\n// tableBuilder=tableBuilder.append(\"<td>\").append(a.toString()).append(\"</td>\");\r\n// }else\r\n tableBuilder = tableBuilder.append(\"<td>\").append(retObj.getColumnNames()[k]).append(\"</td>\");\r\n }\r\n\r\n for (int k = 0; k < finalColViewSortedValues[iloop].size(); k++) {\r\n if (finalColViewSortedValues[iloop].get(k) != null) {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(finalColViewSortedValues[iloop].get(k)).append(\"</td>\");\r\n } else {\r\n tableBuilder = tableBuilder.append(\"<td>\").append(\"SubTotal\").append(\"</td>\");\r\n }\r\n }\r\n// for(int k=rowViewCount+finalColViewSortedValues[0].size();k<retObj.getColumnCount();k++){\r\n// tableBuilder=tableBuilder.append(\"<td>\").append(retObj.getColumnNames()[k]).append(\"</td>\");\r\n// }\r\n\r\n tableBuilder.append(\"</tr>\");\r\n }\r\n// \r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n tableBuilder.append(\"<tr>\");\r\n for (int j = 0; j < CrossTabfinalOrder.size() + rowViewCount; j++) {\r\n if (retObj.getFieldValue(i, j) != null) {\r\n if (j < rowViewCount) {\r\n tableBuilder.append(\"<td>\").append(retObj.getFieldValueString(i, j)).append(\"</td>\");\r\n } else {\r\n //\r\n tableBuilder.append(\"<td>\").append(retObj.getFieldValueString(i, CrossTabfinalOrder.get(j - rowViewCount).toString())).append(\"</td>\");\r\n\r\n }\r\n } else {\r\n tableBuilder.append(\"<td>\").append(\"--\").append(\"</td>\");\r\n }\r\n\r\n }\r\n tableBuilder.append(\"</tr>\");\r\n }\r\n tableBuilder.append(\"</table>\");\r\n }\r\n }\r\n// catch (Exception ex) {\r\n// logger.error(\"Exception:\",ex);\r\n// \r\n// }\r\n// \r\n return tableBuilder.toString();\r\n }",
"public Object [][] getTableData(int rowNumber, String title, String author, URL hyperLink, int year, String abstracts, String publisher, boolean isMark, boolean duplicate, int idPub){\r\n\t\t\r\n\t\tObject [][] data = {addTableData(rowNumber, title, author, hyperLink, year, abstracts, publisher, isMark, duplicate, idPub)};\r\n\t\t\r\n\t\treturn data;\r\n\t\t\r\n\t}",
"List<Share> findByPost(Post post);",
"public String getTable()\n {\n return table;\n }",
"@Override\r\n\tpublic List<Blog> findTitle(String ti) {\n\t\tList<Blog> list = this.getBlogDao().findAll();\r\n\t\tList<Blog> list1 = new ArrayList<Blog>();\r\n\t\tfor(Blog b:list){\r\n\t\t\tif(b.getTitle().contains(ti)){\r\n\t\t\t\tlist1.add(b);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list1;\r\n\t}",
"private void loadPostInfo() {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Posts\");\n Query query = ref.orderByChild(\"pId\").equalTo(postId);\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n //keep checking post until get the required post\n for (DataSnapshot ds: dataSnapshot.getChildren()){\n pVideo = \"\"+ ds.child(\"pVideo\").getValue();\n String pVideoCover = \"\"+ ds.child(\"videoCover\").getValue();\n pLikes = \"\"+ ds.child(\"pLikes\").getValue();\n String pTimestamp = \"\"+ ds.child(\"pTime\").getValue();\n hisDp = \"\"+ ds.child(\"uImage\").getValue();\n hisUid = \"\"+ ds.child(\"uid\").getValue();\n hisName = \"\"+ ds.child(\"uName\").getValue();\n String commentCount = \"\"+ ds.child(\"pComments\").getValue();\n\n //convert timestamp\n Calendar cal = Calendar.getInstance(Locale.FRENCH);\n cal.setTimeInMillis(Long.parseLong(pTimestamp));\n String pTime = DateFormat.format(\"dd/MM/yyyy HH:mm \",cal).toString();\n\n uNameTv.setText(hisName);\n pLikesTv.setText(pLikes + getString(R.string.like));\n pTimeTv.setText(pTime);\n pCommentTv.setText(commentCount + \" \"+getString(R.string.comment));\n\n HttpProxyCacheServer proxy = getProxy(getApplicationContext());\n proxyUrl = proxy.getProxyUrl(pVideo);\n\n prepareVideoPlayer(proxyUrl);\n\n Glide.with(getApplicationContext())\n .asBitmap()\n .load(pVideoCover)\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(video_cover);\n\n //set User image\n Glide.with(getApplicationContext())\n .asBitmap()\n .load(hisDp)\n .placeholder(R.drawable.profile_image)\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(uPictureIv);\n\n shareBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n sharePostVideoOnly(pVideo,postId);\n\n }\n });\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n playVideo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n prepareVideoPlayer(proxyUrl);\n }\n });\n }",
"@Override\r\n\tpublic List<Post> getPostByName(String name) {\n\t\tString hql = \"from Post p where p.post_name =?\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql, name);\r\n\t}",
"public String getHeadImg() {\n return headImg;\n }",
"Optional<Post> getPost(String postId) throws Exception;",
"public String getBody()\n throws SQLException\n {\n DBMetaData md = MetaData.getDbMetaData( datasource );\n// String[] types = {\"TABLE\", \"VIEW\"};\n ArrayList tableList = new ArrayList();\n tableList = ( ArrayList ) md.getAllTableMetaData();\n /*\n * Produce the table names with the appropriately labeled checkboxs\n */\n StringBuffer buffer = new StringBuffer();\n String tableName;\n String inputType = \"hidden\";\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"\\n<tr><td colspan=\\\"3\\\">\" );\n buffer.append( \"<b>Select Tables to be Used:</b></td></tr>\" );\n inputType = \"checkbox\";\n }\n\n for ( int i = 0; i < tableList.size(); i++ )\n {\n TableMetaData table = ( TableMetaData ) tableList.get( i );\n tableName = table.getName();\n\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"\\n<tr>\" );\n buffer.append( \"<td width=7 align='center'>\" );\n }\n buffer.append( \"<input type='\" + inputType + \"' name='\" + FormTags.TABLE_TAG + \"' value='\" + tableName + \"'></td>\" );\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"<td>\" + tableName + \"</td>\" );\n buffer.append( \"<td>\" + table.getComments() + \"</td>\" );\n buffer.append( \"</tr>\" );\n }\n }\n\n return buffer.toString();\n }",
"public CellTable<Attribute> getTable() {\n\n\t\tretrieveData();\n\n\t\t// Table data provider.\n\t\tdataProvider = new ListDataProvider<Attribute>(list);\n\n\t\t// Cell table\n\t\ttable = new PerunTable<Attribute>(list);\n\n\t\t// Connect the table to the data provider.\n\t\tdataProvider.addDataDisplay(table);\n\n\t\t// Sorting\n\t\tListHandler<Attribute> columnSortHandler = new ListHandler<Attribute>(dataProvider.getList());\n\t\ttable.addColumnSortHandler(columnSortHandler);\n\n\t\t// set empty content & loader\n\t\ttable.setEmptyTableWidget(loaderImage);\n\n\t\t// checkbox column column\n\t\tif (checkable) {\n\t\t\t// table selection\n\t\t\ttable.setSelectionModel(selectionModel, DefaultSelectionEventManager.<Attribute> createCheckboxManager(0));\n\t\t\ttable.addCheckBoxColumn();\n\t\t}\n\n\t\t// Create ID column.\n\t\ttable.addIdColumn(\"Attr ID\", null, 90);\n\n\t\t// Name column\n\t\tColumn<Attribute, Attribute> nameColumn = JsonUtils.addColumn(new PerunAttributeNameCell());\n\n\t\t// Description column\n\t\tColumn<Attribute, Attribute> descriptionColumn = JsonUtils.addColumn(new PerunAttributeDescriptionCell());\n\n\t\t// Value column\n\t\tColumn<Attribute, Attribute> valueColumn = JsonUtils.addColumn(new PerunAttributeValueCell());\n\t\tvalueColumn.setFieldUpdater(new FieldUpdater<Attribute, Attribute>() {\n\t\t\tpublic void update(int index, Attribute object, Attribute value) {\n\t\t\t\tobject = value;\n\t\t\t\tselectionModel.setSelected(object, object.isAttributeValid());\n\t\t\t}\n\t\t});\n\n\t\t// updates the columns size\n\t\tthis.table.setColumnWidth(nameColumn, 200.0, Unit.PX);\n\n\t\t// Sorting name column\n\t\tnameColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(nameColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_NAME));\n\n\t\t// Sorting description column\n\t\tdescriptionColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(descriptionColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_DESCRIPTION));\n\n\t\t// Add sorting\n\t\tthis.table.addColumnSortHandler(columnSortHandler);\n\n\t\t// Add the columns.\n\t\tthis.table.addColumn(nameColumn, \"Name\");\n\t\tthis.table.addColumn(valueColumn, \"Value\");\n\t\tthis.table.addColumn(descriptionColumn, \"Description\");\n\n\t\treturn table;\n\n\t}",
"public Iterable<Post> findAll(){\n return postDao.findAll();\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();"
]
| [
"0.5784596",
"0.5781416",
"0.5672388",
"0.5599269",
"0.55123734",
"0.5495105",
"0.54564536",
"0.5401979",
"0.5356328",
"0.5345933",
"0.53019387",
"0.525794",
"0.52047634",
"0.5175265",
"0.51378095",
"0.5113471",
"0.5094166",
"0.5076752",
"0.5058223",
"0.5027025",
"0.5015868",
"0.4995147",
"0.4987185",
"0.49660325",
"0.4962644",
"0.49472314",
"0.49379373",
"0.49300388",
"0.49249604",
"0.49179",
"0.48897576",
"0.48725945",
"0.48703557",
"0.48695934",
"0.48605558",
"0.4853026",
"0.48483822",
"0.48460957",
"0.48397446",
"0.48325706",
"0.4829092",
"0.4824048",
"0.48100254",
"0.47742942",
"0.4771298",
"0.47699645",
"0.47547218",
"0.47253832",
"0.47232673",
"0.4715091",
"0.47113314",
"0.47080344",
"0.47053182",
"0.46936065",
"0.46910343",
"0.46865436",
"0.46776608",
"0.46495682",
"0.46475723",
"0.4631892",
"0.46281275",
"0.4614586",
"0.460985",
"0.460985",
"0.46048",
"0.4602775",
"0.45832992",
"0.4557415",
"0.45534405",
"0.45503405",
"0.45424834",
"0.4538608",
"0.45331037",
"0.4533081",
"0.45295015",
"0.45203772",
"0.45200822",
"0.4519315",
"0.45180908",
"0.45175198",
"0.45059925",
"0.45048404",
"0.45047948",
"0.45015064",
"0.45010567",
"0.44984254",
"0.4497968",
"0.44955093",
"0.44812897",
"0.44790637",
"0.44785666",
"0.4477789",
"0.44710213",
"0.44625333",
"0.44617242",
"0.445937",
"0.4455121",
"0.44541952",
"0.44531387",
"0.44509366",
"0.44485298"
]
| 0.0 | -1 |
help to interact with database | public interface OnDatabaseInteractionListener {
void onResultPostTable(Cursor result); // this method'll return cursor after query post table.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void connectDatabase(){\n }",
"DBConnect() {\n \n }",
"private void getDatabase(){\n\n }",
"private void executeQuery() {\n }",
"public static void main(String[] args) {\n Connection conection = createConnection(\"people.db\");\n \n try {\n conection.createStatement().executeQuery(\"SELECT * FROM people\");\n \n } catch (SQLException ex) {\n System.out.println(\"PRINT AN ERROR HERE\");\n }\n}",
"void runQueries();",
"private void ini_SelectDB()\r\n\t{\r\n\r\n\t}",
"Object getDB();",
"public DataHandlerDBMS() {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tDBMS = DriverManager.getConnection(url);\n\t\t\tSystem.out.println(\"DBSM inizializzato\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Errore apertura DBMS\");\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Assenza driver mySQL\");\n\t\t}\n\t}",
"private void view() {\n\n\t\ttry {\n\t\t\tString databaseUser = \"blairuser\";\n\t\t\tString databaseUserPass = \"password!\";\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tConnection connection = null;\n\t\t\tString url = \"jdbc:postgresql://13.210.214.176/test\";\n\t\t\tconnection = DriverManager.getConnection(url, databaseUser, databaseUserPass);\n//\t\t\tStatement s = connection.createStatement();\n\t\t\ts = connection.createStatement();\n\t\t\tResultSet rs = s.executeQuery(\"select * from account;\");\n\t\t\t// while (rs.next()) {\n\t\t\tString someobject = rs.getString(\"name\") + \" \" + rs.getString(\"password\");\n\t\t\tSystem.out.println(someobject);\n\t\t\toutput.setText(someobject);\n\t\t\t// output.setText(rs);\n\t\t\t// System.out.println(rs.getString(\"name\")+\" \"+rs.getString(\"message\"));\n\t\t\t// rs.getStatement();\n\t\t\t// }\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\tPostgresJDBC();\n\t}",
"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}",
"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 static void main(String[] args) {\n Manager m = new Manager();\n Connection con = m.connect(\"localhost\",\"users\",\"postgres\",\"corewars\");\n //String[] elems = {\"login\",\"password\"};\n //DefaultTableModel users = m.getTable(con, \"SELECT * FROM users_info;\");\n List<String[]> response = m.getTableAsList(con, \"SELECT * FROM users_info;\");\n for( String[] row: response ){\n for( String s: row ){\n System.out.print( \" \" + s );\n }\n System.out.println();\n }\n System.out.println(response.get(0)[1]);\n //users.setColumnIdentifiers(new String[] {\"userID\", \"Value\"});\n //System.out.println(users.getColumnName(0));\n //m.ask(con, \"SELECT login,password FROM users_info WHERE user_id=3;\",elems);\n m.closeConnection(con);\n }",
"@ActionKey(\"db\")\n\tpublic void testDB() {\n\t\tUser user = User.dao.findById(1, \"qword_id\");\n\t\trenderText(\"data in database:\" + user.getStr(\"qword_id\"));\n\t\t\n\t}",
"private void dbConn()\n {\n\ttry\t\t\n\t{\t\n\t\t\t// driver to use with named database\n\t\tString url = \"jdbc:ucanaccess://c:/AH/AthloneHospital.mdb\";\n \n\t\t\t// connection represents a session with a specific database\n\t\tcon = DriverManager.getConnection(url);\n\n\t\t\t// stmt used for executing sql statements and obtaining results\n\t\tstmt = con.createStatement();\n\n\t\trs = stmt.executeQuery(\"SELECT * FROM Login\");\n\n\t\twhile(rs.next())\t// count number of rows in table\n\t\t\tcount++;\n\t\trs.close();\n System.out.println(\"Success!!!!\");\n\t}\n\tcatch(Exception e) { System.out.println(\"Error in start up......\");}\n }",
"private Connection dbacademia() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private void open_db() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\"); \n Con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/projectlaundry\",\"root\",\"\");\n stm = Con.createStatement();\n }\n catch (Exception e){\n JOptionPane.showMessageDialog(null,\"Koneksi gagal\");\n System.out.println(e.getMessage());\n }\n }",
"public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}",
"public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}",
"public void dbConnection()\n {\n\t try {\n\t \t\tClass.forName(\"org.sqlite.JDBC\");\n // userName=rpanel.getUserName();\n String dbName=userName+\".db\";\n c = DriverManager.getConnection(\"jdbc:sqlite:database/\"+dbName);\n }\n //catch the exception\n catch ( Exception e ) \n { \n System.err.println( \"error in catch\"+e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\t if(c!=null)\n\t {\n System.out.println(\"Opened database successfully\");\n\t System.out.println(c);\n createData();\n\t}\n }",
"public interface Database {\n\n /**\n * connect mongo\n */\n public void connect();\n\n\n public void load();\n\n\n /**\n * close connection\n */\n public void close();\n\n\n\n}",
"public void conectionSql(){\n conection = connectSql.connectDataBase(dataBase);\n }",
"private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\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 }",
"public static void main(String[] args) {\n\t\tConnection con=DBConnection.getConnection();\r\n\t\tSystem.out.println(con);\r\n\t\t \r\n\t}",
"public static void main(String[] args) {\n try (\n Connection connection = DriverManager.getConnection(DB_URL, USER, PASSWORD);\n Statement statement = connection.createStatement()\n ) {\n try (ResultSet resultSet = statement.executeQuery(\"SELECT name FROM USERS\")) {\n while (resultSet.next()) {\n System.out.println(\"Object found\");\n }\n }\n } catch (SQLException e) {\n System.err.println(\"Something went wrong\");\n e.printStackTrace();\n }\n }",
"public void promptDBCreds()\n\t{\n\t\ttse.startDatabase();\n\t\t\n\t}",
"private void setupDB(){\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n String url = \"jdbc:oracle:thin:@localhost:1521:orcl\";\n String username = \"sys as sysdba\"; //Provide username for your database\n String password = \"oracle\"; //provide password for your database\n\n con = DriverManager.getConnection(url, username, password);\n }\n catch(Exception e){\n System.out.println(e);\n }\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private DAOOfferta() {\r\n\t\ttry {\r\n\t\t\tClass.forName(driverName);\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(createQuery);\r\n\r\n\t\t\tps.executeUpdate();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ConnectionException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*closeResource()*/;\r\n\t\t}\r\n\t}",
"public void setDatabase(Connection _db);",
"public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}",
"public abstract ODatabaseInternal<?> openDatabase();",
"DBCursor execute();",
"private void GetData(){\n try {\n Connection conn =(Connection)app.pegawai.Database.koneksiDB();\n java.sql.Statement stm = conn.createStatement();\n java.sql.ResultSet sql = stm.executeQuery(\"select * from user\");\n data.setModel(DbUtils.resultSetToTableModel(sql));\n\n }\n catch (SQLException | HeadlessException e) {\n }\n}",
"public static void main(String[] args) throws SQLException {\n\t\n\t\tDocumentDAO y = new DocumentDAO();\n\tObservableList<Document> listeDoc= (new DocumentDAO()).findall();\n\tSystem.out.println(listeDoc.get(0));\n\t\t\n\t\t//VisiteurDAO v = new VisiteurDAO();\n\t//<Visiteur> idVisiteur = v.findById(\"a131\");\n\t\t\n\t\n\t\n\t}",
"public void connectDB() {\n\t\tSystem.out.println(\"CONNECTING TO DB\");\n\t\tSystem.out.print(\"Username: \");\n\t\tusername = scan.nextLine();\n\t\tConsole console = System.console(); // Hides password input in console\n\t\tpassword = new String(console.readPassword(\"Password: \"));\n\t\ttry {\n\t\t\tDriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t} catch(Exception Ex) {\n\t\t\tSystem.out.println(\"Error connecting to database. Machine Error: \" + Ex.toString());\n\t\t\tEx.printStackTrace();\n\t\t\tSystem.out.println(\"\\nCONNECTION IS REQUIRED: EXITING\");\n\t\t\tSystem.exit(0); // No need to make sure connection is closed since it wasn't made\n\t\t}\n\t}",
"private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }",
"Query query();",
"public static void main(String[] args) {\n Connection conn = null;\n Statement s;\n ResultSet rs = null;\n String dbName = \"myDB\";\n String url = protocol + dbName + \";create=true\";\n\n try {\n // create a connection object\n conn = DriverManager.getConnection(url);\n // somewhere to put our SQL statements\n s = conn.createStatement();\n // declare some SQL statements\n String createTable = \"CREATE TABLE MYTABLE ( ID INT PRIMARY KEY, NAME VARCHAR(12) )\";\n String insertData = \"INSERT INTO MYTABLE VALUES (10, 'TEN'), (20, 'TWENTY'), (30, 'THIRTY')\";\n String readData = \"SELECT * FROM MYTABLE\";\n String dropTable = \"DROP TABLE MYTABLE\";\n\n // execute SQL statements\n s.execute(createTable);\n s.execute(insertData);\n rs = s.executeQuery(readData);\n while (rs.next()){\n // get values as int, string etc.\n System.out.println(rs.getInt(1) + \"\\t\" + rs.getString(2));\n }\n\n // drop the table\n s.execute(dropTable);\n\n }\n catch(SQLException sqle) {\n System.out.println(sqle);\n }\n finally {\n\n }\n\n\n\n\n\n\n\n\n\n }",
"public void connect() throws NamingException, SQLException {\n if (con != null) disconnect();\n try {\n \tString url = \"jdbc:postgresql://localhost/stocksim\";\n \tProperties props = new Properties();\n props.setProperty(\"user\", \"ubuntu\");\n props.setProperty(\"password\", \"reverse\");\n con = DriverManager.getConnection(url, props);\n \n // Prepare statements:\n for (PreparedStatementID i: PreparedStatementID.values()) {\n PreparedStatement preparedStatement = con.prepareStatement(i.sql);\n _preparedStatements.put(i, preparedStatement);\n }\n } catch (SQLException e) {\n if (con != null) disconnect();\n throw e;\n }\n }",
"static void dataToevoegen(String querry) {\n try {\n Statement stmt = connectieMaken().createStatement(); //\n stmt.execute(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n }",
"public interface DatabaseAccessInterface {\n\t\n\t/**\n\t * Closes the database connection.\n\t * @throws SQLException\n\t */\n\tpublic void closeConnection() throws SQLException;\n\t\n\t/**\n\t * Registers the action on Raspberry Pi into database.\n\t * @param rpiId\n\t * @param time\n\t * @param action\n\t * @param level\n\t * @throws SQLException\n\t */\n\tpublic void addRpiAction(String rpiId, String time, String action, String level) throws SQLException;\n\t\n\t/**\n\t * Adds photo to the database.\n\t * @param rpiId\n\t * @param time\n\t * @param name\n\t * @param photo\n\t * @throws SQLException\n\t */\n\tpublic void addRpiPhoto(String rpiId, String time, String name, byte[] photo) throws SQLException, IOException;\n\t\n\t/**\n\t * Registers the user for the given Raspberry Pi.\n\t * @param rpiId\n\t * @param user\n\t * @throws SQLException\n\t */\n\tpublic void addRpiUserRelation(String rpiId, String user) throws SQLException;\n\t\n\t\n\t/**\n\t * Adds user credentials to the database.\n\t * @param login\n\t * @param password\n\t */\n\tpublic void addUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Adds user token for communication authorization with the token.\n\t * @param login\n\t * @param token\n\t */\n\tpublic void addUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Deletes photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @throws SQLException\n\t */\n\tpublic void deleteRpiPhoto(String rpiId, String time) throws SQLException;\n\t\n\t/**\n\t * Deletes user credentials and all data connected to the user from the database.\n\t * @param login\n\t */\n\tpublic void deleteUserCredentials(String login) throws SQLException;\n\t\n\t/**\n\t * Returns the time of most recent action on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic String getLatestDateOnActions(String rpiId) throws SQLException, IOException;\n\t\n\t/**\n\t * Returns the time of most recent photo on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date String\n\t * @throws SQLException\n\t */\n\tpublic String getLatestDateOnPhotos(String rpiId) throws SQLException;\n\t\n\t/**\n\t * Gets the photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @return byte array\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent photos before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfDates\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhotoTimesBefore(String rpiId, String time, int numberOfDates) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent actions before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfActions\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getRpiActionsBefore(String rpiId, String time, int numberOfActions) throws SQLException, IOException;\n\t\n\t/**\n\t * Retrieves information about user and Rpi relation.\n\t * @param user\n\t * @return Rpi ID for the given user\n\t * @throws SQLException\n\t */\n\tpublic String getRpiByUser(String user) throws SQLException;\n\t\n\t/**\n\t * Gets the user, which is identified be the token.\n\t * @param token\n\t * @return user name or empty string, if the user does not exist.\n\t */\n\tpublic String getUserByToken(String token) throws SQLException;\n\t\n\t\n\t/**\n\t * Validates user's login and password.\n\t * @param login\n\t * @param password\n\t * @return true, if data are valid, false otherwise.\n\t */\n\tpublic boolean validateUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Validates user's token for communication.\n\t * @param login\n\t * @param token\n\t * @return true, if token is valid, false otherwise.\n\t */\n\tpublic boolean validateUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Validates that such Raspberry Pi is registered.\n\t * @param rpiId\n\t * @return true, if such id exists in the database and device is active.\n\t */\n\tpublic boolean verifyRpiRegistration(String rpiId) throws SQLException;\n\t\n}",
"DatabaseSession openSession();",
"private void connectToDB() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n this.conn = DriverManager.getConnection(prs.getProperty(\"url\"),\n prs.getProperty(\"user\"), prs.getProperty(\"password\"));\n } catch (SQLException e1) {\n e1.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"DatabaseController() {\n\n\t\tloadDriver();\n\t\tconnection = getConnection(connection);\n\t}",
"public void connect() {\n\n DatabaseGlobalAccess.getInstance().setEmf(Persistence.createEntityManagerFactory(\"PU_dashboarddb\"));\n DatabaseGlobalAccess.getInstance().setEm(DatabaseGlobalAccess.getInstance().getEmf().createEntityManager());\n DatabaseGlobalAccess.getInstance().getDatabaseData();\n DatabaseGlobalAccess.getInstance().setDbReachable(true);\n }",
"public static void main(String[] args) throws SQLException {\n\t\tPruebaConnOracle conecta = new PruebaConnOracle();\r\n\t\tconecta.getConexion();\r\n\t\tconecta.banner(); \r\n\t}",
"public void CDatabase()\r\n\t{\n\t\ttry{\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tConnection con=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"12345\");\r\n\t\t\tStatement stmt=con.createStatement();\r\n\t\t\tResultSet rs=stmt.executeQuery(\"select * from StudentsList\");\r\n\t\t\tNames.clear();\r\n\t\t\t//Names1.clear();\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\t\tNames.add(rs.getString(1));\t\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\te.printStackTrace();\t\r\n\t\t\t}\r\n\t}",
"private Connection database() {\n Connection con = null;\n String db_url = \"jdbc:mysql://localhost:3306/hospitalms\";\n String db_driver = \"com.mysql.jdbc.Driver\";\n String db_username = \"root\";\n String db_password = \"\";\n \n try {\n Class.forName(db_driver);\n con = DriverManager.getConnection(db_url,db_username,db_password);\n } \n catch (SQLException | ClassNotFoundException ex) { JOptionPane.showMessageDialog(null,ex); }\n return con;\n }",
"public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}",
"abstract protected DatabaseResponse<E> executeOperation( Connection connection ) throws LauncherPersistenceException;",
"public static void main(String[] args){\n\r\n StringDB Database = new StringDB();\r\n Database.execute(\"INSERT INTO teachers VALUES ( 'Martin_Aumüller' , 'maau' ) ;\");\r\n\r\n\r\n\r\n }",
"public static void main(String[] args) throws IOException, SQLException {\n Connection con = connect(\"jdbc:mysql://mysql1:3306/world?\" + \"user=root&password=example\");\n\n /**\n * END OF DATABASE CONNECTION CODE\n */\n\n /**\n * this list is used to store SQL queries\n */\n List<SQLquery> queries = updateQueryList();\n\n /**\n * this piece of code is used to run all available SQL queries\n */\n for (SQLquery query : queries) {\n System.out.println(query.name);\n System.out.println(query.sql);\n System.out.println(getQueryResult(query, con));\n }\n\n /**\n * at the end of main, close database connection\n */\n if (con != null)\n {\n try\n {\n // Close database connection\n con.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error closing connection to database\");\n }\n }\n\n }",
"public static void main(String[] args)\n\t{\n\t\t\n\t\tMySQL mySQL = new MySQL();\n\t\tmySQL.setAddress(\"localhost\");\n\t\tmySQL.setPort(3306);\n\t\tmySQL.setUsername(\"luke\");\n\t\tmySQL.setPassword(\"123\");\n\t\tmySQL.setDatabaseName(\"user_system\");//Name of data base\n\t\t\n\t\tString cmdStr = \"\";\n\t\t//initial\n\t\tif( mySQL.initial() == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t}\t\t\n\t\t\n\t\tSystem.out.println(\"Connecting to SQL\");\n\t\tif( mySQL.connectToMySQL() == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t}\t\n\t\t\n\t\t//create table\n\t\tcmdStr = \"create table mytable(name char(10),id int);\";\n\t\tif( mySQL.insertData_raw(cmdStr) == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t\treturn;\t\t\t\t\n\t\t}\t\t\n\t\tSystem.out.println(\"create table finished\");\n\t\t\n\t\t//insert Value by raw cmd\n\t\tString name = \"Hello\";\n\t\tString idStr = \"1\";\n\t\tcmdStr = \"insert into mytable(name, id) values(\\\"\" + name + \"\\\", \" + idStr + \");\";\n\t\tif( mySQL.insertData_raw(cmdStr) == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t\treturn;\t\t\t\t\n\t\t}\t\t\n\t\t\n\t\t//insert Value by function\n\t\tString tableName = \"mytable\";\n\t\tObject[] valueList = new Object[2];\n\t\tvalueList[0] = new String(\"World\");\n\t\tvalueList[1] = new Integer(2);\n\t\tif( mySQL.insertData(tableName, valueList) == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t\treturn;\t\t\n\t\t}\n\t\tSystem.out.println(\"insert value finished\");\n\t\t\n\t\t\n\t\t//Output Value\n\t\tSystem.out.println(\"Get data from mytable:\");\n\t\ttableName = \"mytable\";\n\t\tString[] columnList = new String[2];\n\t\tcolumnList[0] = \"name\";\n\t\tcolumnList[1] = \"id\";\n\t\t//columnList[2] = \"passwd\";\n\t\tResultSet result = mySQL.outputData(tableName, columnList, false);\n\t\tif( result == null )\t{ System.out.println(mySQL.getErrorMessage()); }\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"name\\t\\tID\\t\\t\"); \n\t\t\t\twhile(result.next())\n\t\t\t\t{ \n\t\t\t\t System.out.println(result.getString(\"name\")+\"\\t\\t\"+ result.getInt(\"id\")+\"\\t\\t\"); \n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\tcatch(SQLException ignore) \n\t\t\t{ \n\t\t\t\tSystem.out.println(\"result get errer\");\n\t\t\t} \t\t\t\n\t\t}\t\t\n\t\t\t\t\n\t\t\n\t\t//destory table\n\t\tcmdStr = \"drop table mytable;\";\n\t\tif( mySQL.insertData_raw(cmdStr) == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t\treturn;\t\t\t\t\n\t\t}\t\t\n\t\tSystem.out.println(\"drop table finished\");\t\t\t\n\t\t\n\t\tif( mySQL.disConnect() == false )\n\t\t{\n\t\t\tSystem.out.println(mySQL.getErrorMessage());\n\t\t}\n\t\tSystem.out.println(\"Disconnect from SQL\");\t\t\n\n\t}",
"public void testExecuteSQL() {\n\t\tsqlExecUtil.setDriver(\"com.mysql.jdbc.Driver\");\n\t\tsqlExecUtil.setUser(\"root\");\n\t\tsqlExecUtil.setPassword(\"\");\n\t\tsqlExecUtil.setUrl(\"jdbc:mysql://localhost/sysadmin?autoReconnect=true&useUnicode=true&characterEncoding=gb2312\");\n\t\tsqlExecUtil.setSqlText(\"select * from t_role\");\n\t\tsqlExecUtil.executeSQL();\n\t\t\n\t\tsqlExecUtil.setSqlText(\"select * from t_user\");\n\t\tsqlExecUtil.executeSQL();\n\t}",
"public static void main(String[] args) {\n\t\tUser client = new User(\"user_z\");\n\t\tProtocol objectTransit= new Protocol(99,client,client.name);\n\t\t\n\t\tconnectingServer=new DatabaseConnectorServer();\n\t\tconnectingServer.setupDatabaseConnectionPool(\"postgres\", \"squirrel\",\"localhost\", \"messaging\", 100,9000);\n\t\ttry{\n\t\t\tconnection_1=connectingServer.getDatabaseConnection();\n\t\t\t//checking if the connection that is returning is not closed\n\t\t\tif(!connection_1.isClosed()){\n\t\t\t\tSystem.out.println(\"conencted to database!!\");\n\t\t\t\t//the parameter in the print if the call of the method\n\t\t\t\t//inside that class that calls the store procedure\n//\t\t\t\tSystem.out.println(database.GetUser.execute_query(connection_1,\"user_1\"));\n\t\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\t\n\t\t\n//\t\tStep 1 check user in database\n\t\tString userID = database.GetUser.execute_query(connection_1, objectTransit.newUser.name);\n\t\t\n\t\tif(!userID.equals(\"\")){\n\t\t\tSystem.out.println(\"this user already exist\");\n\n\t\t}else{\n\t\t\tUser newUser=objectTransit.newUser;\n\t\t\tdatabase.CreateNewUser.execute_query(connection_1, newUser);\n\n\t\t}\n\t}",
"private void updateDB() {\n }",
"Query queryOn(Connection connection);",
"public DatabaseManagement() throws SQLException {\n\t\n\t\ttry {\n\t\t\t//use driver\n\t\t\tClass.forName(MYSQL_DRIVER);\n\t\t System.out.println(\"Class Loaded....\");\n\t\t\t\n\t\t //get connection to database\n\t\t\tmyConn = DriverManager.getConnection(getDbUrl(), getUserName(), getPassword());\n\t\t\t//System.out.println(\"Connected to database...\");\n\t\t\t\n\t\t\t//create a statement\n\t\t\tmyStmt = myConn.createStatement();\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\tcatch (Exception exc){\n\t\t\texc.printStackTrace();\n\t\t}\t\t\n\t}",
"public void connectToDb(){\n\t log.info(\"Fetching the database name and other details ... \");\n\t dbConnect.setDbName(properties.getProperty(\"dbName\"));\n\t dbConnect.setUsrName(properties.getProperty(\"dbUsrname\"));\n\t dbConnect.setPassword(properties.getProperty(\"dbPassword\"));\n\t dbConnect.setSQLType(properties.getProperty(\"sqlServer\").toLowerCase());\n\t log.info(\"Trying to connect to the database \"+dbConnect.getDbName()+\" ...\\n with user name \"+dbConnect.getUsrname()+\" and password ****** \");\n\t dbConnect.connectToDataBase(dbConnect.getSQLType(), dbConnect.getDbName(), dbConnect.getUsrname(), dbConnect.getPswd());\n\t log.info(\"Successfully connected to the database \"+dbConnect.getDbName());\n }",
"private void createDBConnection() {\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\n \"jdbc:mysql://10.27.8.144:3306/databasename5\", \"user5\", \"p4ssw0rd\");\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"select * from emp\");\n while (rs.next())\n System.out.println(rs.getInt(1) + \" \" + rs.getString(2) + \" \" + rs.getString(3));\n con.close();\n } catch (Exception e) {\n System.out.println(e);\n }\n }",
"public interface DatabaseTool {\r\n\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will default follow\r\n\t * complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id, boolean follow);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e, boolean follow);\r\n\t\r\n\t/**\r\n\t * This will help write a object to a persistent store. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void storeObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * This will remove a object from the database. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void write(String sql);\r\n\r\n\t/**\r\n\t * Read from the database. It will return a cached result set. This result set is closed\r\n\t * and does not keep connection to the database.\r\n\t * \r\n\t * @param sql to be executed.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Writeable> ResultSet read(CharSequence sql);\r\n\t\r\n\t/**\r\n\t * Read from the database. It will first create a prepared statement before doing the read.\r\n\t * \r\n\t * @param sql to be executed. It must contain the amount ? as the length of the objects.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);\r\n\t\r\n\tpublic <E extends Retrievable> List<E> getObjects(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\tpublic <E extends Retrievable> E getObject(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * @param sql that is update/insert or both\r\n\t * @param objects that is to be used in store as parameters to the sql..\r\n\t * @return number of rows updated.\r\n\t */\r\n\tpublic int write(String sql, Object... objects);\r\n\t\r\n\tpublic int writeGetID(String sql, Object... objects);\r\n\t\r\n\tpublic QueryRunner getQueryRunner();\r\n\t\r\n\tpublic Retriver getRetriver();\r\n\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, Object... objects);\r\n\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> class1, Object... objects);\r\n\r\n\tpublic <E> E getValue(final String sql, final Class<E> clazz, final String column, final Object... objects);\r\n\t\r\n\tpublic List<Object> getValues(final String sql, final Object... objects);\r\n\t\r\n\tpublic String getServer();\r\n}",
"public static void main(String[] args) {\n Connection conn = null;\n Statement s;\n ResultSet rs = null;\n String dbName = \"myDB\";\n String url = protocol + dbName + \";create=true\";\n\n try {\n // create a connection object\n conn = DriverManager.getConnection(url);\n // somewhere to put our SQL statements\n s = conn.createStatement();\n // declare some SQL statements\n String createTable = \"CREATE TABLE IMAGETABLE \" +\n \"( ID INT PRIMARY KEY, \" +\n \"FILENAME VARCHAR(32), \" +\n \"PHOTOGRAPHER VARCHAR(32), \" +\n \"CATEGORY VARCHAR(32),\" +\n \"DESCRIPTION VARCHAR(32) )\";\n String insertData = \"INSERT INTO IMAGETABLE\" +\n \" VALUES \" +\n \" (1, 'animals01', 'Emily Kim', 'animals', 'some creature'),\" +\n \" (2, 'city02', 'Ada Long', 'city', 'some place'),\" +\n \" (3, 'people03', 'Fred Hoyle', 'people', 'some person')\";\n String readData = \"SELECT * FROM IMAGETABLE\";\n\n // execute SQL statements\n //s.execute(createTable);\n //s.execute(insertData);\n rs = s.executeQuery(readData);\n while (rs.next()){\n System.out.println(\"\" + rs.getInt(1)\n +\"\\t\"+rs.getString(2)\n +\"\\t\"+rs.getString(3)\n +\"\\t\"+rs.getString(4)\n );\n }\n }\n catch(SQLException sqle) {\n System.out.println(sqle);\n }\n finally {\n\n }\n\n\n\n\n\n\n\n\n\n }",
"public static void m1()\r\n\t{ \r\n\t\tUsername.clear();\r\n\t\tPassword.clear();\r\n\t\tId.clear();\r\n\t\ttry{ \r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\"); //driver registration\r\n\t\tConnection con= (Connection) DriverManager.getConnection( \r\n\t\t\"jdbc:mysql://localhost:3306/rakesh\",\"root\",\"\");//this are used to establish connection to the database,so never fiddle with this \r\n\t\t//here sonoo is database name, root is user name and password \r\n\t\t\r\n\t/*\tfor (String object: foodlist) {\r\n\t\t System.out.println(object);\r\n\t\t}\r\n\t\tUsername.forEach(a->out.println(a\\t\\t));*/\r\n\t\t\r\n\t\t\r\n\t\tStatement stmt=(Statement) con.createStatement();//helps in creating a statement \r\n\t\tResultSet rs=(ResultSet) stmt.executeQuery(\"select * from rak\"); //helps to write a query as the statement is allowed\t\t\t\r\n\t\twhile(rs.next()) \r\n\t\t{\r\n\t\t\tUsername.add(rs.getString(\"UserName\"));\r\n\t\t\tPassword.add(rs.getString(\"Password\"));\r\n\t\t\tId.add(rs.getInt(\"id\"));\r\n\t\t}\r\n\t\t\r\n\t\tcon.close(); //to close the connection\r\n\t\t}catch(Exception e){ System.out.println(e);}\r\n\t \r\n\t\t}",
"public void Query() {\n }",
"public static void main(String[] args) {\n\t\tTestDBOperations ob=new TestDBOperations();\n\t\tob.insertRecord();\n\t\tob.fetchRecords();\n\t}",
"public static void establishConnection()throws IOException, SQLException {\n connection= DriverManager.getConnection(\n Configuration.fileReader(\"dbhostname\"),\n Configuration.fileReader(\"dbusername\"),\n Configuration.fileReader(\"dbpassword\"));\n statement=connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);\n }",
"public static void main(String[] args) throws SQLException {\n\t\t\r\n\t\t\r\n\t\tDBConnection dbConnection =new DBConnection();\r\n\t\tString query=\"SELECT `username`, `password`, `roll`, `status`,`activation_key` FROM `user_master` WHERE roll=1\";\r\n\t\tPreparedStatement ps=dbConnection.getConnection().prepareStatement(query);\r\n\t\tResultSet rs=ps.executeQuery();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(1));\r\n\t\t\t}\r\n\t}",
"public ResultSet app(Long broker_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from broker where broker_id=\"+broker_id+\"\");\r\n\treturn rs;\r\n}",
"public D4mDbQuerySql(String url, String user, String pword) {\n super();\n try {\n conn = DriverManager.getConnection(url, user, pword);\n } catch (SQLException e) {\n log.warn(\"\",e);\n }\n\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}",
"@Override\r\n public Db_db currentDb(){return curDb_;}",
"public static void main(String[] args) throws SQLException {\n\t\t// 2. Create a Statement\n\t\t// 3. Execute query\n\t\t// 4. Process results (do validations)\n\t\t// 5. Close connections\n\t\t\n\t\t// Create Connection with our database\n\t\t// dbURl, dbUsername, dbPassword\n\t\t\n\t\t// HostName (ipAddress)\n\t\t// dbType\n\t\t// portNumber\n\t\t// dbBaseName\n\t\t\n\t\t// jdbc:jdbcType://ipAddress:portNumber/dbName\n\t\t// String dbUrl=\"jdbc:mysql://18.232.148.34:3306/syntaxhrm_mysql\";\n\t\t// config utulity file to read dbConfiguration.properties file\n\t\t\n\t\t\n\t\t// 1. Connect to database\n\t\t\n\t\tString url=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbUrl\");\n\t\tString user=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbUsername\");\n\t\tString password=ConfigUtility.getProperty(DbConstants.DB_CONFIG_FILEPATH, \"dbPassword\");\n\t\t\n\t\tConnection connection=DriverManager.getConnection(url, user, password);\n\t\t\n\t\tDatabaseMetaData dbMetaData=connection.getMetaData();\n\t\t\n\t\tString dbUrl=dbMetaData.getURL();\n\t\tSystem.out.println(dbUrl);\n\t\t\n\t\tString dbUsername=dbMetaData.getUserName();\n\t\tSystem.out.println(dbUsername);\n\t\t\n\t\tString dbProductData=dbMetaData.getDatabaseProductVersion();\n\t\tSystem.out.println(dbProductData);\n\t\t\n\t\tString dbDriverName=dbMetaData.getDriverName();\n\t\tSystem.out.println(dbDriverName);\n\t\t\n\t\t// 2. Create a Statement\n\t\tStatement statement=connection.createStatement();\n\t\t\n\t\t// 3. Execute query save results in ResultSet object\n\t\t\n\t\tResultSet rSet=statement.executeQuery(\"select * from ohrm_job_title;\");\n\t\t\n\t\tResultSetMetaData rsMetaData=rSet.getMetaData();\n\t\t\n\t\tint colCount=rsMetaData.getColumnCount();\n\t\tSystem.out.println(\"Number of Columns : \"+colCount);\n\t\t\n\t\trsMetaData.getColumnName(1);\n\t\t\n\t\tfor(int i=1; i<=colCount; i++) {\n\t\t\tSystem.out.println(\"Column Name \"+(i)+\" : \"+rsMetaData.getColumnName(i));\n\t\t}\n\t\t\t\n\t\t// 4. Process results (print results)\n\t\tSystem.out.println(\"Printing results\");\n\t\t\n\t\t// next()\n\t\t// getString()\n\t\t\n\t\twhile(rSet.next()) {\n\t\t\t\n\t\t\tString id=rSet.getString(1);\n\t\t\tString jobTitle=rSet.getString(\"job_title\");\n\t\t\tString jobDestcription=rSet.getString(\"job_description\");\t\t\t\n\t\t\tSystem.out.println(id+\" \"+jobTitle+\" \"+jobDestcription);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// 5. Close connections in reverse order\n\t\t\n\t\trSet.close();\n\t\tstatement.close();\n\t\tconnection.close();\n\t\t\n\t}",
"public void connectToDB(){\n\ttry {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tconnection=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/patient\",\"root\",\"7417899737\");\n\t} catch (ClassNotFoundException e) {\n\t\t\n\t\te.printStackTrace();\n\t} catch (SQLException e) {\n\t\t\n\t\te.printStackTrace();\n\t}\n\t\n}",
"private Database() throws SQLException {\n con = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:MusicAlbums\", \"c##dba\", \"sql\");\n }",
"public static void main(String[] args) {\n\t\tDbCaller caller = new DbCaller();\n\t\tcaller.dbCall(new Oracle());\n\t\tcaller.dbCall(new MySQL());\n\t\t\n\n\t}",
"DatabaseClient newModulesDbClient();",
"public static void main(final String[] args) throws Exception {\n MongoClient mongo = new MongoClient(\"localhost\", 27017);\n /**** Get database ****/\n // if database doesn't exists, MongoDB will create it for you\n DB db = mongo.getDB(\"enron\");\n DBCollection table = db.getCollection(\"demo\");\n BasicDBObject searchQuery = new BasicDBObject();\n searchQuery.put(\"_id\", 1);\n DBCursor cursor = table.find(searchQuery).limit(5);\n System.out.println(\"test\");\n System.out.println(JSON.serialize(cursor));\n\n }",
"public static void main(String[] args) throws SQLException {\n\t\tConnection con = getCon();\r\n\t\tStatement stmt = con.createStatement();\r\n\t\tMap<String, String> maps = new HashMap<String, String>();\r\n\t\tmaps.put(\"word\", \"String\");\r\n\t\tmaps.put(\"user\", \"String\");\r\n\t\tmaps.put(\"tfidf\", \"String\");\r\n//\t\tdropTable(con, \"hivetest324\");\r\n//\t\tSystem.out.println(createTable(con, \"hivetest324\", maps));\r\n\t\tString sql = \"select num from mytest\";\r\n\t\tselectTable(con, sql);\r\n\t\t\r\n//\t\tsql = \"load data local inpath 'E:/work/tfidf' overwrite into table tfidf\";\r\n//\t\tSystem.out.println(loadData(con, sql));\r\n\t\t\r\n//\t\tsql = \"show tables\";\r\n//\t\tResultSet res = stmt.executeQuery(sql);\r\n//\t\twhile(res.next()){\r\n//\t\t\tSystem.out.println(res.getString(1));\r\n//\t\t}\r\n\t}",
"public void formDatabaseTable() {\n }",
"private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}",
"protected void initializeDB() {\r\n try {\r\n // Load the JDBC driver\r\n // Class.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n Class.forName(\"com.mysql.jdbc.Driver \");\r\n\r\n System.out.println(\"Driver registered\");\r\n\r\n // Establish connection\r\n /*Connection conn = DriverManager.getConnection\r\n (\"jdbc:oracle:thin:@drake.armstrong.edu:1521:orcl\",\r\n \"scott\", \"tiger\"); */\r\n Connection conn = DriverManager.getConnection(\r\n \"jdbc:mysql://localhost/javabook\" , \"scott\", \"tiger\");\r\n System.out.println(\"Database connected\");\r\n\r\n // Create a prepared statement for querying DB\r\n pstmt = conn.prepareStatement(\r\n \"select * from Scores where name = ?\");\r\n }\r\n catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }",
"public ConnectDB(){\r\n\r\n\t}",
"public Database(){\n ItemBox.getLogger().info(\"[Database] protocol version \" + net.mckitsu.itembox.protocol.ItemBoxProtocol.getVersion());\n }",
"public static void main(String[] args)\r\n\t{\n\r\n\t\tfinal Connection connection = getConnection(DB_URL, DB_USER, DB_PASSWORD);\r\n\t\t// String query = \"INSERT INTO VALID_ITEM (ID, NAME, QUANTITY,PRICE)\" + \"VALUES ( 1,'sandeep' ,10 ,22 )\";\r\n\t\tString query = \"select * from valid_item\";\r\n\t\tSystem.out.println(JDBCUtil.read(connection, query));\r\n\r\n\t}",
"public static void main(String[] args) throws SQLException {\n\t\tConnectionDB.Connect();\n\t\t\n\t\tClientImplement ci = new ClientImplement();\n\t\t//Client c = new Client();\n\t\t\n\t\tSystem.out.println(ci.consulterClient(3));\n\t\t//System.out.println(ci.consulterClient(3).get)\n\t}",
"private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}",
"private void apriConnessione() throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {\n\t\tString password, user;\n\t\tDatabaseProps dbConf = config.getDb();\n\n\t\tClass.forName(dbConf.getDriver()).getDeclaredConstructor().newInstance();\n\n\t\tuser = dbConf.getUsername();\n\t\tpassword = dbConf.getPassword();\n\n\t\tString uri = String.format(\"jdbc:%s://%s:%d/%s\", dbConf.getDbms(), dbConf.getHost(), dbConf.getPort(), dbConf.getName());\n\n\t\tconnessioneDB = DriverManager.getConnection(uri, user, password);\n\t}",
"String getDatabase();",
"private Database() throws SQLException, ClassNotFoundException {\r\n Class.forName(\"org.postgresql.Driver\");\r\n con = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/postgres\", \"postgres\", \"kuka\");\r\n }",
"public static void main(String args[])\n\t{\n\t\ttestConnection1 con=new testConnection1();\n\t\tcon.initializeParams();\n\t\tString loginName=\"rskinne27\";\n\t\t//String query_string=\"from UserData where loginName='rskinne27'\";\n\t\tList list=con.testQuery(loginName);\n\t\tUserData user=null;\n\t\t//UserData user=(UserData)list.get(0);\n\t\t//Users.user=user;\n\t\tfor (Iterator it = list.iterator(); it.hasNext();) {\n\t\t\tuser = (UserData) it.next();\n\t\t\tSystem.out.println(\"in UI:\"+user.getUserId());\n\t\t}\n\t\t//System.out.println(Users.user.getUserName());\n\t}",
"public void makeConnection(){\n\t\t\n\t\t\n\t\t\n\t\ttry{\n\t\t\tmySqlConn=new MySqlConnection(server,databaseName,userName,passWord);\n\t\t\tst=mySqlConn.conn.createStatement();\n\t\t }\n\t\tcatch(SQLException s){\n\t\t\tSystem.out.println(\"SQL not able to execute\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Database createDatabase();",
"private ServerError updateDatabase() {\n return updateDatabase(WebConf.DB_CONN, WebConf.JSON_OBJECTS, WebConf.DEFAULT_VERSION);\r\n }",
"public abstract Statement queryToRetrieveData();",
"public void connectDB(){\r\n\r\n try{\r\n /*\r\n //commands to open up database\r\n Class.forName(\"com.mysql.jdbc.Driver\"); //maybe add .newInstance();\r\n String connectionStringURL = \"jdbc:mysql://us-cdbr-azure-west-b.cleardb.com:3306/acsm_54270fa45d472fa\";\r\n mysql = DriverManager.getConnection(connectionStringURL, \"b1d0beb2ed12fc\", \"ba632151\");\r\n //if no connection let user know it failed, if connect works print success\r\n */\r\n mainController mainTreat = new mainController(); //new\r\n mysql = mainTreat.connectTheDB(); //new\r\n\r\n if(mysql == null)\r\n System.out.println(\"Connection Failed to treatment\");\r\n else\r\n System.out.println(\"Success connecting to treatment\");\r\n\r\n String searchStatement = \"select * from treatment\";\r\n st = mysql.createStatement();\r\n rs = st.executeQuery(searchStatement);\r\n while(rs.next()){\r\n treatment tm = new treatment();\r\n tm.setIdProperty(rs.getString(1));\r\n tm.setTreatmentNameProperty(rs.getString(2));\r\n tm.setMedicineIDProperty(rs.getString(3));\r\n tm.setDepartmentIDProperty(rs.getString(4));\r\n tm.setDiseaseIDProperty(rs.getString(5));\r\n treatmentData.add(tm);\r\n }\r\n st.close();\r\n st = null;\r\n }\r\n //exception and maybe more exceptions\r\n catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n }",
"public static void main(String[] args) {\n Connection connection = null;\r\n\r\n try{\r\n // establezco la connecion con la base de datos jdbc en el puerto 3306 con usuario y contrasenia root\r\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/jdbc\",\"root\",\"root\");\r\n // pongo auto commit en false esto hace que no se comite cada cueri y que se cada vez que lance\r\n // el comando commit se ejecuta el bloque query\r\n connection.setAutoCommit(false);\r\n\r\n // hago la sentencia preparada\r\n PreparedStatement preparedStatement = connection.prepareStatement(\"INSERT INTO estudiante (dni, nombre, apellido) VALUES (?, ?, ?);\");\r\n // modifico los \"?\" de la sentencia preparada con mis datos\r\n preparedStatement.setInt(1,40640217);\r\n preparedStatement.setString(2,\"Santiago\");\r\n preparedStatement.setString(3,\"Lampropulos\");\r\n\r\n // ejecuto la consulta preparada\r\n preparedStatement.executeUpdate();\r\n\r\n //traigo los datos de la tabla estudiante\r\n ResultSet resultSet = preparedStatement.executeQuery(\"SELECT * FROM estudiante\");\r\n\r\n // realizo el commit para que se guarden los cambios\r\n connection.commit();\r\n\r\n //muestro toda la tabla\r\n while(resultSet.next()){\r\n System.out.println(resultSet.getString(2)+\"\\t\"+resultSet.getString(\"nombre\")+\"\\t\"+resultSet.getString(\"apellido\"));\r\n }\r\n\r\n }catch (SQLException exceptionConnection){\r\n System.out.println(exceptionConnection);\r\n try{\r\n // si se creo la base de datos revierte el commit que se hizo\r\n if(connection!=null){\r\n connection.rollback();\r\n }\r\n }catch (SQLException exceptionCarth){\r\n //atrapo excepciones\r\n System.out.println(exceptionCarth);\r\n }\r\n\r\n\r\n }finally {\r\n // el bloque finally se ejecute sin inportar si viene de un catch o del try\r\n try{\r\n //si se crea una coneccion con base de datos la cierro\r\n if(connection!= null){\r\n connection.close();\r\n }\r\n }catch (SQLException eFinally){\r\n //atrapo excepciones\r\n System.out.println(eFinally);\r\n }\r\n }\r\n\r\n }",
"public void connect(){\r\n\t\tSystem.out.println(\"Connecting to Sybase Database...\");\r\n\t}",
"public String getDatabase();"
]
| [
"0.7134462",
"0.68657696",
"0.6749289",
"0.66722435",
"0.6665168",
"0.6628067",
"0.66153175",
"0.65880084",
"0.6525719",
"0.6503133",
"0.6499185",
"0.6495731",
"0.64724076",
"0.6405501",
"0.6397608",
"0.6375318",
"0.6365501",
"0.63548046",
"0.63548046",
"0.6328159",
"0.6315148",
"0.63064384",
"0.6305569",
"0.63029116",
"0.6296134",
"0.62874717",
"0.6284503",
"0.6278879",
"0.62710994",
"0.62388325",
"0.6223903",
"0.6219397",
"0.6217362",
"0.62089306",
"0.6202976",
"0.6200978",
"0.6200899",
"0.61945444",
"0.6187371",
"0.61578643",
"0.6155486",
"0.61512476",
"0.61507386",
"0.61476284",
"0.61441636",
"0.6126786",
"0.6126373",
"0.61225057",
"0.6112442",
"0.61084896",
"0.61077595",
"0.6099828",
"0.60926574",
"0.6085621",
"0.6083242",
"0.60663575",
"0.6060646",
"0.60598314",
"0.60495573",
"0.6047092",
"0.60416967",
"0.604009",
"0.6038081",
"0.60369635",
"0.6034445",
"0.60266143",
"0.6017844",
"0.6011494",
"0.600749",
"0.60059834",
"0.60005766",
"0.60005605",
"0.5997902",
"0.59889174",
"0.59847975",
"0.5980686",
"0.5979395",
"0.5969258",
"0.59549844",
"0.59531933",
"0.594983",
"0.5946833",
"0.59457093",
"0.5943721",
"0.5943316",
"0.59409165",
"0.5926862",
"0.5925111",
"0.5923653",
"0.5923095",
"0.59199196",
"0.5908173",
"0.59069383",
"0.5904396",
"0.59026176",
"0.5901574",
"0.5894513",
"0.5893293",
"0.5892371",
"0.58922255",
"0.58915305"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"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 |
String plainText = "Hello, World! This is a Java/Javascript AES test."; | public static String encryptAngular(String plainText) throws Exception {
String key = "u/Gu5posvwDsXUnV5Zaq4g==";
String iv = "5D9r9ZVzEYYgha93/aUK2w==";
SecretKey secretKey = new SecretKeySpec(
Base64.getDecoder().decode(key.getBytes(StandardCharsets.UTF_8)), "AES");
AlgorithmParameterSpec algorithIV = new IvParameterSpec(
Base64.getDecoder().decode(iv.getBytes(StandardCharsets.UTF_8)));
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secretKey, algorithIV);
String encryptedText = new String(Base64.getEncoder().encode(cipher.doFinal(
plainText.getBytes("UTF-8"))));
return encryptedText;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String encrypt(String plainText);",
"public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}",
"public String encryptString(String plainText) {\n return encStr(plainText, new Random().nextLong());\n }",
"@Override\n\tpublic String encryptAES(byte[] key, String plainText) {\n\t\ttry {\n\t\t\tbyte[] clean = plainText.getBytes();\n\t\n\t // Generating IV.\n\t int ivSize = 16;\n\t byte[] iv = new byte[ivSize];\n\t SecureRandom random = new SecureRandom();\n\t random.nextBytes(iv);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] encrypted = cipher.doFinal(clean);\n\t byte[] encryptedIVAndText = new byte[ivSize + encrypted.length];\n\t System.arraycopy(iv, 0, encryptedIVAndText, 0, ivSize);\n\t System.arraycopy(encrypted, 0, encryptedIVAndText, ivSize, encrypted.length);\n\n\t return DatatypeConverter.printHexBinary(encryptedIVAndText);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}",
"public String encryptTextUsingAES(String plainText, String aesKeyString) throws Exception {\r\n byte[] decodedKey = Base64.getDecoder().decode(aesKeyString);\r\n SecretKey originalSecretKey = new SecretKeySpec(decodedKey, 0, decodedKey.length, \"AES\");\r\n\r\n // AES defaults to AES/ECB/PKCS5Padding in Java 7\r\n Cipher aesCipher = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\r\n \r\n IV = \"AAAAAAAAAAAAAAAA\";\r\n \r\n aesCipher.init(Cipher.ENCRYPT_MODE, originalSecretKey, new IvParameterSpec(IV.getBytes()));\r\n // aesCipher.init(Cipher.ENCRYPT_MODE, originalSecretKey);\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes(\"UTF8\"));\r\n return Base64.getEncoder().encodeToString(byteCipherText);\r\n }",
"public String encrypt(String plainText) {\n try {\n IvParameterSpec iv = new IvParameterSpec(initVector);\n SecretKeySpec skeySpec = new SecretKeySpec(privateKey, \"AES\");\n\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\n cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);\n\n byte[] encrypted = cipher.doFinal(plainText.getBytes());\n\n return new String(Base64Coder.encode(encrypted));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return null;\n }",
"public void test() {\n\t\ttry {\n\t\t\tString plainText = \"Sensitive information\";\n\t\t\tint keySize = 128;\n\t\t\t// Generate a key for AES\n\t\t\tKeyGenerator keygenerator = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeygenerator.init(keySize);\n\t\t\tSecretKey key = keygenerator.generateKey();\n\t\t\t// Encrypt the plain text with AES\n\t\t\tCipher aesChipher;\n\t\t\taesChipher = Cipher.getInstance(\"AES\");\n\t\t\taesChipher.init(Cipher.ENCRYPT_MODE, key);\n\t\t\tbyte[] encrypted= aesChipher.doFinal(plainText.getBytes());\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"byte[] encrypt(String plaintext);",
"public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.DECRYPT_MODE, secKey);\r\n\r\n byte[] bytePlainText = aesCipher.doFinal(byteCipherText);\r\n\r\n return new String(bytePlainText);\r\n\r\n}",
"public static byte[] encryptText(String plainText, String key) throws Exception {\n\t\tSystem.out.println(\"key is \"+key);\n\t\tSecretKey secKey=decodeKeyFromString(key);\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.ENCRYPT_MODE, secKey);\n\n\t\tbyte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\n\n\t\t\n\t\t\n\t\treturn byteCipherText;\n\n\t}",
"public String encrypt(String geheimtext);",
"public String encrypt(String text) {\n return content.encrypt(text);\n }",
"public interface AES {\n\n public String encrypt(String strToEncrypt);\n\n public String decrypt(String strToDecrypt);\n\n public String getSecretKeyWord();\n}",
"public String standardExample() {\n\t\tString ret = AESMain.AESEncrypt(plaintext, key);\n\t\tret += \"\\n\\n\" + AESMain.AESDecrypt(ciphertext, key);\n\t\treturn ret;\n\t}",
"public String[] encrypt(String plainText) {\n aes = new AES();\n\n // Encrypt privateKey\n byte[] plainKey = aes.getKey();\n BigInt plainKeyInt = new BigInt(plainKey, (byte) 1);\n BigInt cipherKeyInt = plainKeyInt.modExp(publicKey.getE(), publicKey.getN());\n byte[] cipherKey = cipherKeyInt.toByteArray();\n\n // Encrypt initialization vector\n byte[] plainIV = aes.getInitVector();\n BigInt plainIVInt = new BigInt(plainIV, (byte) 1);\n BigInt cipherIVInt = plainIVInt.modExp(publicKey.getE(), publicKey.getN());\n byte[] cipherIV = cipherIVInt.toByteArray();\n\n String manifest = XmlHelper.aesKeyToXmlString(cipherKey, cipherIV);\n String cipherText = aes.encrypt(plainText);\n return new String[] { manifest, cipherText };\n }",
"public String encryptString(char[] sPlainText)\n\t{\n\t\tlong lCBCIV = _rnd.nextLong();\n\t\treturn encStr(sPlainText, lCBCIV);\n\t}",
"public static String encrypt(String seed, String plain) throws Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] encrypted = encrypt(rawKey, plain.getBytes());\r\nreturn Base64.encodeToString(encrypted, Base64.DEFAULT);\r\n}",
"public String encrypt(String plaintext) {\n\t\tCipher rsaCipher, aesCipher;\n\t\ttry {\n\t\t\t// Create AES key\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(\"AES\");\n\t\t\tkeyGen.init(AES_BITS);\n\t\t\tKey aesKey = keyGen.generateKey();\n\n\t\t\t// Create Random IV\n\t\t\tbyte[] iv = SecureRandom.getSeed(16);\n\t\t\tIvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n\t\t\t// Encrypt data using AES\n\t\t\taesCipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\taesCipher.init(Cipher.ENCRYPT_MODE, aesKey, ivSpec);\n\t\t\tbyte[] data = aesCipher.doFinal(plaintext.getBytes());\n\n\t\t\t// Encrypt AES key using RSA public key\n\t\t\trsaCipher = Cipher.getInstance(\"RSA/NONE/PKCS1Padding\");\n\t\t\trsaCipher.init(Cipher.ENCRYPT_MODE, this.pubKey);\n\t\t\tbyte[] encKey = rsaCipher.doFinal(aesKey.getEncoded());\n\n\t\t\t// Create output\n\t\t\tString keyResult = new String(Base64.encodeBytes(encKey, 0));\n\t\t\tString ivResult = new String(Base64.encodeBytes(iv, 0));\n\t\t\tString dataResult = new String(Base64.encodeBytes(data, 0));\n\t\t\tString result = FORMAT_ID + \"|\" + VERSION + \"|\" + this.keyId + \"|\"\n\t\t\t\t\t+ keyResult + \"|\" + ivResult + \"|\" + dataResult;\n\t\t\treturn Base64.encodeBytes(result.getBytes(), Base64.URL_SAFE);\n\t\t} catch (InvalidKeyException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (NoSuchPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalBlockSizeException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (BadPaddingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InvalidAlgorithmParameterException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn \"Encryption_Failed\";\n\t}",
"public String decrypt(String cipherText);",
"public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }",
"public String encrypt(String plainText) throws DataLengthException,\n\tIllegalStateException, InvalidCipherTextException {\n\t\tcipher.reset();\n\t\tcipher.init(true, new KeyParameter(key));\n\n\t\t// byte[] input = plainText.getBytes();\n\t\tbyte[] input = Str.toBytes(plainText.toCharArray());\n\t\tbyte[] output = new byte[cipher.getOutputSize(input.length)];\n\n\t\tint length = cipher.processBytes(input, 0, input.length, output, 0);\n\t\tint remaining = cipher.doFinal(output, length);\n\t\tbyte[] result = Hex.encode(output, 0, output.length);\n\n\t\treturn new String(Str.toChars(result));\n\t}",
"Encryption encryption();",
"String encryption(Long key, String encryptionContent);",
"@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }",
"private String encStr(String plainText, long newCBCIV) {\n int strlen = plainText.length();\n byte[] buf = new byte[((strlen << 1) & ~7) + 8];\n int pos = 0;\n for (int i = 0; i < strlen; i++) {\n char achar = plainText.charAt(i);\n buf[pos++] = (byte) ((achar >> 8) & 0x0ff);\n buf[pos++] = (byte) (achar & 0x0ff);\n }\n byte padval = (byte) (buf.length - (strlen << 1));\n while (pos < buf.length) {\n buf[pos++] = padval;\n }\n this.bfc.setCBCIV(newCBCIV);\n this.bfc.encrypt(buf, 0, buf, 0, buf.length);\n byte[] newIV = new byte[Blowfish.BLOCKSIZE];\n BinConverter.longToByteArray(newCBCIV, newIV, 0);\n return BinConverter.bytesToHexStr(newIV, 0, Blowfish.BLOCKSIZE) + BinConverter.bytesToHexStr(buf, 0, buf.length);\n }",
"@Override\n public String encryptText(String plainText, String encryptionKey, Boolean staticKey) throws Exception {\n // Create the encrypion SALT, IV and AUTH_TAG\n byte[] salt ;\n byte[] iv ;\n byte[] tag ;\n if (Objects.nonNull(staticKey) && staticKey) {\n salt = new byte[]{-11, -50, 68, -16, 41, 57, 73, -96, -70, -117, 11, 58, 36, -114, -51, 15, -125, 10, 4, 102, -71, 98, 94, -40, -36, 88, 74, -22, -113, -37, 20, 79, -112, 41, 75, -69, -67, -119, -21, 84, 28, 42, -87, -54, -85, -45, 32, -4, 98, 51, 98, -7, 50, -45, -117, -114, -78, -44, 101, 9, 7, -34, 113, -90};\n iv = new byte[]{-31, 127, 45, 52, -70, -124, 99, 12, -36, 1, 30, 51};\n tag = new byte[]{81, 67, 28, -8, 0, -83, -52, -35, 82, 75, 5, -115, -101, 124, 89, 50};\n } else {\n salt = new byte[SALT_LENGTH];\n iv = new byte[IV_LENGTH];\n tag = new byte[TAG_BYTE_LENGTH];\n\n SecureRandom random = new SecureRandom();\n random.nextBytes(salt);\n random.nextBytes(iv);\n random.nextBytes(tag);\n }\n //Construct the Encryption Key in required format\n SecretKey pbeKey = getSecretKey(encryptionKey, salt);\n GCMParameterSpec ivSpec = new GCMParameterSpec(TAG_BYTE_LENGTH * Byte.SIZE, iv);\n SecretKeySpec newKey = new SecretKeySpec(pbeKey.getEncoded(), \"AES\");\n\n //Get the AES/GCM/NoPadding instance and initialize\n Cipher cipher = Cipher.getInstance(\"AES/GCM/NoPadding\");\n cipher.init(Cipher.ENCRYPT_MODE, newKey, ivSpec);\n\n //Convert the plain text to UTF-8 bytes and do the encryption\n byte[] textBytes = plainText.getBytes(StandardCharsets.UTF_8);\n byte[] updateByte = cipher.update(textBytes);\n byte[] finalByte = cipher.doFinal();\n\n //Construct the encrypted text\n ByteBuffer encryptedBuffer = ByteBuffer.allocate(updateByte.length + finalByte.length);\n encryptedBuffer.put(updateByte).put(finalByte);\n\n byte[] encryptedByteArray = encryptedBuffer.array();\n\n //Construct the final encrypted text in the required format\n //In Java the required format is SALT + IV + ENCRYPTED_TEXT + AUTH_TAG\n //In AES/GCM/NoPadding mode the Auth Tag will be appended at the end of the encrypted text automatically\n ByteBuffer resultBuffer = ByteBuffer.allocate(salt.length + iv.length + encryptedByteArray.length);\n resultBuffer.put(salt).put(iv).put(encryptedByteArray);\n\n //Encode the result in Base64 string\n return Base64.getEncoder().encodeToString(resultBuffer.array());\n\n }",
"@Test\n public void testAesEncryptForInputKey() throws Exception {\n byte[] key = Cryptos.generateAesKey();\n String input = \"foo message\";\n\n byte[] encryptResult = Cryptos.aesEncrypt(input.getBytes(\"UTF-8\"), key);\n String descryptResult = Cryptos.aesDecrypt(encryptResult, key);\n\n System.out.println(key);\n System.out.println(descryptResult);\n }",
"public synchronized void encryptText() {\n setSalt(ContentCrypto.generateSalt());\n try {\n mText = ContentCrypto.encrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args) throws Exception {\n String keyString = \"1bobui76m677W1eCxjFM79mJ189G2zxo\";\n String input = \"john doe i a dead man sdhfhdshfihdoifo\";\n\n // setup AES cipher in CBC mode with PKCS #5 padding\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\n // setup an IV (initialization vector) that should be\n // randomly generated for each input that's encrypted\n byte[] iv = new byte[cipher.getBlockSize()];\n new SecureRandom().nextBytes(iv);\n IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // hash keyString with SHA-256 and crop the output to 128-bit for key\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n digest.update(keyString.getBytes());\n byte[] key = new byte[16];\n System.arraycopy(digest.digest(), 0, key, 0, key.length);\n SecretKeySpec keySpec = new SecretKeySpec(key, \"AES\");\n\n // encrypt\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n byte[] encrypted = cipher.doFinal(input.getBytes(\"UTF-8\"));\n System.out.println(\"encrypted: \" + new String(encrypted));\n\n // include the IV with the encrypted bytes for transport, you'll\n // need the same IV when decrypting (it's safe to send unencrypted)\n\n // decrypt\n cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);\n byte[] decrypted = cipher.doFinal(encrypted);\n System.out.println(\"decrypted: \" + new String(decrypted, \"UTF-8\"));\n }",
"public static String encrypt(String message, String randomkey) throws GeneralSecurityException {\n //Log.d(\"Jsonmessage\",message);\n try {\n final SecretKeySpec key = new SecretKeySpec(ENCRYPTION_SECRET_KEY.getBytes(), \"AES\");\n\n // byte[] cipherText = encrypt(key, ApiConfig.ENCRYPTION_IV_KEY.getBytes(), message.getBytes(CHARSET));\n byte[] cipherText = encrypt(key, randomkey.getBytes(), message.getBytes(CHARSET));\n //Log.d(\"SecretKey123\",cipherText.toString());\n String encoded = Base64.encodeToString(cipherText, Base64.NO_WRAP);\n //Log.d(\"SecretKey\",encoded);\n return encoded;\n } catch (UnsupportedEncodingException e) {\n if (DEBUG_LOG_ENABLED)\n Log.e(TAG, \"UnsupportedEncodingException \", e);\n throw new GeneralSecurityException(e);\n }\n }",
"String encryptString(String toEncrypt) throws NoUserSelectedException;",
"private String encStr(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tbyte[] newCBCIV;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (nNumBytes - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, nNumBytes);\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tString strEncrypt = EQBinConverter.bytesToHexStr(buf, 0, nNumBytes);\n\t\tnewCBCIV = new byte[EQBlowfishECB.BLOCKSIZE];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, newCBCIV, 0);\n\t\tString strCBCIV = EQBinConverter.bytesToHexStr(newCBCIV, 0, EQBlowfishECB.BLOCKSIZE);\n\t\t// System.out.println(\"encrypt = [\" + strEncrypt + \"]\");\n\t\t// System.out.println(\"strCBCIV = [\" + strCBCIV + \"]\");\n\t\treturn strCBCIV + strEncrypt;\n\t}",
"private String teaEncrypt(String plaintext, String password) {\n if (plaintext.length() == 0) {\n return (\"\"); // nothing to encrypt\n }\n // 'escape' plaintext so chars outside ISO-8859-1 work in single-byte packing, but keep\n // spaces as spaces (not '%20') so encrypted text doesn't grow too long (quick & dirty)\n String asciitext = plaintext;\n int[] v = strToLongs(asciitext); // convert string to array of longs\n\n if (v.length <= 1) {\n int[] temp = new int[2];\n temp[0] = 0; // algorithm doesn't work for n<2 so fudge by adding a null\n temp[1] = v[0];\n v = temp;\n }\n int[] k = strToLongs(password.substring(0, 16).toLowerCase()); // simply convert first 16 chars of password as\n // key\n int n = v.length;\n\n // int z = v[n - 1], y = v[0], delta = 0x9E3779B9;\n // int mx, e, q = (int) Math.floor(6 + 52 / n), sum = 0;\n int z = v[n - 1];\n int y = v[0];\n int delta = 0x9E3779B9;\n int mx;\n int e;\n int q = (int) Math.floor(6 + 52 / n);\n int sum = 0;\n\n while (q-- > 0) { // 6 + 52/n operations gives between 6 & 32 mixes on each word\n sum += delta;\n e = sum >>> 2 & 3;\n for (int p = 0; p < n; p++) {\n y = v[(p + 1) % n];\n mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);\n z = v[p] += mx;\n }\n }\n\n String ciphertext = longsToHexStr(v);\n\n return ciphertext;\n }",
"private String encrypt(String plainData) throws Exception {\n Key key = generateKey();\n Cipher c = Cipher.getInstance(ALGO);\n c.init(Cipher.ENCRYPT_MODE, key);\n byte[] encValue = c.doFinal(plainData.getBytes());\n return Base64.getEncoder().encodeToString(encValue);\n }",
"public String Decrypt(String s);",
"protected CipherIV encryptAES(byte[] plainText, SecretKey secretKey) throws GeneralSecurityException {\n fixPrng();\n // Instantiate Cipher with the AES Instance\n final Cipher cipher = Cipher.getInstance(AES_MODE);\n // Generate random bytes for the initialization vector\n final SecureRandom secureRandom = new SecureRandom();\n final byte[] initVector = new byte[IVECTOR_LENGTH_IN_BYTE];\n secureRandom.nextBytes(initVector);\n final IvParameterSpec initVectorParams = new IvParameterSpec(initVector);\n // Initialize cipher object with the desired parameters\n cipher.init(Cipher.ENCRYPT_MODE, secretKey, initVectorParams);\n // Encrypt\n byte[] cipherText = cipher.doFinal(plainText);\n // Return ciphertext and iv in CipherIV object\n return new CipherIV(cipherText, cipher.getIV());\n }",
"public static String encrypt(String strToEncrypt)\n {\n try\n {\n Cipher cipher = Cipher.getInstance(\"AES/ECB/PKCS5Padding\");\n final SecretKeySpec secretKey = new SecretKeySpec(key, \"AES\");\n cipher.init(Cipher.ENCRYPT_MODE, secretKey);\n final String encryptedString = Base64.encodeBase64String(cipher.doFinal(strToEncrypt.getBytes()));\n return encryptedString;\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n return null;\n\n }",
"public String Crypt(String s);",
"@Test\n public void testEncryptDecrypt3() throws InvalidCipherTextException {\n\n // password generation using KDF\n String password = \"Aa1234567890#\";\n byte[] kdf = Password.generateKeyDerivation(password.getBytes(), 32);\n\n byte[] plain = \"0123456789\".getBytes();\n byte[] plainBytes = new byte[100000000];\n for (int i = 0; i < plainBytes.length / plain.length; i++) {\n System.arraycopy(plain, 0, plainBytes, i * plain.length, plain.length);\n }\n\n byte[] encData = AESEncrypt.encrypt(plainBytes, kdf);\n byte[] plainData = AESEncrypt.decrypt(encData, kdf);\n\n assertArrayEquals(plainBytes, plainData);\n\n }",
"public static String encrypt(String strClearText,byte[] digest) throws Exception {\n \n \tString strData=\"\";\n byte [] encrypted = null;\n\n try {\n \t\n SecretKeySpec skeyspec=new SecretKeySpec(digest,\"AES\");\n Cipher cipher=Cipher.getInstance(\"AES\");\n cipher.init(Cipher.ENCRYPT_MODE, skeyspec);\n encrypted=cipher.doFinal(strClearText.getBytes());\n strData=new String(encrypted, \"ISO-8859-1\");\n \n\n } \n catch (Exception ex) {\n \t\n ex.printStackTrace();\n throw new Exception(ex);\n \n }\n \n return strData;\n }",
"@Test\r\n public void testEncryptDecryptPlaintext() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n String message = instance.decryptPlaintext(result, add, keys);\r\n assertEquals(message, \"Hola caracola\");\r\n }",
"public static byte[] encrypt(byte[] plainText)\r\n {\r\n try {\r\n SecretKeySpec secretKey = new SecretKeySpec(key, ALGORITHM);\r\n Cipher cipher = Cipher.getInstance(ALGORITHM);\r\n cipher.init(Cipher.ENCRYPT_MODE, secretKey);\r\n\r\n return cipher.doFinal(plainText);\r\n }catch (Exception exc) {\r\n exc.printStackTrace();\r\n }\r\n \r\n return null;\r\n }",
"public String decryptTextUsingAES(String encryptedText, String aesKeyString) throws Exception {\r\n\r\n byte[] decodedKey = Base64.getDecoder().decode(aesKeyString);\r\n SecretKey originalSecretKey = new SecretKeySpec(decodedKey, 0, decodedKey.length, \"AES\");\r\n\r\n // AES defaults to AES/ECB/PKCS5Padding in Java 7\r\n Cipher aesCipher = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\r\n \r\n IV = \"AAAAAAAAAAAAAAAA\";\r\n \r\n aesCipher.init(Cipher.DECRYPT_MODE, originalSecretKey, new IvParameterSpec(IV.getBytes()));\r\n // aesCipher.init(Cipher.DECRYPT_MODE, originalSecretKey);\r\n byte[] bytePlainText = aesCipher.doFinal(Base64.getDecoder().decode(encryptedText));\r\n return new String(bytePlainText);\r\n }",
"@Override\n public String encrypt(String text) {\n if (StringUtils.isBlank(text)) {\n return null;\n }\n\n try {\n byte[] iv = new byte[GCM_IV_LENGTH];\n RandomUtils.RANDOM.nextBytes(iv);\n\n Cipher cipher = Cipher.getInstance(ENCRYPT_ALGORITHM);\n GCMParameterSpec ivSpec = new GCMParameterSpec(GCM_TAG_LENGTH * Byte.SIZE, iv);\n cipher.init(Cipher.ENCRYPT_MODE, getKeyFromPassword(), ivSpec);\n\n byte[] ciphertext = cipher.doFinal(text.getBytes(StandardCharsets.UTF_8));\n byte[] encrypted = new byte[iv.length + ciphertext.length];\n System.arraycopy(iv, 0, encrypted, 0, iv.length);\n System.arraycopy(ciphertext, 0, encrypted, iv.length, ciphertext.length);\n\n return Base64.getEncoder().encodeToString(encrypted);\n } catch (NoSuchAlgorithmException\n | IllegalArgumentException\n | InvalidKeyException\n | InvalidAlgorithmParameterException\n | IllegalBlockSizeException\n | BadPaddingException\n | NoSuchPaddingException e) {\n LOG.debug(ERROR_ENCRYPTING_DATA, e);\n throw new EncryptionException(e);\n }\n }",
"public static byte[] encryptCtsTail(byte[] plainText, SecretKey key)\n {\n\n byte[] b1 = Arrays.copyOfRange(plainText, 0, 16);\n byte[] c1 = encryptBlocks(b1, key);\n\n byte[] b2 = new byte[16];\n System.arraycopy(plainText, 16, b2, 0, plainText.length - 16);\n System.arraycopy(c1, plainText.length - 16, b2, plainText.length - 16, 32 - plainText.length);\n byte[] c2 = encryptBlocks(b2, key);\n\n byte[] cipherText = new byte[plainText.length];\n System.arraycopy(c1, 0, cipherText, 0, plainText.length - 16);\n System.arraycopy(c2, 0, cipherText, plainText.length - 16, 16);\n\n return cipherText;\n }",
"public interface EncryptionAlgorithm {\n\n public String encrypt(String plaintext);\n\n}",
"public static String encryptCaesar(String plainText, int key) {\r\n\t\t\r\n\t\tchar [] pText = plainText.toCharArray();\r\n\t\tchar [] eText = new char[plainText.length()];\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tdo {\r\n\t\t\tfor(char t: pText) {\r\n\t\t\t\t\r\n\t\t\t\tt +=key;\r\n\t\t\t\teText[i] = t;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tString st = String.valueOf(eText);\r\n\t\treturn st;\r\n\t}",
"public static String encrypt(String text) {\r\n\t\tString modifiedText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character + 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\tmodifiedText += Character.toString(character);\r\n\t\t}\r\n\t\treturn modifiedText;\r\n\t}",
"public static byte[] encrypt(SecretKey key, byte[] plainText) {\r\n\t\tbyte[] encryptedData = null;\r\n\t\ttry {\r\n\t\t\tCipher c = Cipher.getInstance(\"AES\");\r\n\t\t\tc.init(Cipher.ENCRYPT_MODE, key);\r\n\t\t\tencryptedData = c.doFinal(plainText);\r\n\t\t} catch (IllegalBlockSizeException ex) {\r\n\t\t\tLogger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t} catch (BadPaddingException ex) {\r\n\t\t\tLogger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t} catch (InvalidKeyException ex) {\r\n\t\t\tLogger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t} catch (NoSuchAlgorithmException ex) {\r\n\t\t\tLogger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t} catch (NoSuchPaddingException ex) {\r\n\t\t\tLogger.getLogger(AES.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t}\r\n\t\treturn encryptedData;\r\n\t}",
"public static byte [] encrypt(byte [] plainText, SecretKey key){\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key);\r\n\t\t\tbyte [] initVector = cipher.getIV();\r\n\t\t\tbyte [] outputBuffer = new byte [cipher.getOutputSize(plainText.length)+initVector.length+2];\r\n\t\t\tint cursor = packToByteArray(initVector, outputBuffer, 0);\r\n\t\t\tcipher.doFinal(plainText, 0, plainText.length, outputBuffer,cursor);\r\n\t\t\treturn outputBuffer;\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error encrypting plainText \"+plainText,e);\r\n\t\t}\r\n\t}",
"public static byte [] encrypt(byte [] plainText, char [] password){\r\n\t\t// create a secret key using a random salt\r\n\t\tbyte [] salt = new byte[SEED_LENGTH];\r\n\t\tSecureRandom random = new SecureRandom();\r\n\t\trandom.nextBytes(salt);\r\n\t\tSecretKey key = generateSecretKey(salt, password);\r\n\t\ttry {\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.ENCRYPT_MODE, key, new IvParameterSpec(salt));\r\n\t\t\tbyte [] encoded = cipher.doFinal(plainText);\r\n\t\t\tbyte [] cipherText = new byte[encoded.length+salt.length+4];\r\n\t\t\tint cursor = 0;\r\n\t\t\t// pack the salt dataValue and the encoded values to create the cipher text\r\n\t\t\tcursor = packToByteArray(salt, cipherText, cursor);\r\n\t\t\tpackToByteArray(encoded,cipherText,cursor);\r\n\t\t\treturn cipherText;\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(\"Error encrypting plainText \"+plainText,e);\r\n\t\t}\r\n\t}",
"public static String encrypt(String Password, String plainText) throws GeneralSecurityException {\n return AESCrypt.encrypt(Password, plainText);\n }",
"@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}",
"public static String encryptBellaso(String plainText, String bellasoStr) {\r\n\t\tString encryptedText = \"\";\r\n\t\t\r\n\t\tchar [] enText = new char[plainText.length()];\r\n\t\t\r\n\t\t\r\n\t mappingKeyToMessage(bellasoStr,plainText);\r\n\t \r\n\t char [] plText = plainText.toCharArray();\r\n\t\tchar [] blText = bellasoStr.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint sum = 0;\r\n\t\t\r\n\t\tsum = sum + plText[i];\r\n\t\tsum = sum + blText[1];\r\n\t\tsum -= RANGE;\r\n\t\tSystem.out.print(sum);\r\n\t\tdo {\r\n\t\t\tfor(char m: plText) {\r\n\t\t\t\r\n\t\t\t\tif (sum >95) {\r\n\t\t\t\t\tsum -= RANGE;\r\n\t\t\t\t\tm += sum;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tm +=sum;\r\n\t\t\t\t\tenText[i] = m;\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}while(i<plainText.length());\r\n\t\tencryptedText = String.valueOf(enText);\r\n\t\t\r\n\t \r\n\t return encryptedText; \r\n\t}",
"public String encryptAESKey(String plainAESKey, PublicKey publicKey) throws Exception {\r\n Cipher cipher = Cipher.getInstance(\"RSA\");\r\n cipher.init(Cipher.ENCRYPT_MODE, publicKey);\r\n return Base64.getEncoder().encodeToString(cipher.doFinal(plainAESKey.getBytes()));\r\n }",
"public interface TextEncryptor {\n\n /**\n * Returns encrypted text.\n * @param text - text to be encrypted.\n * @return encrypted text.\n */\n String encrypt(String text);\n}",
"public static String encrypt(String data){\n\t\tif (data.equals(\"\") || data.equals(\"null\"))\n\t\t\treturn data;\n\t\ttry{\n\t\t\tjavax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER);\n\t\t\tcipher.init(javax.crypto.Cipher.ENCRYPT_MODE, new SecretKeySpec(ENCRYPTION_KEY.getBytes(Charset.forName(\"UTF-8\")), \"AES\"), new IvParameterSpec(new byte[16]));\n\t\t\tbyte[] encryptedBytes = cipher.doFinal(data.getBytes(Charset.forName(\"UTF-8\")));\n\t\t\treturn ENCRYPTION_PREFIX + new String(Base64.encodeBase64(encryptedBytes), Charset.forName(\"UTF-8\"));\n\t\t}catch (Exception e) {\n\t\t\tSystem.err.println( \"Error in EncryptionUtil.encrypt: \" + e );\n\t\t\treturn data;\n\t\t}\n\t}",
"public static String encrypt(String plaintext)\n {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(plaintext.getBytes(\"UTF-8\"));\n byte raw[] = md.digest();\n String hash = Converter.encodeBase64(raw);\n return hash;\n } catch (Exception ex) {\n /**\n * @logging\n * @reason Beim asymetrischen verschluesssseln ist ein Fehler aufgetreten.\n * @action Check Java -Installation\n */\n throw new RuntimeException(\"Error while executing hashing encryption: \" + ex.getMessage(), ex);\n }\n }",
"public String getPlainText();",
"public byte[] encryptStringToBytes(char[] sPlainText)\n\t{\n\t\tlong lCBCIV = _rnd.nextLong();\n\t\treturn encStrToBytes(sPlainText, lCBCIV);\n\t}",
"public static byte[] m24636a(Context context, String str, String str2) {\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n try {\n SecretKeySpec secretKeySpec = new SecretKeySpec(m24635a(context, str2), \"AES\");\n Cipher instance = Cipher.getInstance(\"AES/ECB/NoPadding\");\n instance.init(1, secretKeySpec);\n return instance.doFinal(str.getBytes(\"UTF-8\"));\n } catch (Exception e) {\n C5264a.m21622c(\"ENC\", \"AES cipher error, enc failed\");\n e.printStackTrace();\n return null;\n }\n }",
"private AES() {\n }",
"@SuppressWarnings(\"deprecation\")\n @Test\n public void AesBlock() throws IOException {\n byte[] bytes = \"hello, my name is inigo montoya\".getBytes();\n\n SecureRandom rand = new SecureRandom(entropySeed.getBytes());\n\n PaddedBufferedBlockCipher aesEngine = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine()));\n\n byte[] key = new byte[32];\n byte[] iv = new byte[16];\n\n // note: the IV needs to be VERY unique!\n rand.nextBytes(key); // 256bit key\n rand.nextBytes(iv); // 16bit block size\n\n\n byte[] encryptAES = CryptoAES.encrypt(aesEngine, key, iv, bytes, logger);\n byte[] decryptAES = CryptoAES.decrypt(aesEngine, key, iv, encryptAES, logger);\n\n if (Arrays.equals(bytes, encryptAES)) {\n fail(\"bytes should not be equal\");\n }\n\n if (!Arrays.equals(bytes, decryptAES)) {\n fail(\"bytes not equal\");\n }\n }",
"public String encrypt(final String clearText)\n throws GeneralSecurityException, IOException {\n final String methodName = \":encrypt\";\n Logger.v(TAG + methodName, \"Starting encryption\");\n\n if (StringExtensions.isNullOrBlank(clearText)) {\n throw new IllegalArgumentException(\"Input is empty or null\");\n }\n\n // load key for encryption if not loaded\n mKey = loadSecretKeyForEncryption();\n mHMACKey = getHMacKey(mKey);\n\n Logger.i(TAG + methodName, \"\", \"Encrypt version:\" + mBlobVersion);\n final byte[] blobVersion = mBlobVersion.getBytes(AuthenticationConstants.ENCODING_UTF8);\n final byte[] bytes = clearText.getBytes(AuthenticationConstants.ENCODING_UTF8);\n\n // IV: Initialization vector that is needed to start CBC\n final byte[] iv = new byte[DATA_KEY_LENGTH];\n mRandom.nextBytes(iv);\n final IvParameterSpec ivSpec = new IvParameterSpec(iv);\n\n // Set to encrypt mode\n final Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);\n final Mac mac = Mac.getInstance(HMAC_ALGORITHM);\n cipher.init(Cipher.ENCRYPT_MODE, mKey, ivSpec);\n\n final byte[] encrypted = cipher.doFinal(bytes);\n\n // Mac output to sign encryptedData+IV. Keyversion is not included\n // in the digest. It defines what to use for Mac Key.\n mac.init(mHMACKey);\n mac.update(blobVersion);\n mac.update(encrypted);\n mac.update(iv);\n final byte[] macDigest = mac.doFinal();\n\n // Init array to store blobVersion, encrypted data, iv, macdigest\n final byte[] blobVerAndEncryptedDataAndIVAndMacDigest = new byte[blobVersion.length\n + encrypted.length + iv.length + macDigest.length];\n System.arraycopy(blobVersion, 0, blobVerAndEncryptedDataAndIVAndMacDigest, 0,\n blobVersion.length);\n System.arraycopy(encrypted, 0, blobVerAndEncryptedDataAndIVAndMacDigest,\n blobVersion.length, encrypted.length);\n System.arraycopy(iv, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length, iv.length);\n System.arraycopy(macDigest, 0, blobVerAndEncryptedDataAndIVAndMacDigest, blobVersion.length\n + encrypted.length + iv.length, macDigest.length);\n\n final String encryptedText = new String(Base64.encode(blobVerAndEncryptedDataAndIVAndMacDigest,\n Base64.NO_WRAP), AuthenticationConstants.ENCODING_UTF8);\n Logger.v(TAG + methodName, \"Finished encryption\");\n\n return getEncodeVersionLengthPrefix() + ENCODE_VERSION + encryptedText;\n }",
"public String encrypt(String plainTextPayload, String sdbPath) {\n return awsCrypto\n .encryptString(\n encryptCryptoMaterialsManager, plainTextPayload, buildEncryptionContext(sdbPath))\n .getResult();\n }",
"public static byte[][] encryptTexts(byte[][] plainTexts) {\n byte[][] cipherTexts = new byte[plainTexts.length][];\n\n for (int i = 0; i < cipherTexts.length; i++) {\n cipherTexts[i] = AES.encrypt(plainTexts[i], key);\n }\n\n MainFrame.printToConsole(\"Plain texts are encrypted\\n\");\n return cipherTexts;\n }",
"public String encrypt(String unencryptedString) throws InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException {\n String encryptedString = null;\n try{\n cipher.init(Cipher.ENCRYPT_MODE, key);\n byte[] plainText = unencryptedString.getBytes(UNICODE_FORMAT);\n byte[] encryptedText = cipher.doFinal(plainText);\n BASE64Encoder base64encoder = new BASE64Encoder();\n // encryptedString = base64encoder.<span class=\"\\IL_AD\\\" id=\"\\IL_AD9\\\">encode</span>(encryptedText);\n encryptedString = base64encoder.encode(encryptedText);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n return encryptedString;\n }",
"public void test() {\n\t\t// super.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.main);\n\t\tString masterPassword = \"abcdefghijklmn\";\n\t\tString originalText = \"i see qinhubao eat milk!\";\n\t\tbyte[] text = new byte[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\t\tbyte[] password = new byte[] { 'a' };\n\t\ttry {\n\t\t\tString encryptingCode = encrypt(masterPassword, originalText);\n\t\t\t// System.out.println(\"加密结果为 \" + encryptingCode);\n\t\t\tLog.i(\"加密结果为 \", encryptingCode);\n\t\t\tString decryptingCode = decrypt(masterPassword, encryptingCode);\n\t\t\tSystem.out.println(\"解密结果为 \" + decryptingCode);\n\t\t\tLog.i(\"解密结果\", decryptingCode);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public byte[] encryptPassword(String password) {\n byte[] encodedBytes = null;\n\n try {\n Cipher c = Cipher.getInstance(\"AES\");\n c.init(Cipher.ENCRYPT_MODE, sks);\n encodedBytes = c.doFinal(password.getBytes());\n } catch (Exception e) {\n Log.e(TAG, \"AES encryption error\");\n }\n\n //String encryptedText = Base64.encodeToString(encodedBytes, Base64.DEFAULT);\n\n //Log.v(\"Encrypted Text\", encryptedText);\n\n return encodedBytes;\n }",
"@Test\n\tpublic void testDecrypt() throws GeneralSecurityException, IOException {\n\t\tString cipher = \"4VGdDR9qJlq36bQGI+Sx3A==\";\n\t\tString key = \"io.github.odys-z\";\n\t\tString iv = \"DITVJZA2mSDAw496hBz6BA==\";\n\t\tString plain = AESHelper.decrypt(cipher, key,\n\t\t\t\t\t\t\tAESHelper.decode64(iv));\n\t\tassertEquals(\"Plain Text\", plain.trim());\n\n\t\tplain = \"-----------admin\";\n\t\tkey = \"----------123456\";\n\t\tiv = \"ZqlZsmoC3SNd2YeTTCkbVw==\";\n\t\t// PCKS7 Padding results not suitable for here - AES-128/CBC/NoPadding\n\t\tassertNotEquals(\"3A0hfZiaozpwMeYs3nXdAb8mGtVc1KyGTyad7GZI8oM=\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t\t\n\t\tiv = \"CTpAnB/jSRQTvelFwmJnlA==\";\n\t\tassertEquals(\"WQiXlFCt5AGCabjSCkVh0Q==\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t}",
"private byte[] encStrToBytes(char[] sPlainText, long lNewCBCIV)\n\t{\n\t\tint nI, nPos, nStrLen;\n\t\tchar cActChar;\n\t\tbyte bPadVal;\n\t\tbyte[] buf;\n\t\tint nNumBytes;\n\t\tnStrLen = sPlainText.length;\n\t\tnNumBytes = ((nStrLen << 1) & ~7) + 8;\n\t\tbuf = new byte[nNumBytes];\n\t\t// System.out.println(\"CBCIV = [\" + Long.toString(lNewCBCIV) + \"] hex = [\" + Long.toHexString(lNewCBCIV) + \"]\");\n\t\t// System.out.print(\"text = [\");\n\t\t// for (int i = 0; i < sPlainText.length; i++ ) {\n\t\t// System.out.print( sPlainText[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Alocated \" + nNumBytes + \" byte buffer\");\n\t\t// System.out.println(\"Buffer length = \" + buf.length + \" bytes\");\n\t\tnPos = 0;\n\t\tfor (nI = 0; nI < nStrLen; nI++)\n\t\t{\n\t\t\tcActChar = sPlainText[nI];\n\t\t\tbuf[nPos++] = (byte) ((cActChar >> 8) & 0x0ff);\n\t\t\tbuf[nPos++] = (byte) (cActChar & 0x0ff);\n\t\t}\n\t\tbPadVal = (byte) (buf.length - (nStrLen << 1));\n\t\twhile (nPos < buf.length)\n\t\t{\n\t\t\tbuf[nPos++] = bPadVal;\n\t\t}\n\t\t// int bytesPrinted = 0;\n\t\t// System.out.print(\"unencryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( (int)buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// bytesPrinted++;\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Buf length check \" + nNumBytes + \" = \" + buf.length);\n\t\t// System.out.println(\"Bytes printed = \" + bytesPrinted);\n\t\tm_bfc.setCBCIV(lNewCBCIV);\n\t\tm_bfc.encrypt(buf, 0, buf, 0, buf.length);\n\t\t// System.out.println(\"Encrypted buffer length = \" + buf.length + \" bytes\");\n\t\t// System.out.print(\" encryp bytes=[\");\n\t\t// for (int i = 0; i < nNumBytes; i++){\n\t\t// System.out.print( buf[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\tint totalNumBytes = EQBlowfishECB.BLOCKSIZE + buf.length;\n\t\tbyte[] result = new byte[totalNumBytes];\n\t\tEQBinConverter.longToByteArray(lNewCBCIV, result, 0);\n\t\tint count = 0;\n\t\tfor (int i = EQBlowfishECB.BLOCKSIZE; i < totalNumBytes; i++)\n\t\t{\n\t\t\tresult[i] = buf[count++];\n\t\t}\n\t\t// System.out.print(\" CBCIV bytes=[\");\n\t\t// for (int i = 0; i < EQBlowfishCBC.BLOCKSIZE; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\t// System.out.println(\"Final Buffer length = \" + result.length + \" bytes\");\n\t\t// System.out.print(\" final bytes=[\");\n\t\t// for (int i = 0; i < totalNumBytes; i++){\n\t\t// System.out.print( result[i]);\n\t\t// System.out.print( \",\");\n\t\t// }\n\t\t// System.out.println(\"]\");\n\t\treturn result;\n\t}",
"private AES() {\r\n\r\n }",
"void encryptText() {\n\n ArrayList<Character> punctuation = new ArrayList<>(\n Arrays.asList('\\'', ':', ',', '-', '-', '.', '!', '(', ')', '?', '\\\"', ';'));\n\n for (int i = 0; i < text.length(); ++i) {\n\n if (punctuation.contains(this.text.charAt(i))) {\n\n // only remove punctuation if not ? or . at the very end\n if (!((i == text.length() - 1) && (this.text.charAt(i) == '?' || this.text.charAt(i) == '.'))) {\n this.text.deleteCharAt(i);\n\n // go back to previous position since current char was deleted,\n // meaning the length of the string is now 1 less than before\n --i;\n }\n }\n }\n \n \n // Step 2: convert phrase to lowerCase\n\n this.setText(new StringBuilder(this.text.toString().toLowerCase()));\n\n \n // Step 3: split the phrase up into words and encrypt each word separately using secret key\n\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n \n // Step 3.1:\n\n ArrayList<Character> vowels = new ArrayList<>(Arrays.asList('a', 'e', 'i', 'o', 'u'));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if first char is vowel, add y1x3x4 to the end of word\n if (vowels.contains(words.get(i).charAt(0))) \n words.set(i, words.get(i).substring(0, words.get(i).length()) + this.secretKey.substring(3, 6));\n\n // otherwise, move first char to end of the word, then add x1x2 to the end of word\n else \n words.set(i, words.get(i).substring(1, words.get(i).length()) + words.get(i).charAt(0) + this.secretKey.substring(0, 2));\n }\n\n StringBuilder temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n\n \n // Step 3.2:\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // if position is a multiple of z, insert the special char y2\n if ((i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) && (i != 0)) {\n this.getText().replace(0, this.getText().length(), this.getText().substring(0, i) + this.secretKey.charAt(8)\n + this.getText().substring(i, this.getText().length()));\n }\n }\n \n }",
"public String encryptString(String plaintext, Random rndgen) {\n return encStr(plaintext, rndgen.nextLong());\n }",
"public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }",
"PBEncryptStorage encrypt(String inputString, String password, byte[] salt);",
"@Test\r\n public void testEncryptDecryptPlaintextBadCipher() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"\".getBytes();\r\n byte[] add = \"Random authenticated additional data\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n CryptoDetached result = instance.encryptPlaintext(data, add, keys);\r\n result.cipher = Base64.getEncoder().encodeToString(\"bad cipher\".getBytes());\r\n\r\n Assertions.assertThrows(SodiumException.class, () -> {\r\n instance.decryptPlaintext(result, add, keys);\r\n });\r\n }",
"public static String encrypt(String input) {\n\t\tBase64.Encoder encoder = Base64.getMimeEncoder();\n String message = input;\n String key = encoder.encodeToString(message.getBytes());\n return key;\n\t}",
"public String decrypt(String encryptedText) throws IOException\n {\n int len = encryptedText.length();\n if ((len % 32) != 0)\n throw new IOException(\"Serious error: decryption string has incorrect length \"\n + \"- please contact Simon\");\n byte[] encrypted = new byte[len/2];\n for (int i=0; i<len; i+=2)\n {\n encrypted[i/2] = (byte) ((Character.digit(encryptedText.charAt(i), 16) << 4)\n + Character.digit(encryptedText.charAt(i+1), 16));\n }\n\n try\n {\n SecretKeySpec key = new SecretKeySpec(secretKeyBytes, \"AES\");\n Cipher cipher = Cipher.getInstance(\"AES\");\n\n cipher.init(Cipher.DECRYPT_MODE, key);\n byte[] decrypted = cipher.doFinal(encrypted);\n return new String(decrypted, \"UTF-8\");\n }\n catch (Exception ex)\n {\n throw new IOException(\"Serious error: Password decryption failed \"\n + \"- please contact Simon\");\n }\n }",
"public abstract String encryptMsg(String msg);",
"@Override\n\tpublic String decryptAES(byte[] key, String cipherText) {\n\t\ttry{\n\t\t\tbyte[] encryptedIvTextBytes = DatatypeConverter.parseHexBinary(cipherText);\n\t int ivSize = 16;\n\n\t byte[] iv = new byte[ivSize];\n\t System.arraycopy(encryptedIvTextBytes, 0, iv, 0, iv.length);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t int encryptedSize = encryptedIvTextBytes.length - ivSize;\n\t byte[] encryptedBytes = new byte[encryptedSize];\n\t System.arraycopy(encryptedIvTextBytes, ivSize, encryptedBytes, 0, encryptedSize);\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t Cipher cipherDecrypt = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t cipherDecrypt.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] decrypted = cipherDecrypt.doFinal(encryptedBytes);\n\n\t return new String(decrypted);\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}",
"public static int[] teaEncrypt(int[] plainText) {\n int l = plainText[0];\n int r = plainText[1];\n int mult = 255 / 32;\n int sum = 0;\n for(int i = 0; i < 32; i++) {\n sum += DELTA;\n l += ((r << 4) + KEY) ^ (r + sum) ^ ((r >> 5) + KEY);\n r += ((l << 4) + KEY) ^ (l + sum) ^ ((l >> 5) + KEY);\n }\n int[] cipherText = {l, r};\n return cipherText;\n }",
"public static byte [] encrypt(byte [] plainText, PublicKey encryptionKey) {\r\n\t\tif(plainText == null) return null;\r\n\t\t// needed len = wrappedKey + E[ encodedVerificationKey + Signature + plainText ]\r\n\t\tbyte [] outputBuffer = new byte[plainText.length+MIN_BUF_SIZE];\r\n\t\ttry {\r\n\t\t\t// generate a secret symmetric key\r\n\t\t\tKeyGenerator keyGenerator = KeyGenerator.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tkeyGenerator.init(SYMMETRIC_KEY_LENGTH);\r\n\t\t\tSecretKey secretKey = keyGenerator.generateKey();\r\n\t\t\t// encrypt (wrap) the secret symmetric key using the public encryption key of the receiver\r\n\t\t\tCipher wrapper = Cipher.getInstance(encryptionAlgorithm);\r\n\t\t\twrapper.init(Cipher.WRAP_MODE, encryptionKey);\r\n\t\t\tbyte [] wrappedSecretKey = wrapper.wrap(secretKey);\r\n\r\n\t\t\t// place the length of the wrappedKey followed by the wrapped key into the output buffer at outputBuffer[0]\r\n\t\t\t// cursor points to the next available location in outputBuffer\r\n\t\t\tint cursor = packToByteArray(wrappedSecretKey, outputBuffer, 0);\r\n\t\t\tint encryptionCursor = cursor;\t// marker for start of encryption\r\n\r\n\t\t\t// add the length of the plain text to the message. We only push the length\r\n\t\t\t// of the message into the buffer, because we can do encryption in steps and avoid copies\r\n\t\t\toutputBuffer[cursor] = (byte)((plainText.length & 0xff00) >>> 8);\t// msb of plainText\r\n\t\t\toutputBuffer[cursor+1] = (byte)(plainText.length & 0xff);\t\t\t// lsb of plainText\r\n\t\t\tcursor += 2;\r\n\r\n\t\t\t// encrypt the message {PkLen,PublicKey,SLen,Signature,PtLen,PlainText}\r\n\t\t\tCipher encryptor = Cipher.getInstance(symmetricKeyAlgorithm);\r\n\t\t\tencryptor.init(Cipher.ENCRYPT_MODE, secretKey);\r\n\t\t\t// encrypt upto the cursor, and reset cursor to point to the end of the encrypted stream in the output buffer\r\n\t\t\tcursor = encryptionCursor + encryptor.update(outputBuffer,encryptionCursor,cursor-encryptionCursor,outputBuffer,encryptionCursor);\r\n\t\t\t// encrypt the plain text. Cursor points to the end of the output buffer\r\n\t\t\tcursor += encryptor.doFinal(plainText, 0, plainText.length, outputBuffer, cursor);\r\n\r\n\t\t\t// return the encrypted bytes\r\n\t\t\treturn Arrays.copyOfRange(outputBuffer, 0, cursor);\r\n\t\t} catch(Exception e){\r\n\t\t\tlogger.log(Level.WARNING,\"Unable to encrypt message \"+new String(Arrays.copyOf(plainText, 10))+\"...\",e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static void main(String[] args) {\n\t\tString str = \"sentfrommyiphone\";\n\t\tString s = str.toUpperCase();\n\t\tString[] array = new String[16];\n\t\tString[] array1 = new String[16];\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tarray[i] = String.valueOf(s.charAt(i));\n\t\t}\n\t\t{\n\n\t\t\tarray1[0] = array[14];\n\t\t\tarray1[1] = array[10];\n\t\t\tarray1[2] = array[1];\n\t\t\tarray1[3] = array[9];\n\t\t\tarray1[4] = array[15];\n\t\t\tarray1[5] = array[2];\n\t\t\tarray1[6] = array[6];\n\t\t\tarray1[7] = array[13];\n\t\t\tarray1[8] = array[3];\n\t\t\tarray1[9] = array[12];\n\t\t\tarray1[10] = array[8];\n\t\t\tarray1[11] = array[5];\n\t\t\tarray1[12] = array[0];\n\t\t\tarray1[13] = array[4];\n\t\t\tarray1[14] = array[7];\n\t\t\tarray1[15] = array[12];\n\t\t}\n\t\tSystem.out.println(\"plaintext:\" + str);\n\t\tSystem.out.print(\"cipher:\");\n\t\tfor (int i = 0; i < array1.length; i++) {\n\t\t\tSystem.out.print(array1[i]);\n\t\t}\n\t}",
"public String encryptString(String message) {\n byte[] data = message.getBytes();\n return encrypt(new BigInteger(data)).toString();\n }",
"@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"Hello how are you?\";\r\n String result = instance.decrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }",
"public static String encryptCookie(String string) {\n byte[] encryptArray = Base64.getEncoder().encode(string.getBytes());\n String encstr = null;\n try {\n encstr = new String(encryptArray, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n return encstr;\n }",
"public byte[] encrypto(String base) throws Exception {\n\t\tSecretKeyFactory keyFactory = SecretKeyFactory.getInstance(PBKDF2);\r\n\t\tKeySpec pbeKeySpec = new PBEKeySpec(\"password\".toCharArray(), \"salt\".getBytes(), 1023, 128);\r\n\t\tSecretKey pbeSecretKey = keyFactory.generateSecret(pbeKeySpec);\r\n\t\t// Create SecretKey for AES by KeyFactory-With-Hmac\r\n\t\tSecretKey aesSecretKey = new SecretKeySpec(pbeSecretKey.getEncoded(), AES);\r\n\t\t\r\n\t\tCipher cipher = Cipher.getInstance(AES_CBC_PKCS5PADDING);\r\n//\t\tcipher.init(Cipher.ENCRYPT_MODE, aesSecretKey, SecureRandom.getInstance(\"SHA1PRNG\"));\r\n\t\tcipher.init(Cipher.ENCRYPT_MODE, aesSecretKey);\r\n\t\tbyte[] encrypted = cipher.doFinal(base.getBytes());\r\n\r\n\t\tSystem.out.println(\"IV: \" + new String(cipher.getIV()));\r\n\t\tSystem.out.println(\"AlgorithmParameter: \" + cipher.getParameters().getEncoded());\r\n\t\tCipher decryptor = Cipher.getInstance(AES_CBC_PKCS5PADDING);\r\n\t\tdecryptor.init(Cipher.DECRYPT_MODE, aesSecretKey, new IvParameterSpec(cipher.getIV()));\r\n\t\tSystem.out.println(\"Decrypted: \" + new String(decryptor.doFinal(encrypted)));\r\n\t\t\r\n\t\treturn encrypted;\r\n\t}",
"public final String a(String str, String str2) {\n try {\n SecretKeyFactory instance = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n char[] charArray = \"FreeFire_Shopee_20190813\".toCharArray();\n j.a((Object) charArray, \"(this as java.lang.String).toCharArray()\");\n Charset charset = d.h.d.f32688a;\n if (str2 != null) {\n byte[] bytes = str2.getBytes(charset);\n j.a((Object) bytes, \"(this as java.lang.String).getBytes(charset)\");\n SecretKey generateSecret = instance.generateSecret(new PBEKeySpec(charArray, bytes, 1000, BitmapCounterConfig.DEFAULT_MAX_BITMAP_COUNT));\n byte[] bArr = new byte[32];\n byte[] bArr2 = new byte[16];\n j.a((Object) generateSecret, \"secretKey\");\n System.arraycopy(generateSecret.getEncoded(), 0, bArr, 0, 32);\n System.arraycopy(generateSecret.getEncoded(), 32, bArr2, 0, 16);\n SecretKeySpec secretKeySpec = new SecretKeySpec(bArr, \"AES\");\n IvParameterSpec ivParameterSpec = new IvParameterSpec(bArr2);\n Cipher instance2 = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\n instance2.init(2, secretKeySpec, ivParameterSpec);\n byte[] doFinal = instance2.doFinal(v.h(str));\n j.a((Object) doFinal, \"decryptResult\");\n return new String(doFinal, d.h.d.f32688a);\n }\n throw new m(\"null cannot be cast to non-null type java.lang.String\");\n } catch (Exception e2) {\n e2.printStackTrace();\n return str;\n }\n }",
"public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }",
"private static byte[] m24637b(Context context, byte[] bArr, String str) {\n SecretKeySpec secretKeySpec = new SecretKeySpec(m24635a(context, str), \"AES\");\n try {\n Cipher instance = Cipher.getInstance(\"AES/ECB/NoPadding\");\n instance.init(2, secretKeySpec);\n return instance.doFinal(bArr);\n } catch (Exception e) {\n C5264a.m21622c(\"ENC\", \"AES cipher error, dec failed\");\n e.printStackTrace();\n return null;\n }\n }",
"public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\t\t\n\t\t\n\n\t\tSystem.out.println(secKey.toString());\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.DECRYPT_MODE, secKey);\n\n\t\tbyte[] bytePlainText = aesCipher.doFinal(byteCipherText);\n\t\t\n\t\t\n\n\t\treturn new String(bytePlainText);\n\n\t}",
"public String encode(String plainText)\n\t{\n\t\tthis.encoding(plainText);\n\t\treturn this.encodedText;\n\t}",
"public static byte[] encryptMsg(String message, SecretKey secret) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidParameterSpecException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException {\r\n Cipher cipher = null;\r\n cipher = Cipher.getInstance(\"AES/ECB/PKCS5Padding\");\r\n cipher.init(Cipher.ENCRYPT_MODE, secret);\r\n byte[] cipherText = cipher.doFinal(message.getBytes(\"UTF-8\"));\r\n return cipherText;\r\n }",
"private static String m5297cj() {\n try {\n KeyGenerator instance = KeyGenerator.getInstance(\"AES\");\n instance.init(128);\n return Base64.encodeToString(instance.generateKey().getEncoded(), 0);\n } catch (Throwable unused) {\n return null;\n }\n }",
"private String encryptMessage(String message) {\n int MESSAGE_LENGTH = message.length();\n //TODO: throw SizeTooBigException for message requirements\n if(MESSAGE_LENGTH > 1300){\n\n throw new SizeTooBigException();\n }\n\n final int length = message.length();\n String encryptedMessage = \"\";\n for (int i = 0; i < length; i++) {\n //TODO: throw InvalidCharacterException for message requirements\n int m = message.charAt(i);\n int k = this.kissKey.keyAt(i) - 'a';\n int value = m ^ k;\n encryptedMessage += (char) value;\n }\n return encryptedMessage;\n }",
"@org.junit.Test\n public void testCipher() {\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", true));\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", false));\n\n Assert.assertEquals(\"B\", Vigenere.cipher(\"A\", \"B\", true));\n Assert.assertEquals(\"A\", Vigenere.cipher(\"B\", \"B\", false));\n\n String plain = \"DUCOFIJMA\";\n String key = \"ABC\";\n String shouldEncryptTo = \"DVEOGKJNC\";\n String actualEncrypted = Vigenere.cipher(plain, key, true);\n Assert.assertEquals(shouldEncryptTo, actualEncrypted);\n String decrypted = Vigenere.cipher(shouldEncryptTo, key, false);\n Assert.assertEquals(plain, decrypted);\n }",
"@SuppressWarnings(\"deprecation\")\n @Test\n public void AesWithIVBlock() throws IOException {\n byte[] bytes = \"hello, my name is inigo montoya\".getBytes();\n\n SecureRandom rand = new SecureRandom(entropySeed.getBytes());\n\n PaddedBufferedBlockCipher aesEngine = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESFastEngine()));\n\n byte[] key = new byte[32]; // 256bit key\n byte[] iv = new byte[aesEngine.getUnderlyingCipher().getBlockSize()];\n\n // note: the IV needs to be VERY unique!\n rand.nextBytes(key);\n rand.nextBytes(iv);\n\n\n byte[] encryptAES = CryptoAES.encryptWithIV(aesEngine, key, iv, bytes, logger);\n byte[] decryptAES = CryptoAES.decryptWithIV(aesEngine, key, encryptAES, logger);\n\n if (Arrays.equals(bytes, encryptAES)) {\n fail(\"bytes should not be equal\");\n }\n\n if (!Arrays.equals(bytes, decryptAES)) {\n fail(\"bytes not equal\");\n }\n }",
"String encrypt(String input) throws IllegalArgumentException, EncryptionException;",
"public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }"
]
| [
"0.7670004",
"0.7355369",
"0.70142275",
"0.6917722",
"0.6900583",
"0.68650895",
"0.6851284",
"0.68244207",
"0.67455256",
"0.67286086",
"0.66739345",
"0.6543891",
"0.64938086",
"0.6429624",
"0.6412331",
"0.63965774",
"0.6386",
"0.63684195",
"0.6357354",
"0.63341975",
"0.62469435",
"0.624451",
"0.6231558",
"0.6173365",
"0.6163179",
"0.61587566",
"0.6142685",
"0.61347765",
"0.6112822",
"0.61093575",
"0.6101403",
"0.6087501",
"0.60806966",
"0.6076948",
"0.6061415",
"0.6058483",
"0.60212415",
"0.6018319",
"0.6011666",
"0.60083866",
"0.59912956",
"0.59860444",
"0.59810066",
"0.5975357",
"0.5948842",
"0.5948223",
"0.5938005",
"0.5918532",
"0.5903851",
"0.5883484",
"0.587571",
"0.58580285",
"0.5853724",
"0.5830775",
"0.5830162",
"0.58173317",
"0.58030427",
"0.5798007",
"0.57906663",
"0.5790267",
"0.5788419",
"0.5784022",
"0.57712996",
"0.57693684",
"0.57688487",
"0.57637215",
"0.57552546",
"0.5752346",
"0.5746319",
"0.5742218",
"0.57343197",
"0.5727983",
"0.5725665",
"0.5715773",
"0.5696071",
"0.56885046",
"0.56787825",
"0.5674922",
"0.5671806",
"0.5668096",
"0.56577086",
"0.5657193",
"0.5646441",
"0.56445134",
"0.5636983",
"0.56237155",
"0.5617466",
"0.5616335",
"0.5601678",
"0.55928934",
"0.55828756",
"0.5575806",
"0.557229",
"0.5571973",
"0.5561965",
"0.5559965",
"0.5554619",
"0.5549424",
"0.5548191",
"0.55450857"
]
| 0.68309844 | 7 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.about, 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 |
Creates a new instance of this FieldWriter and configures is such that writing a value required minimal branching or secondary operations (metadata lookups, etc..) | public VarCharFieldWriter(VarCharExtractor extractor, VarCharVector vector, ConstraintProjector rawConstraint)
{
this.extractor = extractor;
this.vector = vector;
if (rawConstraint != null) {
constraint = (NullableVarCharHolder value) -> rawConstraint.apply(value.isSet == 0 ? null : value.value);
}
else {
constraint = (NullableVarCharHolder value) -> true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Builder(Value other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.kd_kelas)) {\n this.kd_kelas = data().deepCopy(fields()[0].schema(), other.kd_kelas);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.hari_ke)) {\n this.hari_ke = data().deepCopy(fields()[1].schema(), other.hari_ke);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.jam_mulai)) {\n this.jam_mulai = data().deepCopy(fields()[2].schema(), other.jam_mulai);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.jam_selesai)) {\n this.jam_selesai = data().deepCopy(fields()[3].schema(), other.jam_selesai);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tgl_mulai_otomatis_buat_jadwal)) {\n this.tgl_mulai_otomatis_buat_jadwal = data().deepCopy(fields()[4].schema(), other.tgl_mulai_otomatis_buat_jadwal);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.tgl_berakhir_otomatis_buat_jadwal)) {\n this.tgl_berakhir_otomatis_buat_jadwal = data().deepCopy(fields()[5].schema(), other.tgl_berakhir_otomatis_buat_jadwal);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.aktif)) {\n this.aktif = data().deepCopy(fields()[6].schema(), other.aktif);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.kd_mk)) {\n this.kd_mk = data().deepCopy(fields()[7].schema(), other.kd_mk);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nama_mk)) {\n this.nama_mk = data().deepCopy(fields()[8].schema(), other.nama_mk);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.nama_kelas)) {\n this.nama_kelas = data().deepCopy(fields()[9].schema(), other.nama_kelas);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.nama_hari)) {\n this.nama_hari = data().deepCopy(fields()[10].schema(), other.nama_hari);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.ts_update)) {\n this.ts_update = data().deepCopy(fields()[11].schema(), other.ts_update);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.kd_org)) {\n this.kd_org = data().deepCopy(fields()[12].schema(), other.kd_org);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.thn)) {\n this.thn = data().deepCopy(fields()[13].schema(), other.thn);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.term)) {\n this.term = data().deepCopy(fields()[14].schema(), other.term);\n fieldSetFlags()[14] = true;\n }\n }",
"protected void writeFields(O operation, FieldWriter fieldWriter) {\n\t\t\n\t\tfieldWriter.writeField(DattyField.OPCODE, operation.getCode());\n\t\t\n\t\tString setName = operation.getSetName();\n\t\tif (setName != null) {\n\t\t\tfieldWriter.writeField(DattyField.SET_NAME, setName);\n\t\t}\n\t\t\n\t\tString superKey = operation.getSuperKey();\n\t\tif (superKey != null) {\n\t\t\tfieldWriter.writeField(DattyField.SUPER_KEY, superKey);\n\t\t}\n\t\t\n\t\tString majorKey = operation.getMajorKey();\n\t\tif (majorKey != null) {\n\t\t\tfieldWriter.writeField(DattyField.MAJOR_KEY, majorKey);\n\t\t}\t\t\n\t\t\n\t\tif (operation.hasTimeoutMillis()) {\n\t\t\tfieldWriter.writeField(DattyField.TIMEOUT_MLS, operation.getTimeoutMillis());\n\t\t}\t\t\n\t\t\n\t}",
"private Builder(export.serializers.avro.DeviceInfo other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.site)) {\n this.site = data().deepCopy(fields()[0].schema(), other.site);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.service)) {\n this.service = data().deepCopy(fields()[1].schema(), other.service);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sector)) {\n this.sector = data().deepCopy(fields()[2].schema(), other.sector);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.room)) {\n this.room = data().deepCopy(fields()[3].schema(), other.room);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.alias)) {\n this.alias = data().deepCopy(fields()[4].schema(), other.alias);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.serialPort)) {\n this.serialPort = data().deepCopy(fields()[5].schema(), other.serialPort);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.driver)) {\n this.driver = data().deepCopy(fields()[6].schema(), other.driver);\n fieldSetFlags()[6] = true;\n }\n }",
"public StringSetField build() {\n Objects.requireNonNull(value, StringSetField.class + \": value is missing\");\n return new StringSetFieldImpl(value);\n }",
"public void apply() { writable.setValue(value); }",
"Field() {\n value = 0;\n }",
"public static StringBuffer writeXML_DBField(StringBuffer sb, int indent, DBField fld, boolean inclInfo, String value, boolean soapXML)\n {\n // -- <Field name=\"NAME\" primaryKey=\"true\" alternateKeys=\"A,B,C\" type=\"DATATYPE\", title=\"TITLE\">VALUE</FIELD>\n\n /* begin Field tag */\n sb.append(XMLTools.PREFIX(soapXML,indent)); \n sb.append(XMLTools.startTAG(soapXML,TAG_Field,\n XMLTools.ATTR(ATTR_name,fld.getName()) +\n (fld.isPrimaryKey()? XMLTools.ATTR(ATTR_primaryKey,\"true\") : \"\") + \n (fld.isAlternateKey()? XMLTools.ATTR(ATTR_alternateKeys,StringTools.join(fld.getAlternateIndexes(),',')) : \"\") + \n (inclInfo? (XMLTools.ATTR(ATTR_type,fld.getDataType()) + XMLTools.ATTR(ATTR_title,fld.getTitle(null))) : \"\"),\n (value == null), (value == null)));\n\n /* valid */\n if (value != null) {\n\n /* value */\n if (fld.isBoolean()) {\n // \"true\" / \"false\"\n sb.append(StringTools.parseBoolean(value,false));\n } else\n if (fld.isNumeric()) {\n // numeric value\n sb.append(value);\n } else\n if (fld.isBinary()) {\n // displayed in hex\n sb.append(value);\n } else { \n // String\n if (!StringTools.isBlank(value)) {\n sb.append(XMLTools.CDATA(soapXML,value));\n }\n }\n \n /* end Field tag */\n sb.append(XMLTools.endTAG(soapXML,TAG_Field,true));\n \n }\n \n /* field xml */\n //Print.logInfo(\"==> \" + sb.toString());\n return sb;\n\n }",
"FieldDefinition createFieldDefinition();",
"private Builder(export.serializers.avro.DeviceInfo.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.site)) {\n this.site = data().deepCopy(fields()[0].schema(), other.site);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.service)) {\n this.service = data().deepCopy(fields()[1].schema(), other.service);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.sector)) {\n this.sector = data().deepCopy(fields()[2].schema(), other.sector);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.room)) {\n this.room = data().deepCopy(fields()[3].schema(), other.room);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.alias)) {\n this.alias = data().deepCopy(fields()[4].schema(), other.alias);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.serialPort)) {\n this.serialPort = data().deepCopy(fields()[5].schema(), other.serialPort);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.driver)) {\n this.driver = data().deepCopy(fields()[6].schema(), other.driver);\n fieldSetFlags()[6] = true;\n }\n }",
"@Override\n public void serializeAsField(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) return;\n {\n jsonGenerator.writeFieldName(this._name);\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n }\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) return;\n } else if (this._suppressableValue.equals(object2)) {\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n jsonGenerator.writeFieldName(this._name);\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }",
"@Test\n public void createWithFieldBuilder() throws Exception {\n Document doc = new Document();\n\n // A convenient way of adding text content to a document is with a document builder.\n DocumentBuilder builder = new DocumentBuilder(doc);\n builder.write(\" Hello world! This text is one Run, which is an inline node.\");\n\n // Fields have their builder, which we can use to construct a field code piece by piece.\n // In this case, we will construct a BARCODE field representing a US postal code,\n // and then insert it in front of a Run.\n FieldBuilder fieldBuilder = new FieldBuilder(FieldType.FIELD_BARCODE);\n fieldBuilder.addArgument(\"90210\");\n fieldBuilder.addSwitch(\"\\\\f\", \"A\");\n fieldBuilder.addSwitch(\"\\\\u\");\n\n fieldBuilder.buildAndInsert(doc.getFirstSection().getBody().getFirstParagraph().getRuns().get(0));\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.CreateWithFieldBuilder.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.CreateWithFieldBuilder.docx\");\n\n TestUtil.verifyField(FieldType.FIELD_BARCODE, \" BARCODE 90210 \\\\f A \\\\u \", \"\", doc.getRange().getFields().get(0));\n\n Assert.assertEquals(doc.getFirstSection().getBody().getFirstParagraph().getRuns().get(11).getPreviousSibling(), doc.getRange().getFields().get(0).getEnd());\n Assert.assertEquals(MessageFormat.format(\"BARCODE 90210 \\\\f A \\\\u {0} Hello world! This text is one Run, which is an inline node.\", ControlChar.FIELD_END_CHAR),\n doc.getText().trim());\n }",
"public DBFWriter() {\r\n\t\tthis.header = new DBFHeader();\r\n\t}",
"private Builder(com.babbler.ws.io.avro.model.BabbleValue other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.author)) {\n this.author = data().deepCopy(fields()[0].schema(), other.author);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.content)) {\n this.content = data().deepCopy(fields()[1].schema(), other.content);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.timestamp)) {\n this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.location)) {\n this.location = data().deepCopy(fields()[3].schema(), other.location);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tags)) {\n this.tags = data().deepCopy(fields()[4].schema(), other.tags);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.mentions)) {\n this.mentions = data().deepCopy(fields()[5].schema(), other.mentions);\n fieldSetFlags()[5] = true;\n }\n }",
"public Field(int value) {\n\n if (isPowerOfTwo(value)) {\n this.value = value;\n } else {\n throw new IllegalArgumentException(\"Value has to be a power of 2\");\n }\n }",
"public BeanPropertyWriter(BeanPropertyDefinition beanPropertyDefinition, AnnotatedMember annotatedMember, Annotations object, JavaType javaType, JsonSerializer<?> jsonSerializer, TypeSerializer typeSerializer, JavaType javaType2, boolean bl2, Object object2) {\n this._member = annotatedMember;\n this._contextAnnotations = object;\n this._name = new SerializedString(beanPropertyDefinition.getName());\n this._wrapperName = beanPropertyDefinition.getWrapperName();\n this._declaredType = javaType;\n this._serializer = jsonSerializer;\n object = jsonSerializer == null ? PropertySerializerMap.emptyMap() : null;\n this._dynamicSerializers = object;\n this._typeSerializer = typeSerializer;\n this._cfgSerializationType = javaType2;\n this._metadata = beanPropertyDefinition.getMetadata();\n if (annotatedMember instanceof AnnotatedField) {\n this._accessorMethod = null;\n this._field = (Field)annotatedMember.getMember();\n } else {\n if (!(annotatedMember instanceof AnnotatedMethod)) {\n throw new IllegalArgumentException(\"Can not pass member of type \" + annotatedMember.getClass().getName());\n }\n this._accessorMethod = (Method)annotatedMember.getMember();\n this._field = null;\n }\n this._suppressNulls = bl2;\n this._suppressableValue = object2;\n this._includeInViews = beanPropertyDefinition.findViews();\n this._nullSerializer = null;\n }",
"public Writer(Configuration conf, FileSystem fs, String dirName,\n\t\t\t\tSchema keySchema, Schema valueSchema) throws IOException {\n\t\t\tthis(conf, fs, dirName, keySchema, valueSchema, null,\n\t\t\t\t\tDEFAULT_DEFLATE_LEVEL);\n\t\t}",
"public ConfigurationBuilder onlyFields() {\n\t\tconfigurationBuilder.setAccessStrategy(AccessStrategy.ONLY_FIELDS);\n\t\treturn configurationBuilder;\n\t}",
"public static void providePOJOsFieldAndGetterSetter(\n final FileWriterWrapper writer,\n final Field field)\n throws IOException {\n String javaType = mapType(field.getOriginalDataType());\n\n writer.write(\" private \" + javaType + \" \" + field.getJavaName()\n + \" = null;\\n\\n\");\n\n writer.write(\" public \" + javaType + \" \" + field.getGetterName()\n + \"() {\\n\");\n writer.write(\" return \" + field.getJavaName() + \";\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void \" + field.getSetterName() + \"(\"\n + javaType + \" newValue) {\\n\");\n writer.write(\" \" + field.getJavaName() + \" = newValue\"\n + \";\\n\");\n writer.write(\" }\\n\\n\");\n }",
"private Builder(Value.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.kd_kelas)) {\n this.kd_kelas = data().deepCopy(fields()[0].schema(), other.kd_kelas);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.hari_ke)) {\n this.hari_ke = data().deepCopy(fields()[1].schema(), other.hari_ke);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.jam_mulai)) {\n this.jam_mulai = data().deepCopy(fields()[2].schema(), other.jam_mulai);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.jam_selesai)) {\n this.jam_selesai = data().deepCopy(fields()[3].schema(), other.jam_selesai);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tgl_mulai_otomatis_buat_jadwal)) {\n this.tgl_mulai_otomatis_buat_jadwal = data().deepCopy(fields()[4].schema(), other.tgl_mulai_otomatis_buat_jadwal);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.tgl_berakhir_otomatis_buat_jadwal)) {\n this.tgl_berakhir_otomatis_buat_jadwal = data().deepCopy(fields()[5].schema(), other.tgl_berakhir_otomatis_buat_jadwal);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.aktif)) {\n this.aktif = data().deepCopy(fields()[6].schema(), other.aktif);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.kd_mk)) {\n this.kd_mk = data().deepCopy(fields()[7].schema(), other.kd_mk);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nama_mk)) {\n this.nama_mk = data().deepCopy(fields()[8].schema(), other.nama_mk);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.nama_kelas)) {\n this.nama_kelas = data().deepCopy(fields()[9].schema(), other.nama_kelas);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.nama_hari)) {\n this.nama_hari = data().deepCopy(fields()[10].schema(), other.nama_hari);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.ts_update)) {\n this.ts_update = data().deepCopy(fields()[11].schema(), other.ts_update);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.kd_org)) {\n this.kd_org = data().deepCopy(fields()[12].schema(), other.kd_org);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.thn)) {\n this.thn = data().deepCopy(fields()[13].schema(), other.thn);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.term)) {\n this.term = data().deepCopy(fields()[14].schema(), other.term);\n fieldSetFlags()[14] = true;\n }\n }",
"public Builder setThrift(\n com.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.Builder builderForValue) {\n if (thriftBuilder_ == null) {\n schema_ = builderForValue.build();\n onChanged();\n } else {\n thriftBuilder_.setMessage(builderForValue.build());\n }\n schemaCase_ = 2;\n return this;\n }",
"public FieldConfiguration(Configuration nearSwitch, Configuration scale, Configuration farSwitch) {\n this.nearSwitch = nearSwitch;\n this.scale = scale;\n this.farSwitch = farSwitch;\n }",
"public AnnotatedFieldWriter(String name, String mainAnnotationName, AnnotationSensitivities sensitivity,\n boolean mainPropHasPayloads, boolean needsPrimaryValuePayloads) {\n if (!AnnotatedFieldNameUtil.isValidXmlElementName(name))\n logger.warn(\"Field name '\" + name\n + \"' is discouraged (field/annotation names should be valid XML element names)\");\n if (!AnnotatedFieldNameUtil.isValidXmlElementName(mainAnnotationName))\n logger.warn(\"Annotation name '\" + mainAnnotationName\n + \"' is discouraged (field/annotation names should be valid XML element names)\");\n boolean includeOffsets = true;\n fieldName = name;\n this.needsPrimaryValuePayloads = needsPrimaryValuePayloads;\n mainAnnotation = new AnnotationWriter(this, mainAnnotationName, sensitivity, includeOffsets,\n mainPropHasPayloads, needsPrimaryValuePayloads);\n annotations.put(mainAnnotationName, mainAnnotation);\n }",
"public FieldsImpl() {\r\n logger.entering(CLASS_NAME, \"FieldsImpl()\");\r\n }",
"public com.fasterxml.jackson.databind.ser.BeanPropertyWriter buildWriter(com.fasterxml.jackson.databind.SerializerProvider r15, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition r16, com.fasterxml.jackson.databind.JavaType r17, com.fasterxml.jackson.databind.JsonSerializer<?> r18, com.fasterxml.jackson.databind.jsontype.TypeSerializer r19, com.fasterxml.jackson.databind.jsontype.TypeSerializer r20, com.fasterxml.jackson.databind.introspect.AnnotatedMember r21, boolean r22) throws com.fasterxml.jackson.databind.JsonMappingException {\n /*\n r14 = this;\n r1 = r14\n r2 = r15\n r4 = r16\n r0 = r20\n r13 = r21\n r3 = 0\n r7 = r17\n r5 = r22\n com.fasterxml.jackson.databind.JavaType r5 = r14.findSerializationType(r13, r5, r7) // Catch:{ JsonMappingException -> 0x0118 }\n if (r0 == 0) goto L_0x0042\n if (r5 != 0) goto L_0x0016\n r5 = r7\n L_0x0016:\n com.fasterxml.jackson.databind.JavaType r6 = r5.getContentType()\n if (r6 != 0) goto L_0x0039\n com.fasterxml.jackson.databind.BeanDescription r6 = r1._beanDesc\n java.lang.StringBuilder r8 = new java.lang.StringBuilder\n r8.<init>()\n java.lang.String r9 = \"serialization type \"\n r8.append(r9)\n r8.append(r5)\n java.lang.String r9 = \" has no content\"\n r8.append(r9)\n java.lang.String r8 = r8.toString()\n java.lang.Object[] r9 = new java.lang.Object[r3]\n r15.reportBadPropertyDefinition(r6, r4, r8, r9)\n L_0x0039:\n com.fasterxml.jackson.databind.JavaType r0 = r5.withContentTypeHandler(r0)\n r0.getContentType()\n r10 = r0\n goto L_0x0043\n L_0x0042:\n r10 = r5\n L_0x0043:\n r5 = 0\n if (r10 != 0) goto L_0x0048\n r0 = r7\n goto L_0x0049\n L_0x0048:\n r0 = r10\n L_0x0049:\n com.fasterxml.jackson.databind.SerializationConfig r6 = r1._config\n java.lang.Class r8 = r0.getRawClass()\n com.fasterxml.jackson.annotation.JsonInclude$Value r9 = r1._defaultInclusion\n com.fasterxml.jackson.annotation.JsonInclude$Value r6 = r6.getDefaultPropertyInclusion(r8, r9)\n com.fasterxml.jackson.annotation.JsonInclude$Value r8 = r16.findInclusion()\n com.fasterxml.jackson.annotation.JsonInclude$Value r6 = r6.withOverrides(r8)\n com.fasterxml.jackson.annotation.JsonInclude$Include r6 = r6.getValueInclusion()\n com.fasterxml.jackson.annotation.JsonInclude$Include r8 = com.fasterxml.jackson.annotation.JsonInclude.Include.USE_DEFAULTS\n if (r6 != r8) goto L_0x0067\n com.fasterxml.jackson.annotation.JsonInclude$Include r6 = com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS\n L_0x0067:\n int[] r8 = com.fasterxml.jackson.databind.ser.PropertyBuilder.C19781.$SwitchMap$com$fasterxml$jackson$annotation$JsonInclude$Include\n int r6 = r6.ordinal()\n r6 = r8[r6]\n r8 = 1\n switch(r6) {\n case 1: goto L_0x0087;\n case 2: goto L_0x007a;\n case 3: goto L_0x0076;\n case 4: goto L_0x00d0;\n default: goto L_0x0073;\n }\n L_0x0073:\n r8 = 0\n goto L_0x00d0\n L_0x0076:\n java.lang.Object r0 = com.fasterxml.jackson.databind.ser.BeanPropertyWriter.MARKER_FOR_EMPTY\n L_0x0078:\n r12 = r0\n goto L_0x0084\n L_0x007a:\n boolean r0 = r0.isReferenceType()\n if (r0 == 0) goto L_0x0083\n java.lang.Object r0 = com.fasterxml.jackson.databind.ser.BeanPropertyWriter.MARKER_FOR_EMPTY\n goto L_0x0078\n L_0x0083:\n r12 = r5\n L_0x0084:\n r11 = 1\n goto L_0x00e6\n L_0x0087:\n boolean r6 = r1._useRealPropertyDefaults\n if (r6 == 0) goto L_0x00b4\n java.lang.Object r6 = r14.getDefaultBean()\n if (r6 == 0) goto L_0x00b4\n com.fasterxml.jackson.databind.MapperFeature r0 = com.fasterxml.jackson.databind.MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS\n boolean r0 = r15.isEnabled(r0)\n if (r0 == 0) goto L_0x00a4\n com.fasterxml.jackson.databind.SerializationConfig r0 = r1._config\n com.fasterxml.jackson.databind.MapperFeature r9 = com.fasterxml.jackson.databind.MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS\n boolean r0 = r0.isEnabled(r9)\n r13.fixAccess(r0)\n L_0x00a4:\n java.lang.Object r0 = r13.getValue(r6) // Catch:{ Exception -> 0x00aa }\n r5 = r0\n goto L_0x00b9\n L_0x00aa:\n r0 = move-exception\n r9 = r0\n java.lang.String r0 = r16.getName()\n r14._throwWrapped(r9, r0, r6)\n goto L_0x00b9\n L_0x00b4:\n java.lang.Object r5 = r14.getDefaultValue(r0)\n r3 = 1\n L_0x00b9:\n if (r5 != 0) goto L_0x00bc\n goto L_0x0083\n L_0x00bc:\n java.lang.Class r0 = r5.getClass()\n boolean r0 = r0.isArray()\n if (r0 == 0) goto L_0x00cd\n java.lang.Object r0 = com.fasterxml.jackson.databind.util.ArrayBuilders.getArrayComparator(r5)\n r12 = r0\n r11 = r3\n goto L_0x00e6\n L_0x00cd:\n r11 = r3\n r12 = r5\n goto L_0x00e6\n L_0x00d0:\n boolean r0 = r0.isContainerType()\n if (r0 == 0) goto L_0x00e4\n com.fasterxml.jackson.databind.SerializationConfig r0 = r1._config\n com.fasterxml.jackson.databind.SerializationFeature r3 = com.fasterxml.jackson.databind.SerializationFeature.WRITE_EMPTY_JSON_ARRAYS\n boolean r0 = r0.isEnabled(r3)\n if (r0 != 0) goto L_0x00e4\n java.lang.Object r0 = com.fasterxml.jackson.databind.ser.BeanPropertyWriter.MARKER_FOR_EMPTY\n r12 = r0\n goto L_0x00e5\n L_0x00e4:\n r12 = r5\n L_0x00e5:\n r11 = r8\n L_0x00e6:\n com.fasterxml.jackson.databind.ser.BeanPropertyWriter r0 = new com.fasterxml.jackson.databind.ser.BeanPropertyWriter\n com.fasterxml.jackson.databind.BeanDescription r3 = r1._beanDesc\n com.fasterxml.jackson.databind.util.Annotations r6 = r3.getClassAnnotations()\n r3 = r0\n r4 = r16\n r5 = r21\n r7 = r17\n r8 = r18\n r9 = r19\n r3.<init>(r4, r5, r6, r7, r8, r9, r10, r11, r12)\n com.fasterxml.jackson.databind.AnnotationIntrospector r3 = r1._annotationIntrospector\n java.lang.Object r3 = r3.findNullSerializer(r13)\n if (r3 == 0) goto L_0x010b\n com.fasterxml.jackson.databind.JsonSerializer r2 = r15.serializerInstance(r13, r3)\n r0.assignNullSerializer(r2)\n L_0x010b:\n com.fasterxml.jackson.databind.AnnotationIntrospector r2 = r1._annotationIntrospector\n com.fasterxml.jackson.databind.util.NameTransformer r2 = r2.findUnwrappingNameTransformer(r13)\n if (r2 == 0) goto L_0x0117\n com.fasterxml.jackson.databind.ser.BeanPropertyWriter r0 = r0.unwrappingWriter(r2)\n L_0x0117:\n return r0\n L_0x0118:\n r0 = move-exception\n r5 = r0\n com.fasterxml.jackson.databind.BeanDescription r0 = r1._beanDesc\n java.lang.String r5 = r5.getMessage()\n java.lang.Object[] r3 = new java.lang.Object[r3]\n java.lang.Object r0 = r15.reportBadPropertyDefinition(r0, r4, r5, r3)\n com.fasterxml.jackson.databind.ser.BeanPropertyWriter r0 = (com.fasterxml.jackson.databind.ser.BeanPropertyWriter) r0\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.fasterxml.jackson.databind.ser.PropertyBuilder.buildWriter(com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition, com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.JsonSerializer, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.jsontype.TypeSerializer, com.fasterxml.jackson.databind.introspect.AnnotatedMember, boolean):com.fasterxml.jackson.databind.ser.BeanPropertyWriter\");\n }",
"@Test\n public void fieldBuilder() throws Exception {\n Document doc = new Document();\n\n // Below are three examples of field construction done using a field builder.\n // 1 - Single field:\n // Use a field builder to add a SYMBOL field which displays the ƒ (Florin) symbol.\n FieldBuilder builder = new FieldBuilder(FieldType.FIELD_SYMBOL);\n builder.addArgument(402);\n builder.addSwitch(\"\\\\f\", \"Arial\");\n builder.addSwitch(\"\\\\s\", 25);\n builder.addSwitch(\"\\\\u\");\n Field field = builder.buildAndInsert(doc.getFirstSection().getBody().getFirstParagraph());\n\n Assert.assertEquals(field.getFieldCode(), \" SYMBOL 402 \\\\f Arial \\\\s 25 \\\\u \");\n\n // 2 - Nested field:\n // Use a field builder to create a formula field used as an inner field by another field builder.\n FieldBuilder innerFormulaBuilder = new FieldBuilder(FieldType.FIELD_FORMULA);\n innerFormulaBuilder.addArgument(100);\n innerFormulaBuilder.addArgument(\"+\");\n innerFormulaBuilder.addArgument(74);\n\n // Create another builder for another SYMBOL field, and insert the formula field\n // that we have created above into the SYMBOL field as its argument. \n builder = new FieldBuilder(FieldType.FIELD_SYMBOL);\n builder.addArgument(innerFormulaBuilder);\n field = builder.buildAndInsert(doc.getFirstSection().getBody().appendParagraph(\"\"));\n\n // The outer SYMBOL field will use the formula field result, 174, as its argument,\n // which will make the field display the ® (Registered Sign) symbol since its character number is 174.\n Assert.assertEquals(\" SYMBOL \\u0013 = 100 + 74 \\u0014\\u0015 \", field.getFieldCode());\n\n // 3 - Multiple nested fields and arguments:\n // Now, we will use a builder to create an IF field, which displays one of two custom string values,\n // depending on the true/false value of its expression. To get a true/false value\n // that determines which string the IF field displays, the IF field will test two numeric expressions for equality.\n // We will provide the two expressions in the form of formula fields, which we will nest inside the IF field.\n FieldBuilder leftExpression = new FieldBuilder(FieldType.FIELD_FORMULA);\n leftExpression.addArgument(2);\n leftExpression.addArgument(\"+\");\n leftExpression.addArgument(3);\n\n FieldBuilder rightExpression = new FieldBuilder(FieldType.FIELD_FORMULA);\n rightExpression.addArgument(2.5);\n rightExpression.addArgument(\"*\");\n rightExpression.addArgument(5.2);\n\n // Next, we will build two field arguments, which will serve as the true/false output strings for the IF field.\n // These arguments will reuse the output values of our numeric expressions.\n FieldArgumentBuilder trueOutput = new FieldArgumentBuilder();\n trueOutput.addText(\"True, both expressions amount to \");\n trueOutput.addField(leftExpression);\n\n FieldArgumentBuilder falseOutput = new FieldArgumentBuilder();\n falseOutput.addNode(new Run(doc, \"False, \"));\n falseOutput.addField(leftExpression);\n falseOutput.addNode(new Run(doc, \" does not equal \"));\n falseOutput.addField(rightExpression);\n\n // Finally, we will create one more field builder for the IF field and combine all of the expressions. \n builder = new FieldBuilder(FieldType.FIELD_IF);\n builder.addArgument(leftExpression);\n builder.addArgument(\"=\");\n builder.addArgument(rightExpression);\n builder.addArgument(trueOutput);\n builder.addArgument(falseOutput);\n field = builder.buildAndInsert(doc.getFirstSection().getBody().appendParagraph(\"\"));\n\n Assert.assertEquals(\" IF \\u0013 = 2 + 3 \\u0014\\u0015 = \\u0013 = 2.5 * 5.2 \\u0014\\u0015 \" +\n \"\\\"True, both expressions amount to \\u0013 = 2 + 3 \\u0014\\u0015\\\" \" +\n \"\\\"False, \\u0013 = 2 + 3 \\u0014\\u0015 does not equal \\u0013 = 2.5 * 5.2 \\u0014\\u0015\\\" \", field.getFieldCode());\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.SYMBOL.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.SYMBOL.docx\");\n\n FieldSymbol fieldSymbol = (FieldSymbol) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_SYMBOL, \" SYMBOL 402 \\\\f Arial \\\\s 25 \\\\u \", \"\", fieldSymbol);\n Assert.assertEquals(\"ƒ\", fieldSymbol.getDisplayResult());\n\n fieldSymbol = (FieldSymbol) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_SYMBOL, \" SYMBOL \\u0013 = 100 + 74 \\u0014174\\u0015 \", \"\", fieldSymbol);\n Assert.assertEquals(\"®\", fieldSymbol.getDisplayResult());\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 100 + 74 \", \"174\", doc.getRange().getFields().get(2));\n\n TestUtil.verifyField(FieldType.FIELD_IF,\n \" IF \\u0013 = 2 + 3 \\u00145\\u0015 = \\u0013 = 2.5 * 5.2 \\u001413\\u0015 \" +\n \"\\\"True, both expressions amount to \\u0013 = 2 + 3 \\u0014\\u0015\\\" \" +\n \"\\\"False, \\u0013 = 2 + 3 \\u00145\\u0015 does not equal \\u0013 = 2.5 * 5.2 \\u001413\\u0015\\\" \",\n \"False, 5 does not equal 13\", doc.getRange().getFields().get(3));\n\n Document finalDoc = doc;\n Assert.assertThrows(AssertionError.class, () -> TestUtil.fieldsAreNested(finalDoc.getRange().getFields().get(2), finalDoc.getRange().getFields().get(3)));\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 2 + 3 \", \"5\", doc.getRange().getFields().get(4));\n TestUtil.fieldsAreNested(doc.getRange().getFields().get(4), doc.getRange().getFields().get(3));\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 2.5 * 5.2 \", \"13\", doc.getRange().getFields().get(5));\n TestUtil.fieldsAreNested(doc.getRange().getFields().get(5), doc.getRange().getFields().get(3));\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 2 + 3 \", \"\", doc.getRange().getFields().get(6));\n TestUtil.fieldsAreNested(doc.getRange().getFields().get(6), doc.getRange().getFields().get(3));\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 2 + 3 \", \"5\", doc.getRange().getFields().get(7));\n TestUtil.fieldsAreNested(doc.getRange().getFields().get(7), doc.getRange().getFields().get(3));\n\n TestUtil.verifyField(FieldType.FIELD_FORMULA, \" = 2.5 * 5.2 \", \"13\", doc.getRange().getFields().get(8));\n TestUtil.fieldsAreNested(doc.getRange().getFields().get(8), doc.getRange().getFields().get(3));\n }",
"public EsIndexPropertyBuilder setFieldData(Boolean value) {\n this.fieldData = value;\n return this;\n }",
"public Builder setField1101(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1101_ = value;\n onChanged();\n return this;\n }",
"Write createWrite();",
"void generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);",
"@Override\r\n public GenValueAppendStrategy getGenValueAppendStrategy() {\n return null;\r\n }",
"public Builder setField0(boolean value) {\n bitField0_ |= 0x00000001;\n field0_ = value;\n onChanged();\n return this;\n }",
"public HandlerBuilder but() {\n HandlerBuilder _builder = newHandlerBuilder();\n _builder.m_featureAnySet = m_featureAnySet;\n _builder.m_any = m_any;\n _builder.m_featureCanReadSet = m_featureCanReadSet;\n _builder.m_canRead = m_canRead;\n _builder.m_featureCanWriteSet = m_featureCanWriteSet;\n _builder.m_canWrite = m_canWrite;\n _builder.m_featureChangedSet = m_featureChangedSet;\n _builder.m_changed = m_changed;\n _builder.m_featureMixedSet = m_featureMixedSet;\n _builder.m_mixed = m_mixed;\n _builder.m_featureNameSet = m_featureNameSet;\n _builder.m_name = m_name;\n _builder.m_featureTimestampSet = m_featureTimestampSet;\n _builder.m_timestamp = m_timestamp;\n _builder.m_featureValueSet = m_featureValueSet;\n _builder.m_value = m_value;\n return _builder;\n }",
"private Builder(com.babbler.ws.io.avro.model.BabbleValue.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.author)) {\n this.author = data().deepCopy(fields()[0].schema(), other.author);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.content)) {\n this.content = data().deepCopy(fields()[1].schema(), other.content);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.timestamp)) {\n this.timestamp = data().deepCopy(fields()[2].schema(), other.timestamp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.location)) {\n this.location = data().deepCopy(fields()[3].schema(), other.location);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tags)) {\n this.tags = data().deepCopy(fields()[4].schema(), other.tags);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.mentions)) {\n this.mentions = data().deepCopy(fields()[5].schema(), other.mentions);\n fieldSetFlags()[5] = true;\n }\n }",
"@Override\n\t\tpublic JSONWritable createValue() {\n\t\t\treturn null;\n\t\t}",
"protected BaseStreamWriter(XmlWriter xw, String enc, WriterConfig cfg)\n {\n mWriter = xw;\n mEncoding = enc;\n mConfig = cfg;\n\n int flags = cfg.getConfigFlags();\n\n mCheckStructure = (flags & OutputConfigFlags.CFG_VALIDATE_STRUCTURE) != 0;\n mCheckAttrs = (flags & OutputConfigFlags.CFG_VALIDATE_ATTR) != 0;\n\n mCfgAutomaticEmptyElems = (flags & OutputConfigFlags.CFG_AUTOMATIC_EMPTY_ELEMENTS) != 0;\n mCfgCDataAsText = (flags & OutputConfigFlags.CFG_OUTPUT_CDATA_AS_TEXT) != 0;\n mCfgCopyDefaultAttrs = (flags & OutputConfigFlags.CFG_COPY_DEFAULT_ATTRS) != 0;\n \n mReturnNullForDefaultNamespace = mConfig.returnNullForDefaultNamespace();\n }",
"private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.transferId)) {\n this.transferId = data().deepCopy(fields()[0].schema(), other.transferId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.accountID)) {\n this.accountID = data().deepCopy(fields()[2].schema(), other.accountID);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.accountAuthId)) {\n this.accountAuthId = data().deepCopy(fields()[3].schema(), other.accountAuthId);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.accountPassword)) {\n this.accountPassword = data().deepCopy(fields()[4].schema(), other.accountPassword);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.fundPassword)) {\n this.fundPassword = data().deepCopy(fields()[5].schema(), other.fundPassword);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.tradeCode)) {\n this.tradeCode = data().deepCopy(fields()[6].schema(), other.tradeCode);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.bankID)) {\n this.bankID = data().deepCopy(fields()[7].schema(), other.bankID);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.bankBranchID)) {\n this.bankBranchID = data().deepCopy(fields()[8].schema(), other.bankBranchID);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.bankPassword)) {\n this.bankPassword = data().deepCopy(fields()[9].schema(), other.bankPassword);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.currencyID)) {\n this.currencyID = data().deepCopy(fields()[10].schema(), other.currencyID);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.secuPwdFlag)) {\n this.secuPwdFlag = data().deepCopy(fields()[11].schema(), other.secuPwdFlag);\n fieldSetFlags()[11] = true;\n }\n }",
"@Override\n\tpublic void builder(String name, Object value)\n\t{\n\t\tthis._data.put( name, this.preprocessObject(value));\n\t}",
"public void init() {\n\n\t\tif (optionFields == null) {\n\t\t\toptionFields = new HashMap<String, MetaVal>();\n\t\t}\n\t\tif (inputFields == null) {\n\t\t\tinputFields = new HashMap<String, MetaVal>();\n\t\t}\n\t\tif (outputFields == null) {\n\t\t\toutputFields = new HashMap<String, MetaVal>();\n\t\t}\n\n\t\t// repository xml key tag, metavalue default, web tag, and size are set here\n\t\t// OPTIONS\n\t\toptionFields.put(TAG_OPTION_DOMINANT_BUSINESS, new MetaVal(\"yes\", \"ReturnDominantBusiness:\", 0));\n\t\toptionFields.put(TAG_OPTION_INCLUDE_CENSUS, new MetaVal(\"false\", \"GrpCensus\", 0));\n\n\n\t\t// INPUTS\n\t\tinputFields.put(TAG_INPUT_BUSINESS_NAME, new MetaVal(\"\", \"comp\", 50));\n\t\tinputFields.put(TAG_INPUT_ADDRESS_LINE1, new MetaVal(\"\", \"a1\", 50));\n\t\tinputFields.put(TAG_INPUT_ADDRESS_LINE2, new MetaVal(\"\", \"a2\", 20));\n\t\tinputFields.put(TAG_INPUT_CITY, new MetaVal(\"\", \"city\", 50));\n\t\tinputFields.put(TAG_INPUT_STATE, new MetaVal(\"\", \"state\", 3));\n\t\tinputFields.put(TAG_INPUT_POSTAL_CODE, new MetaVal(\"\", \"postal\", 10));\n\t\tinputFields.put(TAG_INPUT_COUNTRY, new MetaVal(\"US\", \"ctry\", 50));\n\t\tinputFields.put(TAG_INPUT_PHONE, new MetaVal(\"\", \"phone\", 12));\n\t\tinputFields.put(TAG_INPUT_ADDRESS_KEY, new MetaVal(\"\", \"mak\", 50));\n\t\tinputFields.put(TAG_INPUT_STOCK_TICKER, new MetaVal(\"\", \"stock\", 10));\n\t\tinputFields.put(TAG_INPUT_WEB_ADDRESS, new MetaVal(\"\", \"web\", 50));\n\n\t\t// OUTPUTS\n\t\toutputFields.put(TAG_OUTPUT_RESULTS, new MetaVal(\"MD_Results\", \"Results\", 50));\n\t\toutputFields.put(TAG_OUTPUT_COMPANY_NAME, new MetaVal(\"MD_CompanyName\", \"CompanyName\", 50));\n\t\toutputFields.put(TAG_OUTPUT_ADDRESS_LINE1, new MetaVal(\"MD_AddressLine1\", \"AddressLine1\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SUITE, new MetaVal(\"MD_Suite\", \"Suite\", 50));\n\t\toutputFields.put(TAG_OUTPUT_CITY, new MetaVal(\"MD_City\", \"City\", 50));\n\t\toutputFields.put(TAG_OUTPUT_STATE, new MetaVal(\"MD_State\", \"State\", 50));\n\n\t\toutputFields.put(TAG_OUTPUT_COUNTRY_NAME, new MetaVal(\"MD_CountryName\", \"CountryName\", 50));\n\t\toutputFields.put(TAG_OUTPUT_COUNTRY_CODE, new MetaVal(\"MD_CountryCode\", \"CountryCode\", 50));\n\t\toutputFields.put(TAG_OUTPUT_EIN, new MetaVal(\"MD_EIN\", \"EIN\", 50));\n\n\t\toutputFields.put(TAG_OUTPUT_POSTAL_CODE, new MetaVal(\"MD_PostalCode\", \"PostalCode\", 10));\n\t\toutputFields.put(TAG_OUTPUT_LOCATION_TYPE, new MetaVal(\"MD_LocationType\", \"LocationType\", 50));\n// outputFields.put(TAG_OUTPUT_FEMALE_OWNED, new MetaVal(\"MD_FemaleOwned\", \"FemaleOwned\", 50));\n// outputFields.put(TAG_OUTPUT_SMALL_BUSINESS, new MetaVal(\"MD_SmallBusiness\", \"SmallBusiness\", 50));\n// outputFields.put(TAG_OUTPUT_HOME_BASED_BUSINESS, new MetaVal(\"MD_HomeBasedBusiness\", \"HomeBasedBusiness\", 50));\n\t\toutputFields.put(TAG_OUTPUT_PHONE, new MetaVal(\"MD_Phone\", \"Phone\", 50));\n// outputFields.put(TAG_OUTPUT_LOCAL_EMPLOYEES_ESTIMATE, new MetaVal(\"MD_LocalEmployeesEstimate\", \"LocalEmployeesEstimate\",\n// 50));\n// outputFields.put(TAG_OUTPUT_LOCAL_SALES_ESTIMATE, new MetaVal(\"MD_LocalSalesEstimate\", \"LocalSalesEstimate\", 50));\n\t\toutputFields.put(TAG_OUTPUT_EMPLOYEES_ESTIMATE, new MetaVal(\"MD_TotalEmployeesEstimate\", \"EmployeesEstimate\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SALES_ESTIMATE, new MetaVal(\"MD_TotalSalesEstimate\", \"SalesEstimate\", 50));\n\t\toutputFields.put(TAG_OUTPUT_STOCK_TICKER, new MetaVal(\"MD_StockTicker\", \"StockTicker\", 50));\n\t\toutputFields.put(TAG_OUTPUT_WEB_ADDRESS, new MetaVal(\"MD_WebAddress\", \"WebAddress\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_CODE, new MetaVal(\"MD_SICCode1\", \"SICCode1\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_DESCRIPTION, new MetaVal(\"MD_SICDescription1\", \"SICDescription1\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_CODE2, new MetaVal(\"MD_SICCode2\", \"SICCode2\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_DESCRIPTION2, new MetaVal(\"MD_SICDescription2\", \"SICDescription2\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_CODE3, new MetaVal(\"MD_SICCode3\", \"SICCode3\", 50));\n\t\toutputFields.put(TAG_OUTPUT_SIC_DESCRIPTION3, new MetaVal(\"MD_SICDescription3\", \"SICDescription3\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_CODE, new MetaVal(\"MD_NAICSCode1\", \"NAICSCode1\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_DESCRIPTION, new MetaVal(\"MD_NAICSDescription1\", \"NAICSDescription1\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_CODE2, new MetaVal(\"MD_NAICSCode2\", \"NAICSCode2\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_DESCRIPTION2, new MetaVal(\"MD_NAICSDescription2\", \"NAICSDescription2\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_CODE3, new MetaVal(\"MD_NAICSCode3\", \"NAICSCode3\", 50));\n\t\toutputFields.put(TAG_OUTPUT_NAICS_DESCRIPTION3, new MetaVal(\"MD_NAICSDescription3\", \"NAICSDescription3\", 50));\n\n\t\toutputFields.put(TAG_OUTPUT_CENSUS_BLOCK, new MetaVal(\"MD_CensusBlock\", \"CensusBlock\", 50));\n\t\toutputFields.put(TAG_OUTPUT_CENSUS_TRACT, new MetaVal(\"MD_CensusTract\", \"CensusTract\", 50));\n\t\toutputFields.put(TAG_OUTPUT_COUNTY_FIPS, new MetaVal(\"MD_CountyFIPS\", \"CountyFIPS\", 50));\n\t\toutputFields.put(TAG_OUTPUT_COUNTY_NAME, new MetaVal(\"MD_CountyName\", \"CountyName\", 50));\n\t\toutputFields.put(TAG_OUTPUT_DELIVERY_INDICATOR, new MetaVal(\"MD_DeliveryIndicator\", \"DeliveryIndicator\", 50));\n\t\toutputFields.put(TAG_OUTPUT_LATITUDE, new MetaVal(\"MD_Latitude\", \"Latitude\", 50));\n\t\toutputFields.put(TAG_OUTPUT_LONGITUDE, new MetaVal(\"MD_Longitude\", \"Longitude\", 50));\n\t\toutputFields.put(TAG_OUTPUT_MD_ADDRESS_KEY, new MetaVal(\"MD_MelissaAddressKey\", \"MelissaAddressKey\", 50));\n\t\toutputFields.put(TAG_OUTPUT_MD_ADDRESS_KEY_BASE, new MetaVal(\"MD_MelissaAddressKeyBase\", \"MelissaAddressKeyBase\", 50));\n\t\toutputFields.put(TAG_OUTPUT_PLUS_4, new MetaVal(\"MD_Plus4\", \"Plus4\", 50));\n\t\toutputFields.put(TAG_OUTPUT_PLACE_NAME, new MetaVal(\"MD_PlaceName\", \"PlaceName\", 50));\n\t\toutputFields.put(TAG_OUTPUT_PLACE_CODE, new MetaVal(\"MD_PlaceCode\", \"PlaceCode\", 50));\n\n\t\toutputFields.put(TAG_OUTPUT_FIRST_NAME_1, new MetaVal(\"MD_FirstName1\", \"NameFirst\", 50));\n\t\toutputFields.put(TAG_OUTPUT_LAST_NAME_1, new MetaVal(\"MD_LastName1\", \"NameLast\", 50));\n\t\toutputFields.put(TAG_OUTPUT_GENDER_1, new MetaVal(\"MD_Gender1\", \"Gender\", 50));\n\t\toutputFields.put(TAG_OUTPUT_TITLE_1, new MetaVal(\"MD_Title1\", \"Title\", 50));\n\t\toutputFields.put(TAG_OUTPUT_EMAIL_1, new MetaVal(\"MD_Email1\", \"Email\", 50));\n\n\t\toutputFields.put(TAG_OUTPUT_FIRST_NAME_2, new MetaVal(\"MD_FirstName2\", \"NameFirst\", 50));\n\t\toutputFields.put(TAG_OUTPUT_LAST_NAME_2, new MetaVal(\"MD_LastName2\", \"NameLast\", 50));\n\t\toutputFields.put(TAG_OUTPUT_GENDER_2, new MetaVal(\"MD_Gender2\", \"Gender\", 50));\n\t\toutputFields.put(TAG_OUTPUT_TITLE_2, new MetaVal(\"MD_Title2\", \"Title\", 50));\n\t\toutputFields.put(TAG_OUTPUT_EMAIL_2, new MetaVal(\"MD_Email2\", \"Email\", 50));\n\n\t}",
"public Field() {\r\n\t}",
"public Builder setField1032(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1032_ = value;\n onChanged();\n return this;\n }",
"public Builder setField1010(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1010_ = value;\n onChanged();\n return this;\n }",
"private void setPhysicalInformationValues(final FixedField fixedField, String valueField) {\n\n final PhysicalInformation pi = new PhysicalInformation();\n\n if (!F.isNotNullOrEmpty(valueField)){\n valueField = pi.getValueString(fixedField.getCategoryOfMaterial());\n }\n\n fixedField.setDisplayValue(valueField);\n ConversionFieldUtils.setPhysicalInformationValuesInFixedField(fixedField);\n\n }",
"public Builder addFields(\n Field.Builder builderForValue) {\n if (fieldsBuilder_ == null) {\n ensureFieldsIsMutable();\n fields_.add(builderForValue.build());\n onChanged();\n } else {\n fieldsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public Builder addFields(Field value) {\n if (fieldsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFieldsIsMutable();\n fields_.add(value);\n onChanged();\n } else {\n fieldsBuilder_.addMessage(value);\n }\n return this;\n }",
"public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }",
"public interface IFieldEncoder<FType> {\r\n void encode(Object target,String fieldName,Object defaultValue);\r\n}",
"public CustomFieldStringType build() {\n return new CustomFieldStringTypeImpl();\n }",
"private Builder(com.example.DNSLog other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = true;\n }\n }",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public Builder setValue(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n value_ = value;\n onChanged();\n return this;\n }",
"public DateTimeFormatterBuilder appendText(DateTimeFieldType fieldType) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[58]++;\nint CodeCoverConditionCoverageHelper_C28;\r\n if ((((((CodeCoverConditionCoverageHelper_C28 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C28 |= (2)) == 0 || true) &&\n ((fieldType == null) && \n ((CodeCoverConditionCoverageHelper_C28 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[28].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C28, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[28].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C28, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[56]++;\r\n throw new IllegalArgumentException(\"Field type must not be null\");\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[57]++;}\r\n return append0(new TextField(fieldType, false));\r\n }",
"private com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder> \n getAmountFFieldBuilder() {\n if (amountFBuilder_ == null) {\n amountFBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n io.lightcone.data.types.Amount, io.lightcone.data.types.Amount.Builder, io.lightcone.data.types.AmountOrBuilder>(\n getAmountF(),\n getParentForChildren(),\n isClean());\n amountF_ = null;\n }\n return amountFBuilder_;\n }",
"private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }",
"@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }",
"public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }",
"public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }",
"public Builder setField1712(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1712_ = value;\n onChanged();\n return this;\n }",
"@Override\n SerializerElem preValueWrite(String key, Object value, boolean withNsPrefix, Class<?> rootClass) {\n return null;\n }",
"private Builder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.name)) {\n this.name = data().deepCopy(fields()[0].schema(), other.name);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.lastName)) {\n this.lastName = data().deepCopy(fields()[1].schema(), other.lastName);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.country)) {\n this.country = data().deepCopy(fields()[2].schema(), other.country);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.gender)) {\n this.gender = data().deepCopy(fields()[4].schema(), other.gender);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.date)) {\n this.date = data().deepCopy(fields()[5].schema(), other.date);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.height)) {\n this.height = data().deepCopy(fields()[6].schema(), other.height);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.weight)) {\n this.weight = data().deepCopy(fields()[7].schema(), other.weight);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n }",
"public JSONWriter()\n {\n _features = 0;\n _writeNullValues = false;\n _writerLocator = null;\n _treeCodec = null;\n _generator = null;\n _timezone = DEFAULT_TIMEZONE;\n }",
"public Builder setField1629(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1629_ = value;\n onChanged();\n return this;\n }",
"public Builder setField1020(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1020_ = value;\n onChanged();\n return this;\n }",
"private Builder(com.example.DNSLog.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.uid)) {\n this.uid = data().deepCopy(fields()[0].schema(), other.uid);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.originh)) {\n this.originh = data().deepCopy(fields()[1].schema(), other.originh);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.originp)) {\n this.originp = data().deepCopy(fields()[2].schema(), other.originp);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.resph)) {\n this.resph = data().deepCopy(fields()[3].schema(), other.resph);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.respp)) {\n this.respp = data().deepCopy(fields()[4].schema(), other.respp);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.proto)) {\n this.proto = data().deepCopy(fields()[5].schema(), other.proto);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.port)) {\n this.port = data().deepCopy(fields()[6].schema(), other.port);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.ts)) {\n this.ts = data().deepCopy(fields()[7].schema(), other.ts);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n if (isValidValue(fields()[8], other.query)) {\n this.query = data().deepCopy(fields()[8].schema(), other.query);\n fieldSetFlags()[8] = other.fieldSetFlags()[8];\n }\n if (isValidValue(fields()[9], other.qclass)) {\n this.qclass = data().deepCopy(fields()[9].schema(), other.qclass);\n fieldSetFlags()[9] = other.fieldSetFlags()[9];\n }\n if (isValidValue(fields()[10], other.qclassname)) {\n this.qclassname = data().deepCopy(fields()[10].schema(), other.qclassname);\n fieldSetFlags()[10] = other.fieldSetFlags()[10];\n }\n if (isValidValue(fields()[11], other.qtype)) {\n this.qtype = data().deepCopy(fields()[11].schema(), other.qtype);\n fieldSetFlags()[11] = other.fieldSetFlags()[11];\n }\n if (isValidValue(fields()[12], other.qtypename)) {\n this.qtypename = data().deepCopy(fields()[12].schema(), other.qtypename);\n fieldSetFlags()[12] = other.fieldSetFlags()[12];\n }\n if (isValidValue(fields()[13], other.rcode)) {\n this.rcode = data().deepCopy(fields()[13].schema(), other.rcode);\n fieldSetFlags()[13] = other.fieldSetFlags()[13];\n }\n if (isValidValue(fields()[14], other.rcodename)) {\n this.rcodename = data().deepCopy(fields()[14].schema(), other.rcodename);\n fieldSetFlags()[14] = other.fieldSetFlags()[14];\n }\n if (isValidValue(fields()[15], other.Z)) {\n this.Z = data().deepCopy(fields()[15].schema(), other.Z);\n fieldSetFlags()[15] = other.fieldSetFlags()[15];\n }\n if (isValidValue(fields()[16], other.OR)) {\n this.OR = data().deepCopy(fields()[16].schema(), other.OR);\n fieldSetFlags()[16] = other.fieldSetFlags()[16];\n }\n if (isValidValue(fields()[17], other.AA)) {\n this.AA = data().deepCopy(fields()[17].schema(), other.AA);\n fieldSetFlags()[17] = other.fieldSetFlags()[17];\n }\n if (isValidValue(fields()[18], other.TC)) {\n this.TC = data().deepCopy(fields()[18].schema(), other.TC);\n fieldSetFlags()[18] = other.fieldSetFlags()[18];\n }\n if (isValidValue(fields()[19], other.rejected)) {\n this.rejected = data().deepCopy(fields()[19].schema(), other.rejected);\n fieldSetFlags()[19] = other.fieldSetFlags()[19];\n }\n if (isValidValue(fields()[20], other.Answers)) {\n this.Answers = data().deepCopy(fields()[20].schema(), other.Answers);\n fieldSetFlags()[20] = other.fieldSetFlags()[20];\n }\n if (isValidValue(fields()[21], other.TLLs)) {\n this.TLLs = data().deepCopy(fields()[21].schema(), other.TLLs);\n fieldSetFlags()[21] = other.fieldSetFlags()[21];\n }\n }",
"public Builder setField1401(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1401_ = value;\n onChanged();\n return this;\n }",
"public static StringBuffer writeXML_DBField(StringBuffer sb, int indent, DBField fld, boolean inclInfo, String value)\n {\n return DBFactory.writeXML_DBField(sb, indent, fld, inclInfo, value, false/*soapXML*/);\n }",
"public DateTimeFormatterBuilder appendShortText(DateTimeFieldType fieldType) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[59]++;\nint CodeCoverConditionCoverageHelper_C29;\r\n if ((((((CodeCoverConditionCoverageHelper_C29 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C29 |= (2)) == 0 || true) &&\n ((fieldType == null) && \n ((CodeCoverConditionCoverageHelper_C29 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[29].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C29, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[29].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C29, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[58]++;\r\n throw new IllegalArgumentException(\"Field type must not be null\");\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[59]++;}\r\n return append0(new TextField(fieldType, true));\r\n }",
"public build.buf.validate.conformance.cases.MessageNone.NoneMsg.Builder getValBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getValFieldBuilder().getBuilder();\n }",
"private Builder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.name)) {\n this.name = data().deepCopy(fields()[0].schema(), other.name);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.lastName)) {\n this.lastName = data().deepCopy(fields()[1].schema(), other.lastName);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.country)) {\n this.country = data().deepCopy(fields()[2].schema(), other.country);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.gender)) {\n this.gender = data().deepCopy(fields()[4].schema(), other.gender);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.date)) {\n this.date = data().deepCopy(fields()[5].schema(), other.date);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.height)) {\n this.height = data().deepCopy(fields()[6].schema(), other.height);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.weight)) {\n this.weight = data().deepCopy(fields()[7].schema(), other.weight);\n fieldSetFlags()[7] = true;\n }\n }",
"public JDBCUpsertOutputFormat build() {\n checkNotNull(options, \"No options supplied.\");\n checkNotNull(fieldNames, \"No fieldNames supplied.\");\n return new JDBCUpsertOutputFormat(\n name, options, fieldNames, keyFields, partitionFields, fieldTypes, flushMaxSize, flushIntervalMills, allReplace, updateMode, jdbcWriter, errorLimit);\n }",
"private void setCustom(\n com.google.api.CustomHttpPattern.Builder builderForValue) {\n pattern_ = builderForValue.build();\n patternCase_ = 8;\n }",
"public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }",
"protected Expression buildExpression() {\r\n ExpressionBuilder builder = new ExpressionBuilder();\r\n\r\n return builder.getField(getWriteLockField()).equal(builder.getParameter(getWriteLockField()));\r\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> \n getConfigurationFieldBuilder() {\n if (configurationBuilder_ == null) {\n configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(\n getConfiguration(),\n getParentForChildren(),\n isClean());\n configuration_ = null;\n }\n return configurationBuilder_;\n }",
"public CategoryBuilder()\n {\n fUpperInclusive = true;\n fValue = \"\";\n }",
"public FieldTransformer makeFieldTransformer(Object value) {\n throw new RuntimeException(\"makeFieldTransformer(value) not implemented in factory \"\n + this.getClass().toString());\n }",
"protected T createNewValueOnFlush() {\n \t\treturn null;\n \t}",
"protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }",
"public Builder setField1540(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1540_ = value;\n onChanged();\n return this;\n }",
"private com.google.protobuf.SingleFieldBuilder<\n alluxio.proto.journal.File.SetAttributeEntry, alluxio.proto.journal.File.SetAttributeEntry.Builder, alluxio.proto.journal.File.SetAttributeEntryOrBuilder> \n getSetAttributeFieldBuilder() {\n if (setAttributeBuilder_ == null) {\n setAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n alluxio.proto.journal.File.SetAttributeEntry, alluxio.proto.journal.File.SetAttributeEntry.Builder, alluxio.proto.journal.File.SetAttributeEntryOrBuilder>(\n setAttribute_,\n getParentForChildren(),\n isClean());\n setAttribute_ = null;\n }\n return setAttributeBuilder_;\n }",
"@JacksonXmlProperty(isAttribute = true, localName = \"value\")\n public Builder value(String value) {\n this.value = value;\n return this;\n }",
"public Builder setNewBlock(\n phaseI.Hdfs.BlockLocations.Builder builderForValue) {\n if (newBlockBuilder_ == null) {\n newBlock_ = builderForValue.build();\n onChanged();\n } else {\n newBlockBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000002;\n return this;\n }",
"public Builder setField1229(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1229_ = value;\n onChanged();\n return this;\n }",
"public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}",
"public Builder setField1750(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1750_ = value;\n onChanged();\n return this;\n }",
"public WstxOutputFactory() {\n mConfig = WriterConfig.createFullDefaults();\n }",
"public Builder setField1529(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1529_ = value;\n onChanged();\n return this;\n }",
"public Builder setField1029(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1029_ = value;\n onChanged();\n return this;\n }",
"public Builder setCustom(\n com.google.api.CustomHttpPattern.Builder builderForValue) {\n copyOnWrite();\n instance.setCustom(builderForValue);\n return this;\n }",
"public Builder setField1362(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1362_ = value;\n onChanged();\n return this;\n }",
"public Builder addMetaInformation(\n io.dstore.engine.MetaInformation.Builder builderForValue) {\n if (metaInformationBuilder_ == null) {\n ensureMetaInformationIsMutable();\n metaInformation_.add(builderForValue.build());\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public Builder addMetaInformation(\n io.dstore.engine.MetaInformation.Builder builderForValue) {\n if (metaInformationBuilder_ == null) {\n ensureMetaInformationIsMutable();\n metaInformation_.add(builderForValue.build());\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public Builder addMetaInformation(\n io.dstore.engine.MetaInformation.Builder builderForValue) {\n if (metaInformationBuilder_ == null) {\n ensureMetaInformationIsMutable();\n metaInformation_.add(builderForValue.build());\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public Builder addMetaInformation(\n io.dstore.engine.MetaInformation.Builder builderForValue) {\n if (metaInformationBuilder_ == null) {\n ensureMetaInformationIsMutable();\n metaInformation_.add(builderForValue.build());\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public Builder addMetaInformation(\n io.dstore.engine.MetaInformation.Builder builderForValue) {\n if (metaInformationBuilder_ == null) {\n ensureMetaInformationIsMutable();\n metaInformation_.add(builderForValue.build());\n onChanged();\n } else {\n metaInformationBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"private Builder(Gel_BioInf_Models.VirtualPanel.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.specificDiseaseTitle)) {\n this.specificDiseaseTitle = data().deepCopy(fields()[0].schema(), other.specificDiseaseTitle);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.panelVersion)) {\n this.panelVersion = data().deepCopy(fields()[1].schema(), other.panelVersion);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.ensemblVersion)) {\n this.ensemblVersion = data().deepCopy(fields()[2].schema(), other.ensemblVersion);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.dataModelCatalogueVersion)) {\n this.dataModelCatalogueVersion = data().deepCopy(fields()[3].schema(), other.dataModelCatalogueVersion);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.geneIds)) {\n this.geneIds = data().deepCopy(fields()[4].schema(), other.geneIds);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.Transcripts)) {\n this.Transcripts = data().deepCopy(fields()[5].schema(), other.Transcripts);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.relevantRegions)) {\n this.relevantRegions = data().deepCopy(fields()[6].schema(), other.relevantRegions);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.clinicalRelevantVariants)) {\n this.clinicalRelevantVariants = data().deepCopy(fields()[7].schema(), other.clinicalRelevantVariants);\n fieldSetFlags()[7] = true;\n }\n }",
"public Builder setField1729(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1729_ = value;\n onChanged();\n return this;\n }",
"Rule Field() {\n // Push 1 FieldNode onto the value stack\n return Sequence(\n Optional(FieldID()),\n Optional(FieldReq()),\n FieldType(), // pushes FieldType onto the value stack\n Identifier(), // pushes Identifier onto the value stack\n Optional(Sequence(\"= \", ConstValue())),\n //XsdFieldOptions(),\n Optional(ListSeparator()),\n WhiteSpace(),\n actions.pushFieldNode());\n }",
"public Builder setField1018(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n field1018_ = value;\n onChanged();\n return this;\n }",
"private void configureFields() {\n\t\ttargetDiastolic.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(LOWER_DIASTOLIC_LIMIT,UPPER_DIASTOLIC_LIMIT));\n\t\ttargetDiastolic.setEditable(true);\n\t\ttargetSystolic.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(LOWER_SYSTOLIC_LIMIT,UPPER_SYSTOLIC_LIMIT));\n\t\ttargetSystolic.setEditable(true);\n\t\tdiastolicAlarm.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(DIASTOLIC_ALARM_LOWER, DIASTOLIC_ALARM_HIGHER));\n\t\tdiastolicAlarm.setEditable(true);\n\t\tsystolicAlarm.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(SYSTOLIC_ALARM_LOWER, SYSTOLIC_ALARM_HIGHER));\n\t\tsystolicAlarm.setEditable(true);\n\t\tSpinnerValueFactory.DoubleSpinnerValueFactory rateFactory=new SpinnerValueFactory.DoubleSpinnerValueFactory(MIN_FLOW_RATE, MAX_FLOW_RATE);\n\t\trateFactory.setAmountToStepBy(0.1);\n\t\tinfusionRate.setValueFactory(rateFactory);\n\t\t\n\t\t/*\n\t\t * We use bindBidirectional here because systolicProperty and diastolicProperty and numbers,\n\t\t * but the text field is a String, and bindBidrectional allows us to specify a converter\n\t\t * to handle the change between the two.\n\t\t */\n\t\tcurrentSystolic.textProperty().bindBidirectional(systolicProperty, new NumberStringConverter());\n\t\tcurrentDiastolic.textProperty().bindBidirectional(diastolicProperty, new NumberStringConverter());\n\t\t\n\t\tcurrentSystolic.setEditable(false);\n\t\tcurrentDiastolic.setEditable(false);\n\t\t\n\n\t\toperatingMode.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {\n\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Toggle> ov, Toggle oldToggle, Toggle newToggle) {\n\t\t\t\tif(newToggle.equals(openRadio)) {\n\t\t\t\t\tbpVBox.setVisible(false);\n\t\t\t\t\tbpVBox.setManaged(false);\n\t\t\t\t} else {\n\t\t\t\t\tbpVBox.setManaged(true);\n\t\t\t\t\tbpVBox.setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t}",
"public static boolean handleFieldWrite(Node x, Node f, Node y) {\n\n\t\tif(ImmutabilityPreferences.isInferenceRuleLoggingEnabled()) {\n\t\t\tString values = \"x:\" + getTypes(x).toString() + \", f:\" + getTypes(f).toString() + \", y:\" + getTypes(y).toString();\n\t\t\tLog.info(\"TWRITE (x.f=y, x=\" + x.getAttr(XCSG.name) + \", f=\" + f.getAttr(XCSG.name) + \", y=\" + y.getAttr(XCSG.name) + \")\\n\" + values);\n\t\t}\n\t\t\n\t\tboolean typesChanged = false;\n\t\t\n\t\t// x must be mutable\n\t\tif (x.taggedWith(XCSG.InstanceVariable)) {\n\t\t\tif (ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled()) {\n\t\t\t\taddMutable(x); // doesn't count as a type change\n\t\t\t}\n\t\t\tif(ImmutabilityPreferences.isAllowDefaultMutableInstancesVariablesEnabled() || ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled()){\n\t\t\t\tif(XEqualsYConstraintSolver.satisfy(x, ImmutabilityTypes.MUTABLE)){\n\t\t\t\t\tif(ImmutabilityPreferences.isAllowAddMutableInstanceVariablesEnabled() && getTypes(x).isEmpty()){\n\t\t\t\t\t\taddMutable(x);\n\t\t\t\t\t}\n\t\t\t\t\ttypesChanged = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// vanilla paper description\n\t\t\t\tif(removeTypes(x, ImmutabilityTypes.READONLY)){\n\t\t\t\t\ttypesChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(XEqualsYConstraintSolver.satisfy(x, ImmutabilityTypes.MUTABLE)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ImmutabilityPreferences.isFieldAdaptationsEnabled()){\n\t\t\t// qy <: MUTABLE fadapt qf\n\t\t\t// = MUTABLE fadapt qf :> qy\n\t\t\t// FSE 2012 implementation\n\t\t\tif(XFieldAdaptYGreaterThanEqualZConstraintSolver.satisify(ImmutabilityTypes.MUTABLE, f, y)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t} else {\n\t\t\t// qy <: MUTABLE fadapt qf\n\t\t\t// = MUTABLE madapt qf :> qy\n\t\t\t// vanilla OOPSLA 2012 implementation\n\t\t\tif(XMethodAdaptYGreaterThanEqualZConstraintSolver.satisify(x, f, y)){\n\t\t\t\ttypesChanged = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn typesChanged;\n\t}",
"private Builder(edu.pa.Rat.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.time)) {\n this.time = data().deepCopy(fields()[0].schema(), other.time);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.frequency)) {\n this.frequency = data().deepCopy(fields()[1].schema(), other.frequency);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.convolution)) {\n this.convolution = data().deepCopy(fields()[2].schema(), other.convolution);\n fieldSetFlags()[2] = true;\n }\n }"
]
| [
"0.52410305",
"0.5236991",
"0.5226648",
"0.5200363",
"0.5112656",
"0.5088467",
"0.50880253",
"0.5071627",
"0.5070829",
"0.50624955",
"0.5041685",
"0.50315714",
"0.5027648",
"0.500351",
"0.5003073",
"0.49827525",
"0.498171",
"0.49771905",
"0.49583456",
"0.49363968",
"0.49342027",
"0.4913119",
"0.4903789",
"0.48641992",
"0.48632732",
"0.48531416",
"0.48456073",
"0.4840948",
"0.48258352",
"0.48157385",
"0.4814852",
"0.4797613",
"0.4793846",
"0.47850847",
"0.47772262",
"0.47651285",
"0.4759125",
"0.47564793",
"0.4742877",
"0.4733802",
"0.4723273",
"0.4723209",
"0.47180563",
"0.47158644",
"0.4711929",
"0.47095525",
"0.47079316",
"0.46901104",
"0.46787447",
"0.46787447",
"0.46761906",
"0.46726754",
"0.46722716",
"0.46695518",
"0.46681342",
"0.46665266",
"0.46611515",
"0.4653429",
"0.46447968",
"0.46442223",
"0.4639771",
"0.46381304",
"0.46306363",
"0.46256137",
"0.46247986",
"0.46225896",
"0.46213093",
"0.4619416",
"0.46143547",
"0.46075088",
"0.45995393",
"0.4596432",
"0.4591162",
"0.4586827",
"0.45866325",
"0.45817226",
"0.45738047",
"0.4573562",
"0.45714018",
"0.45706436",
"0.45704865",
"0.4567877",
"0.45674857",
"0.45630714",
"0.45617154",
"0.4561385",
"0.45533058",
"0.45515296",
"0.4551273",
"0.45489964",
"0.45489964",
"0.45489964",
"0.45489964",
"0.45489964",
"0.45487437",
"0.45425704",
"0.45381916",
"0.4535069",
"0.45345983",
"0.4534364",
"0.45331606"
]
| 0.0 | -1 |
Attempts to write a value to the Apache Arrow vector provided at construction time. | @Override
public boolean write(Object context, int rowNum)
throws Exception
{
extractor.extract(context, holder);
if (holder.isSet > 0) {
vector.setSafe(rowNum, holder.value.getBytes(Charsets.UTF_8));
}
else {
vector.setNull(rowNum);
}
return constraint.apply(holder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setValue(V value);",
"public V setValue(V value);",
"@Test\n public void testSetValue() {\n System.out.println(\"setValue\");\n int index = 0;\n double value = 0.0;\n Vector instance = null;\n instance.setValue(index, value);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"protected abstract void setValue(V value);",
"long writeValue(V value, int[] version) {\n // the length of the given value plus its header\n int valueLength = valueSerializer.calculateSize(value) + valueOperator.getHeaderSize();\n // The allocated slice is actually the thread's copy moved to point to the newly allocated slice\n Slice slice = memoryManager.allocateSlice(valueLength, MemoryManager.Allocate.VALUE);\n version[0] = slice.getByteBuffer().getInt(slice.getByteBuffer().position());\n // initializing the header lock to be free\n slice.initHeader(valueOperator);\n // since this is a private environment, we can only use ByteBuffer::slice, instead of ByteBuffer::duplicate\n // and then ByteBuffer::slice\n // This is the only place where we create a new object (for the serializer).\n valueSerializer.serialize(value, valueOperator.getValueByteBufferNoHeaderPrivate(slice));\n // combines the blockID with the value's length (including the header)\n int valueBlockAndLength = (slice.getBlockID() << VALUE_BLOCK_SHIFT) | (valueLength & VALUE_LENGTH_MASK);\n return intsToLong(valueBlockAndLength, slice.getByteBuffer().position());\n }",
"public void write(VirtualPointer value)\r\n {\r\n write(value, false);\r\n }",
"protected abstract void write (Object val);",
"public void setValue (V v) {\n value = v;\n }",
"@Override\n public void setValueAt(Object value, int row, int column) { data[row][column] = value; }",
"protected abstract void writeInternal(int index, int value);",
"Object setValue(Object value) throws NullPointerException;",
"public void valor(V v) {\n value = v;\n }",
"public void setRightVector(Vector v) throws IncorrectSpaceException {\n if (v.getSpace() != inputSpace) {\n throw new IncorrectSpaceException();\n }\n this.v = v;\n }",
"public abstract ImmutableVector getImmutableVector();",
"public Vector<T> set(int aIndex, T aValue);",
"public static void write(Vector persistentVector, DataOutputStream dos) throws IOException {\t\r\n\t\tif(persistentVector != null){\r\n\t\t\tdos.writeByte(persistentVector.size());\r\n\t\t\tfor(int i=0; i<persistentVector.size(); i++ ){\r\n\t\t\t\t((Persistent)persistentVector.elementAt(i)).write(dos);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeByte(0);\r\n\t}",
"public void SetVector(int[] v){ this.vector=v;}",
"public void setValue(final V value) {\n this.value = value;\n }",
"public void apply() { writable.setValue(value); }",
"@Generated\n @Selector(\"setDirection:\")\n public native void setDirection(@ByValue CGVector value);",
"private static native boolean set_0(long nativeObj, int propId, double value);",
"BinaryArrayReadWrite set(int index, byte x);",
"@Override\n public void setValue(Binary value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }",
"@Override\n public void setValueAt( Object aValue, Object node, int column )\n {\n }",
"@Override\n protected void writeInternal(int index, int value) {\n\n }",
"@Override\n protected void writeInternal(int index, int value) {\n\n }",
"public void putValue(double value) {\n\t\tdata[size] = value;\n\t\tsize++;\n\t\tsize %= limit;\n\t}",
"public static void insert(Any paramAny, ValueMember paramValueMember) {\n/* 49 */ OutputStream outputStream = paramAny.create_output_stream();\n/* 50 */ paramAny.type(type());\n/* 51 */ write(outputStream, paramValueMember);\n/* 52 */ paramAny.read_value(outputStream.create_input_stream(), type());\n/* */ }",
"public void _write(org.omg.CORBA.portable.OutputStream ostream)\r\n {\r\n PropositionHelper.write(ostream,value);\r\n }",
"public void setCValue(V value);",
"public native void set(T value);",
"protected void setValue0(T value) {\n\t\t// Preconditions\n\t\tif (value == null) {\n\t\t\tthrow new NullPointerException(\"Value cannot be null\");\n\t\t}\n\n\t\tthis.value = value;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void setValue(Object value) {\n if (element != null) {\n element.setValue((V)value);\n }\n }",
"public void set(int index, Object value) {\n verifyModifiable();\n\n try {\n elements.set(index, value);\n } catch (IndexOutOfBoundsException exception) {\n if (elements.size() != 0)\n throw new RuntimeException(\"failed to set a value beyond the end of the tuple elements array, size: \" + size() + \" , index: \" + index);\n else\n throw new RuntimeException(\"failed to set a value, tuple may not be initialized with values, is zero length\");\n }\n }",
"private void storeValue(int source, int destination, double distance,\n DiskBufferDriver output) throws DriverException {\n output.addValues(ValueFactory.createValue(source),\n ValueFactory.createValue(destination),\n ValueFactory.createValue(distance));\n }",
"public abstract Vector4fc set(int component, float value);",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"public void setValue (Context c, Object v) throws PropertyException\n {\n throw new PropertyException(\"Cannot set the value of a function: \" + _vname);\n }",
"godot.wire.Wire.Vector2OrBuilder getVector2ValueOrBuilder();",
"public void _write(org.omg.CORBA.portable.OutputStream ostream)\n {\n autorisationCollabInterditeHelper.write(ostream,value);\n }",
"public void setEqualTo(Vector v){ components = v.getVectorAsArray(); }",
"public void setVerticalValue(double value)\n throws RemoteException, VisADException {\n super.setZPosition(value);\n }",
"@Override\n public void setValueAt(Object aValue, int rowIndex, int columnIndex) {\n }",
"public void setVal(float val) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 8, val);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 8, val);\n\t\t}\n\t}",
"public static native void SetAt(long lpjFbxArrayVector2, int pIndex, long pElement);",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic boolean put(Float value) {\n\t\tif (bufferCount < BUFFER_SIZE) {\n\t\t\tbuffer[bufferCount++] = value;\n\t\t} else {\n\t\t\twriteBufferToOCL();\n\t\t\tput(value);\n\t\t}\n\t\treturn true;\n\t}",
"public void setVector(nvo_coords.CoordsType vector) {\n this.vector = vector;\n }",
"public void setValueAt(Object val, int row, int col) {\r\n }",
"@Test\n\tpublic final void testSetValues() throws MPIException {\n\t\tdouble[] newValues = new double[totalSize];\n\t\tfor (int i=0; i<totalSize; i++) {\n\t\t\tnewValues[i] = 7.8*i;\n\t\t}\n\t\tblock.setValues(newValues);\n\t\tblock.startCommunication();\n\t\tverifyInnerValues(block, newValues);\n\t\tverifyGhostRegionValues(block);\n\t\tblock.finishCommunication();\n\t}",
"public abstract void set( int i, int j, double value ) throws JWaveException;",
"@Override\n\tpublic void setValueAt(Object aValue, int rowIndex, int columnIndex) {\n\t\t\n\t}",
"@Override\n public <V> long writtenLength(V value, ValueAccessor<V> accessor)\n {\n validate(value, accessor);\n return 0;\n }",
"@Before\n public void setUp() throws Exception {\n accessor = mock(ValueVector.Accessor.class);\n when(accessor.getObject(anyInt())).thenAnswer(new Answer<Object>() {\n\n @Override\n public Object answer(InvocationOnMock invocationOnMock) throws Throwable {\n Object[] args = invocationOnMock.getArguments();\n Integer index = (Integer) args[0];\n if(index == 0) {\n return NON_NULL_VALUE;\n }\n if(index == 1) {\n return null;\n }\n throw new IndexOutOfBoundsException(\"Index out of bounds\");\n }\n });\n when(accessor.isNull(anyInt())).thenAnswer(new Answer<Object>() {\n\n @Override\n public Object answer(InvocationOnMock invocationOnMock) throws Throwable {\n Object[] args = invocationOnMock.getArguments();\n Integer index = (Integer) args[0];\n if(index == 0) {\n return false;\n }\n return true;\n }\n });\n\n metadata = UserBitShared.SerializedField.getDefaultInstance();\n valueVector = mock(ValueVector.class);\n when(valueVector.getAccessor()).thenReturn(accessor);\n when(valueVector.getMetadata()).thenReturn(metadata);\n\n genericAccessor = new GenericAccessor(valueVector);\n }",
"@Override\n public void setValueAt(Object value, int row, int column) {\n this.data[row][column] = value;\n fireTableDataChanged();\n }",
"public void setValueAt(Object value, int row, int column){\n dataEntries[row][column] = value;\n }",
"public static void writeBig(Vector persistentVector, DataOutputStream dos) throws IOException {\t\r\n\t\tif(persistentVector != null){\r\n\t\t\tdos.writeInt(persistentVector.size());\r\n\t\t\tfor(int i=0; i<persistentVector.size(); i++ ){\r\n\t\t\t\t((Persistent)persistentVector.elementAt(i)).write(dos);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeInt(0);\r\n\t}",
"public abstract void assign(Object value) throws IllegalStateException, InterruptedException;",
"@Test\n public void testGetValue() {\n System.out.println(\"getValue\");\n int index = 0;\n Vector instance = null;\n double expResult = 0.0;\n double result = instance.getValue(index);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public void setValue(double newV) { // assuming REST API update at instantiation - must be a Set method to prevent access to a variable directly\n this.Value=newV;\n }",
"void write(K key, V value);",
"ValueWrapper<V> wrapValue(V value) throws IOException;",
"public void set(int i, PdVector value)\n {\n switch(i)\n {\n case 0: p1 = value; break;\n case 1: p2 = value; break;\n case 2: p3 = value; break;\n default: throw new IndexOutOfBoundsException(\"Triangle indices should be in range [0, 2].\");\n }\n }",
"private synchronized void saveVectorData(Vector data, int index)\r\n {\r\n debug(\"saveVectorData(Vector, \" + index + \") - to File\");\r\n\r\n // Create a filename to save the Data \r\n String fileName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + index;\r\n\r\n // Now we can send it to be serialized\r\n StockMarketUtils.serializeData(data, fileName);\r\n\r\n debug(\"saveVectorData(Vector, \" + index + \") - to File complete\");\r\n }",
"public void push(double value) {\n memory[pointer] = value;\n pointer = (pointer + 1) % memory.length;\n }",
"@Override\n\tpublic void setValueAt(Object aValue, int rowIndex, int columnIndex) {\n\n\t}",
"@Override\n\t\tpublic void write(DataOutput arg0) throws IOException {\n\t\t\tk.write(arg0);\n\t\t\tv.write(arg0);\n\t\t}",
"@Override\r\n\tpublic void setValueAt(Object aValue, int rowIndex, int columnIndex) {\n\t\t\r\n\t}",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"public abstract void setValue(Context c, Object v) throws PropertyException;",
"godot.wire.Wire.Vector2 getVector2Value();",
"public void setValue(int v) {\n if (!frozen) {\n //if (v > 0 || v <= numSides) {\n if (0 < v && v <= numSides) {\n value = v;\n getValue();\n } else {\n value = v;\n System.out.println(\"Attempted to set value to \" + value + \" , assumed 1.\");\n this.value = 1;\n getValue();\n }\n }\n }",
"public void setValue(Object value) { this.value = value; }",
"float put(int idx, float val);",
"final public void setAttr(final String name, final Vector2 value) {\r\n\t\tmOptmizedKey++;\r\n\t\tfor(final Attr attr : mAttributes) {\r\n\t\t\tif(attr.Name.equals(name)) {\r\n\t\t\t\tif(value == null)\r\n\t\t\t\t\tattr.Vector = null;\r\n\t\t\t\telse\r\n\t\t\t\t\tattr.Vector = value.clone();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public abstract void write(O value) throws IOException;",
"@CriticalNative\n private static native void nAddAxisValue(long builderPtr, int tag, float value);",
"public static native void OpenMM_AmoebaWcaDispersionForce_setAwater(PointerByReference target, double inputValue);",
"public void set(final V value) {\n\t\tthis.value = value;\n\t}",
"public JdbNavTree(Vector value) {\r\n super(value);\r\n commonInit();\r\n }",
"public void setValue(EvaluationAccessor accessor, Value value) {\n getContext().addErrorMessage(\"left side of accessor must be a compound value\", Message.CODE_RESOLUTION);\n }",
"public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;",
"@Override\n public void addValue(T value) {\n Vertex<T> vertex = new Vertex<>(value);\n vertices.put(value,vertex);\n }",
"public synchronized void setData(Vector v) {\n // parse integer elements from the string and insert in the vector\n if (v != null) {\n TreeData = (Vector)v.clone();\n }\n else {\n TreeData = null;\n }\n }",
"protected void sendVector(Vector3f vector, String uniformName) {\n \n //Create the uniformLocation\n int uniformLocation = glGetUniformLocation(programID, uniformName);\n\n //Create the buffer and buffer the data to it\n FloatBuffer buffer = BufferUtils.createFloatBuffer(3);\n vector.get(buffer);\n glUniform3fv(uniformLocation, buffer);\n }",
"godot.wire.Wire.Vector3 getVector3Value();",
"@Override\n public void setQuick(int row, int column, double value) {\n base.setQuick(rowPivot[row], columnPivot[column], value);\n }",
"public <T> void write(MDSKey id, T value) {\n try {\n table.put(new Put(id.getKey()).add(COLUMN, serialize(value)));\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"public void setValueAt(Object value, int row, int col)\r\n throws IllegalStateException {\r\n\r\n if(columnsAreNum != null && columnsAreNum.length>0){\r\n\t for(int i =0; i< columnsAreNum.length; i++){\r\n\t if(col == columnsAreNum[i]){\r\n\t value = new Double(tranferStringToNum(value.toString()));\r\n\t break;\r\n\t }\r\n\t }\r\n\t}\r\n //Set value at cell\r\n ( (Vector) data.elementAt(row)).setElementAt(value, col);\r\n //Set status modify to this row.\r\n if (!(Integer.parseInt( ( (Vector) data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)) {\r\n ((Vector) data.elementAt(row)).setElementAt(new Integer(IS_MODIFIED),\r\n numberOfcolumns);\r\n this.updatedStatus = true;\r\n }\r\n }",
"public void set(int i, long v) {\n data[i] = newValue(v);\n }",
"public void createHashedVector() {\n Double val;\n for(int i=0; i < this.size; i++) {\n val = this.get(i);\n if(val !=0) {\n this.hmap.put(i, val);\n }\n } \n }",
"@Override\n public void setValueAt(Object value, int row, int col) {\n data[row][col] = value;\n fireTableCellUpdated(row, col);\n }",
"public void setVec(float[] vec) {\n this.vec = vec;\n }",
"@Override\n\tpublic void\n\tset( int i, double value )\n\t{\n\t\tdata[i] = value;\n\t}",
"public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }",
"public abstract Vector4fc set(float d);",
"public void _write(org.omg.CORBA.portable.OutputStream ostream)\r\n {\r\n NiveauEtudeHelper.write(ostream,value);\r\n }",
"public static void generator(){\n int vector[]= new int[5];\r\n vector[10]=20;\r\n }"
]
| [
"0.5838165",
"0.5795751",
"0.57853746",
"0.5748476",
"0.550522",
"0.54596657",
"0.53812",
"0.5357512",
"0.5283926",
"0.5246149",
"0.5219979",
"0.5211607",
"0.5156348",
"0.5141112",
"0.5129749",
"0.51264024",
"0.5118343",
"0.5091987",
"0.50896955",
"0.50770515",
"0.50707304",
"0.5041756",
"0.5019492",
"0.50146306",
"0.50099635",
"0.50099635",
"0.49993598",
"0.49937844",
"0.4989076",
"0.49450243",
"0.49395806",
"0.49304837",
"0.49044567",
"0.48830423",
"0.4881012",
"0.48732087",
"0.48628557",
"0.48604795",
"0.48549497",
"0.4838056",
"0.4836769",
"0.48352516",
"0.48160753",
"0.481359",
"0.4806381",
"0.47943717",
"0.47943717",
"0.4791513",
"0.47909555",
"0.47868752",
"0.47812426",
"0.47807983",
"0.47803366",
"0.4778952",
"0.4777503",
"0.47741336",
"0.47738853",
"0.4773501",
"0.4771585",
"0.476641",
"0.47656178",
"0.4762712",
"0.47618932",
"0.4761565",
"0.47570652",
"0.47508907",
"0.47475213",
"0.47457832",
"0.47280565",
"0.47276315",
"0.47276315",
"0.47264004",
"0.47231314",
"0.47213507",
"0.47153062",
"0.47067437",
"0.46973935",
"0.4694413",
"0.46902835",
"0.46901724",
"0.46819696",
"0.46785343",
"0.46737862",
"0.4671898",
"0.46691737",
"0.4667843",
"0.4665284",
"0.46610725",
"0.46599627",
"0.46563756",
"0.46529704",
"0.46481806",
"0.4646848",
"0.46450442",
"0.46429563",
"0.46411923",
"0.46309763",
"0.46296275",
"0.46283448",
"0.4626124"
]
| 0.59033847 | 0 |
/constructor to print out the name of the car. The constructor is passed the parameter by the child class when wecreate theobject for the child class | public AbstractCar(String car){
System.out.println("\n\n The following are the details for : " + car);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Car(String carname) {\n this.carname = carname;\n }",
"public Car(){\n\t\t\n\t}",
"public Car(String description)\r\n {\r\n this.description = description;\r\n customersName = \"\";\r\n }",
"@Override\n public String toString() {\n return \"Car{\" +\n \"name='\" + name + '\\'' +\n '}';\n }",
"Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }",
"public Car() {\r\n super();\r\n }",
"public Car() {\n super();\n }",
"public String toString() {\r\n return \"Car with registration number: \" + super.toString();\r\n }",
"public Car(String licensePlate, double fuelEconomy){\n this.licensePlate = licensePlate;\n this.fuelEconomy = fuelEconomy;\n}",
"public Supercar() {\r\n\t\t\r\n\t}",
"public void displayCar()\n\t{\n\t\tSystem.out.println(\"Wheels of car\t:\t\" + objCar.getWheel());\n\t\tSystem.out.println(\"Speed of car\t:\t\" + objCar.getSpeed());\n\t\tSystem.out.println(\"Passengers of car\t:\t\" + objCar.getCarPassengerNumber());\n\t}",
"public Car() {\n }",
"@Override\n public String toString() {\n return \"Car \" + this.id + \". Size : \" + this.size\n + \".\\nOrientation :\" + this.orientation\n + \". Current position : \" + this.currentPosition;\n }",
"Car()\r\n\t{\r\n\t\tSystem.out.println(\"hello\");\r\n\t}",
"public Car() {\n }",
"public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }",
"ByCicle(int weight, String name) {\r\n //super keyword can be used to access the instance variables of superclass\r\n //\"super\" can also be used to invoke parent class constructor and method\r\n super(weight);//Accessign Superclass constructor and its variable\r\n //Global Variable=Local variable\r\n this.name = name;\r\n }",
"public ElectricCar(String mfr, String color, Model model, Vehicle.PowerSource power, \n\t\t double safety, int range, boolean awd, int price, int rch,String batteryType, int VIN)\n{\n\t super(mfr, color, model, Vehicle.PowerSource.ELECTRIC_MOTOR, safety, range, awd, price, VIN);\n\t rechargeTime = rch;\n\t batteryType = \"Lithium\";\n}",
"public String getCarteName() {\n return carteName;\n }",
"public Bicycle(int startCadence, int startSpeed, int startGear,\n String name) {\n System.out.println(\"Bicycle.Bicycle- has arguments\");\n this.gear = startGear;\n this.cadence = startCadence;\n this.speed = startSpeed;\n this.name = name;\n }",
"public void car(){\n\t\t\tSystem.out.println(\"My car is BMW\");\n\t\t}",
"public static void main(String[] args) {\n\n Car Lorry=new Car();\n Car SportCar=new Car();\n\n printInfo();\n\n }",
"@Override\r\n public String toString() {\r\n return \"the car \"+this.id+\"has as size \"+this.size+\r\n \"and is oriented \"+this.orientation+\r\n \" and have a currentPosition in \"+this.currentPosition;\r\n }",
"public Car(String regisNo,String carOwner,String ownerStatus)\n {\n this.regisNo = regisNo;\n this.carOwner = carOwner;\n this.ownerStatus = ownerStatus;\n }",
"public static void main(String[] args) {\n car car = new car(8,\"Base Car\");\n System.out.println(car.startEngine());\n System.out.println(car.accelerate());\n System.out.println(car.brake());\n\n //output for the lamborghini car\n lambo gall = new lambo(8,\"Gallardo\");\n System.out.println(gall.startEngine());\n System.out.println(gall.accelerate());\n System.out.println(gall.brake());\n\n //output for the ferrari car\n ferrari ferr = new ferrari(6,\"F30\");\n System.out.println(ferr.startEngine());\n System.out.println(ferr.accelerate());\n System.out.println(ferr.brake());\n\n }",
"public CyberPet ( String str )\r\n {\r\n name = str;\r\n }",
"@Override // Inherited from the Object class.\n public String toString() {\n return \"gear: \" + gear + \" cadence: \" + cadence + \" speed: \" + speed +\n \" name: \" + name;\n }",
"public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System.out.println(xx.getBrand()+ \" \"+ xx.getModel()+ \" \"+ xx.getReference()+ \" \"+ xx.getYear()+ \" \");\n }\n }",
"void printCarInfo();",
"public Car()\n {\n \tsuper();\n bodyType = null;\n noOfDoors = 0;\n noOfSeats = 0;\n }",
"public static void main(String[] args) {\nCar car = new Car (\"Ford\", 25000, 2003);\nSystem.out.println(car.carBrand + \"\\t\" + car.price + \"\\t\" + car.year);\n\nCar car1 = new Car (\"Nissan\", 50000, 2013);\t\nSystem.out.println(car1.carBrand + \"\\t\" + car1.price + \"\\t\" + car1.year);\n\t}",
"public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }",
"public EmpName() {\n\t\tsuper(\"Aditi\",\"Tyagi\");\n\t\t//this(10);\n\t\tSystem.out.println(\"Employee name is Vipin\");\n\t\t\n\t}",
"public static void main(String[] args) {\n\n Car car2=new Car(\"bmw\" ,2020,250876,\"yellow\");\n\n System.out.println(car2.brand);\n System.out.println(car2.year);\n System.out.println(car2.price);\n System.out.println(car2.color);\n\n Car car3=new Car(\"toyoto\",2010,35876,\"black\");\n System.out.println(car3);//tostring\n\n Library.stars();\n car3.getCarBrandYear();\n Library.stars();\n car2.getCarBrandYear();\n\n Car car4=new Car(\"audi\",2010);\n System.out.println(car4);\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tVehicle v = new Vehicle();\n\t\tv.color = \"Black\";\n\t\tv.model = \"2020\";\n\t\tv.displayVehicleProperties();\n\t\t\n\t\tCar c = new Car();\n\t\tc.speed();\n\t\t//this above c.speed will overide the value of car class and will not display the value stored in parent class if both both parent and child class has speed property\n c.sunroof();\n c.brake();\n\t}",
"CarType(String carCode)\r\n {\r\n this.carCode = carCode;\r\n }",
"public Car( double fuelEfficiency)\n {\n // initialise instance variables\n fuelEfficiency = fuelEfficiency;\n fuelInTank = 0;\n }",
"public Car (String color, int wheels, double speed)\n {\n this.color = color;\n this.wheels = wheels;\n this.speed = speed;\n }",
"public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }",
"public static void main(String[] args){\n Vehicle bike = new Vehicle(\"blue\");\n // Vehicle car = new Vehicle();\n // contruct is being used on this new object\n Vehicle redCar = new Vehicle(\"red\");\n System.out.println(redCar.getColor());\n\n // set bike color and wheels\n // bike.setColor(\"Blue\");\n bike.setNumberOfWheels(2);\n\n // get bike color and wheels\n System.out.println(\" Bike object - color\" + bike.getColor());\n System.out.println(\" Bike object - Wheels\" + bike.getNumberOfWheels());\n // set car color and wheels\n // car.setColor(\"Green\");\n // car.setNumberOfWheels(4);\n\n // get car color and wheels\n // System.out.println(\" Car object - color\" + car.getColor());\n // System.out.println(\" Car object - Wheels\" + car.getNumberOfWheels());\n\n\n }",
"public Car(double fuelEfficiency)\n {\n this.fuelEfficiency = fuelEfficiency;\n fuelInTank = 0;\n }",
"public VITACareer(String career_name)\r\n {\r\n this.name = career_name;\r\n }",
"public CreateJPanel(Car car) {\n initComponents();\n this.car=car;\n }",
"Cab(){\n\t\tSystem.out.println(\"Cab Object Constructed..\");\n\t}",
"Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals constructor \n\t\tnew Cardiac().new Cells().new Chemicals();\n\t\t\n\t}",
"public Car() {\n\t\t\tmake = \"GM\";\n\t\t\tyear = 1900;\n\t\t\tmileage= 0;\n\t\t\tcarCost = 0;\n\t\t}",
"@Override\n public String getInfo() {\n return \"Car:\\n\" + \"\\tBrand: \" + getBrand() + \"\\n\" + \"\\tModel: \" + getModel() + \"\\n\"\n + \"\\tRegistration Number: \" + getRegistrationNumber() + \"\\n\"\n + \"\\tNumber of Doors: \" + getNumberOfDoors() + \"\\n\"\n + \"\\tBelongs to \" + owner.getName() + \" - \" + owner.getAddress();\n }",
"public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }",
"public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }",
"public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }",
"public Car(String registrationNumber, String make, String model) {\r\n super(registrationNumber, make, model);\r\n }",
"public CarExternalizable() {\n System.out.println(\"in carExternalizable\");\n }",
"public Animal(String message){\n name=\"Bob the Animal\";\n System.out.println(message);\n }",
"public static void main(String[] args) {\r\n \r\n // declare some cars\r\n Car randomCar, coolCar, neatoCar;\r\n \r\n // make a scanner to get input\r\n Scanner sc = new Scanner(System.in);\r\n \r\n // make some variables to store the first car's values\r\n String coolCarMake, coolCarModel;\r\n int coolCarYear;\r\n double coolCarPrice, coolCarLength, coolCarWidth;\r\n \r\n // Get the user's input\r\n System.out.println(\"Please enter the make:\");\r\n coolCarMake = sc.nextLine();\r\n System.out.println(\"Please enter the model:\");\r\n coolCarModel = sc.nextLine();\r\n System.out.println(\"Please enter the year:\");\r\n coolCarYear = sc.nextInt();\r\n System.out.println(\"Please enter the price:\");\r\n coolCarPrice = sc.nextDouble();\r\n System.out.println(\"Please enter the length:\");\r\n coolCarLength = sc.nextDouble();\r\n System.out.println(\"Please enter the width:\");\r\n coolCarWidth = sc.nextDouble();\r\n sc.close();\r\n \r\n // print out the information about the cars\r\n randomCar = new Car();\r\n coolCar = new Car(coolCarMake, coolCarModel, coolCarYear, coolCarPrice, coolCarLength, coolCarWidth);\r\n neatoCar = new Car(\"Land Rover\", \"LR4\", 2016, 59990.0, 4.829, 2.053);\r\n System.out.println(randomCar);\r\n System.out.println(coolCar);\r\n System.out.println(neatoCar);\r\n randomCar.honk();\r\n }",
"public Carrot() {\n\t\tadjustHunger = -40.0;\n\t\tadjustThirst = -10.0;\n\t\tcost = 4.55;\n\t\tname = \"Carrot\";\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tCar1 car = new Car1();//객체생성\r\n\t\t//객체를 생성하면 생성자가 호출되고 필드 초기화와 메소드 호출 등\r\n\t\t//객체를 사용할 준비를 한다.\r\n\t\tSystem.out.println(\"company : \" + car.company);\r\n\t\tSystem.out.println(\"model : \" + car.model);\r\n\t\tSystem.out.println(\"color : \" + car.color);\r\n\t\tSystem.out.println(\"speed : \" + car.speed);\r\n\t\t\r\n\r\n\t}",
"public Vehicle(String vehicleName, int vehiclePerformance, int vehiclePrice) {\n\n super(vehicleName, vehiclePerformance, vehiclePrice);\n }",
"public void carDetails() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\n Parent parent = new Parent();\n parent.name=\"asdfasdfas\";\n\n Son son = new Son();\n\n\n }",
"public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }",
"public Carmodel() {\n this(\"CarModel\", null);\n }",
"public void Car(String ownerName, Image itemImg, float itemPrice) \n\t{\n name = ownerName;\n img = itemImg;\n price = itemPrice;\n\t}",
"Vehicle(String name, String id, String client_pass){\n super(name, id, client_pass);\n System.out.println(\"\\n\\tWhich type of Health Insurance do you want?\\n\\n\");\n this.printDetails();\n int op = input.nextInt();\n this.planChooser(op);\n }",
"public addcar() {\n initComponents();\n }",
"public Bird(String name) {\n this.name = this.name+name;\n }",
"Seasons(String name) {\n System.out.println(\"Called constructor\");\n this.name = name;\n }",
"public static void main(String[] args) {\nCar car=new Car();\r\nSystem.out.println(car.color);\r\nSystem.out.println(Car.name);\r\ncar.run();\r\ncar.play();\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n//\t\tSystem.out.println(\"Start here\");\r\n//\t\tCars vinCar = new Cars(\"Red\", \"BMW\", \"M5\", 2018, 100,2); // object 1\r\n//\t\tCars ahmadsCar = new Cars(\"Black\",\"Merc\",\"c63 amgs\",2020,150,2); // object 2\r\n\t\tCars newCar = new Cars();\r\n//\t\tnewCar.setBrand(\"Audi\");\r\n////\t\tnewCar.setColour(\"green\");\r\n//////\t\tnewCar.setModel(\"A5\");\r\n//\t\tnewCar.setSpeed(0);\r\n//\t\tnewCar.setYear(2020);\r\n////\t\tnewCar.setNoWheels(0);\r\n\t\tSystem.out.println(newCar.getNoWheels());\r\n//\t\tSystem.out.println(newCar.col);\r\n\t\t//System.out.println(newCar);\r\n\t\t\r\n\t\t//System.out.println(vinCar);\r\n//\t\tSystem.out.println(ahmadsCar);\r\n\t//\tvinCar.setBrand(\"Audi\");\r\n\t\t//System.out.println(vinCar.getBrand());\r\n\t\t//System.out.println(vinCar);\r\n//\t\tSystem.out.println(vinCar.drive(123));\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args){\n Car myCar = new Car();\n myCar.car_human();\n myCar.car_color(); \n }",
"public static void main(String[] args) {\n String eName = \"Edison\";\n int eAge = 4;\n double eWeight = 13.4;\n\n String tesName = \"Tesla\";\n int tesAge = 7;\n double tesWeight = 6.9;\n\n // Object WITHOUT constructor\n Cat ncEdison = new Cat();\n ncEdison.name = \"Edison\";\n ncEdison.age = 4;\n ncEdison.weight = 13.4;\n ncEdison.printDescription();\n\n // Object WITH constructor\n Cat cTesla = new Cat(\"Tesla\", 7, 6.9);\n Cat cSpotify = new Cat(\"Spotify\", 8, 3.4);\n\n cTesla.printDescription();\n cSpotify.printDescription();\n\n Cat mystery = new Cat();\n mystery.printDescription();\n\n Dog fido = new Dog(\"Fido\", 15, 30);\n// Dog frodo = new Dog(); // No default constructor for Dog()\n\n// System.out.println(fido.weight); // Is private\n\n Journal diary = new Journal();\n diary.append(\"Today Tesla was evil\");\n diary.append(\"Today Edison was asleep\");\n String theWords = diary.getWords();\n theWords = \"_deleted by timmy\";\n\n // Static\n ElectricCharge blanket = new ElectricCharge(7);\n ElectricCharge pants = new ElectricCharge(2);\n ElectricCharge pyjamas = new ElectricCharge(5);\n ElectricCharge socks = new ElectricCharge(4);\n\n System.out.println(\"The total Charge is: \" + ElectricCharge.getTotalCharge());\n\n }",
"public Person(String vorname, String nachname) {\n\n\t}",
"public Carrier() {\n }",
"public Car(String primaryKey, String name, String dealerKey, int year, Category category,\r\n double price, String displacementCC, int maxPower,\r\n String powerRPM, double torqueFtLb, String torqueRPM, DriveTrain driveTrain,\r\n Aspiration aspiration, double length, double width, double height, double weight,\r\n double maxSpeed, double acceleration, double braking, double cornering, double stability) {\r\n this.primaryKey = primaryKey;\r\n this.name = name;\r\n this.manufacturerKey = dealerKey;\r\n this.year = year;\r\n this.category = category;\r\n this.price = price;\r\n this.displacementCC = displacementCC;\r\n this.maxPower = maxPower;\r\n this.powerRPM = powerRPM;\r\n this.torqueFtLb = torqueFtLb;\r\n this.torqueRPM = torqueRPM;\r\n this.driveTrain = driveTrain;\r\n this.aspiration = aspiration;\r\n this.length = length;\r\n this.width = width;\r\n this.height = height;\r\n this.weight = weight;\r\n this.maxSpeed = maxSpeed;\r\n this.acceleration = acceleration;\r\n this.braking = braking;\r\n this.cornering = cornering;\r\n this.stability = stability;\r\n }",
"public String toString(){\r\n return \"Breed: \" + this.Breed + \"\\nName: \"+ super.name + \"\\nPrimary Color: \" +this.PrimaryColor + \"\\nSize: \" + this.Size + \"\\nAge: \" + super.age;\r\n }",
"public static void main(String[] args) {\n car hyundai = new car();\n car maruti = new car();\n hyundai.setModel(\"i10\");\n hyundai.setDoors();\n System.out.println(hyundai.getModel());\n System.out.println(hyundai.getDoors());\n hyundai.setModel(\"baleno\");\n hyundai.setDoors();\n System.out.println(hyundai.getModel());\n System.out.println(hyundai.getDoors());\n\n\n }",
"@Override\n public String toString() {\n return \"CarData{\" +\n \"room=\" + room +\n \", player=\" + player +\n '}';\n }",
"public Bicycle() {\n super(VEHICLE_IS);\n // Prompt user for function and set it\n showMenu(\"What is the bicycle's function?\", FUNCTIONS);\n // Prompt user for material and set it\n showMenu(\"What is the bicycle made of?\", MATERIALS);\n }",
"public CarShowroom() {\n initialiseShowroom();\n calculateAveragePrice();\n setOldestCar();\n getPriciestCar();\n }",
"public String getCarmake()\n {\n return carmake;\n }",
"Candy() {\n cName = \"\";\n }",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"Abstract Car started\");\n\t}",
"public Car(String typeOfVehicle, boolean transportPeople, String unitBelongsTo, double weightKG, int wheels,\n\t\t\tint doors, String color, int seats)\n\t{\n\t\tsuper(\"Car\", transportPeople, unitBelongsTo, weightKG);\n\t\tthis.wheels = wheels;\n\t\tthis.doors = doors;\n\t\tthis.color = color;\n\t\tthis.seats = seats;\n\t\t\n\t\tSystem.out.println(\"Empty Car\");\n\t}",
"public Cat(String name){\n this.name = name;\n this.setDescription();\n }",
"public Vehicle(){}",
"public Person(String name){\n\t\t\n\t\t\n\t\tthis.myName = name;\n\t\t\n\t}",
"public Ch0209Car(String vin, double efficiency, double fuelCapacity) {\n super();\n this.vin = vin;\n this.efficiency = efficiency;\n this.fuelCapacity = fuelCapacity;\n }",
"public PokemonPark(){\n super(\"Pokemon Park\", \"Una vez por turno blabla\");\n }",
"Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }",
"public Human() { // has to be name of class — COnstuctor\n\t\t\n\t\tname = \"\";\n\t\tage = 0;\n\t\tSystem.out.println(\"CONSTRUCTOR HERE\");\n\t\t\n\t}",
"public Vehicle() {\n }",
"public Car(int floor, String color){\n\t\tthis.carPosition = floor;\n\t\tthis.carColor = color;\n\t}",
"public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}",
"public Name() {\n\n }",
"public Vehicle() {\n\n\t}",
"public Carte(String forme, String couleur, String nature, BufferedImage carteImage) {\n\t\tthis.forme = forme;\n\t\tthis.couleur = couleur;\n\t\tthis.nature = nature;\n\t\tthis.carteImage = carteImage;\n\t}",
"public static void main(String[] args) {\n\t\tCar carUserObj = new Car();\n\t\t//carUserObj.sound();\n\t\tcarUserObj.drive();\n\t\tCar CarObject2= new Car();\n\t\tcarUserObj.changSpeed();\n\t\tSystem.out.println(\"enginType \"+ carUserObj.enginType);\n\t\t//System.out.println(\"modelName \"+ carUserObj.modelName);\n\t}",
"public Car(String make, String model, Color color){\n // set the arguments to the member variables.\n this.make = make;\n this.model = model;\n this.color = color;\n // the default speed will be 0 since the car isn't moving.\n speed = 0;\n }",
"public Carte() {\r\n\t\tthis.setBackground(COULEUR_CARTE);\r\n\r\n\t\tafficheurCarte = new AfficheurCarte();\r\n\t\tafficheurVehicule = new AfficheurVehicule();\r\n\t}",
"public static void main(String[] args) {\n\t\t Car car1=new Car();\n\t car1.make=\"Tesla\";\n\t car1.model=\"S3\";\n\t car1.color=\"Black\";\n\t car1.year=2020;\n\t car1.wheels=4;\n\t car1.windows=5;\n\t car1.speed=200;\n\t car1.drive();\n\t car1.accelerate();\n\t car1.drive();\n\t \n\t System.out.println(\"--------------------------\");\n\t \n\t Car car2=new Car();\n\t car2.make=\"BMW\";\n\t car2.model=\"i8\";\n\t car2.color=\"Purple\";\n\t car2.year=2019;\n\t car2.wheels=4;\n\t car2.windows=6;\n\t car2.speed=300;\n\t \n\t car2.drive();\n\t car2.accelerate();\n\t car2.drive();\n\t \n\t \n\t \n\t System.out.println(\"I have \"+car1.color+\" \");\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\n\t}",
"public Drink(String name){\n this.name = name;\n }"
]
| [
"0.7821964",
"0.6951411",
"0.6950791",
"0.6934634",
"0.6672524",
"0.6668221",
"0.6610074",
"0.65606123",
"0.65470564",
"0.64714104",
"0.6468745",
"0.6465944",
"0.6456808",
"0.6441096",
"0.6396577",
"0.63674754",
"0.6367119",
"0.63661367",
"0.6363124",
"0.63626206",
"0.63620883",
"0.635058",
"0.6328351",
"0.63094753",
"0.63087124",
"0.63079005",
"0.6241056",
"0.6216239",
"0.62145275",
"0.61974406",
"0.6187843",
"0.6179619",
"0.6152459",
"0.6137568",
"0.6127937",
"0.6122674",
"0.6119627",
"0.6097662",
"0.6084759",
"0.6059766",
"0.60548806",
"0.6045986",
"0.6040132",
"0.60379976",
"0.6037026",
"0.6033534",
"0.60092354",
"0.59950966",
"0.5989716",
"0.59884745",
"0.5980454",
"0.597729",
"0.5956002",
"0.59482867",
"0.593467",
"0.593425",
"0.5925151",
"0.59196335",
"0.5906736",
"0.58991313",
"0.58862305",
"0.58589745",
"0.58570534",
"0.5847429",
"0.58422965",
"0.5830504",
"0.5829903",
"0.5814096",
"0.5802036",
"0.5795078",
"0.57913685",
"0.5781303",
"0.5773231",
"0.5772448",
"0.5767508",
"0.57631665",
"0.57613117",
"0.5758832",
"0.57526004",
"0.5752218",
"0.5746528",
"0.5745973",
"0.57413006",
"0.5740666",
"0.57361686",
"0.573386",
"0.5733782",
"0.5732205",
"0.573011",
"0.5716067",
"0.5713683",
"0.5706592",
"0.56975514",
"0.5695282",
"0.56924045",
"0.56827164",
"0.56798977",
"0.5677829",
"0.5677726",
"0.56763077"
]
| 0.7893008 | 0 |
public abstract void fuelEconomy() ; public abstract void blindSpotMonitoring(); public abstract void emergencyAutoBrakes(); | public abstract void maintenanceSchedule() ; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void afvuren();",
"public abstract void mo35054b();",
"public abstract void mo2150a();",
"public abstract void mo20900UP();",
"public abstract void ratCrewGo();",
"public abstract void mo70713b();",
"public abstract void mo4359a();",
"public abstract void mo30696a();",
"public abstract void mo957b();",
"public abstract void mo56925d();",
"public abstract void mo102899a();",
"public abstract void abstractone();",
"abstract void fly();",
"void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }",
"public abstract void mo42330e();",
"public void carParking() {\r\n\t\t\r\n\t}",
"public abstract void MussBeDefined();",
"public abstract void mo20899UO();",
"public abstract void engineWork() throws Exception;",
"public abstract void mo27386d();",
"public abstract void mo45765b();",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"public static interface _cls9\n{\n\n public abstract void onEbayError(List list);\n\n public abstract void onRemindersError();\n\n public abstract void updateMsgRemindersCounts(UserActivitySummary useractivitysummary);\n}",
"public abstract void mo3994a();",
"public abstract void mo42331g();",
"@Override\n\tpublic void carEngine() {\n\n\t}",
"public abstract void PowerOn();",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"public abstract void mh();",
"public void Fight() \n\t{\n\n\t}",
"@Override\r\n\tpublic void vehicleBrand() {\n\r\n\t}",
"public interface Vehicle {\n\n void applyBrakes();\n void speedUp(int delta);\n void slowDown(int delta);\n}",
"public abstract void mo27385c();",
"public abstract void mo27464a();",
"public abstract void comes();",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public abstract void mo6549b();",
"public abstract void mo42329d();",
"public abstract void gameObjectAwakens();",
"public abstract void alimentarse();",
"public abstract void peel();",
"abstract void method();",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"public abstract void m15813a();",
"public interface FlyBehavior {\n public abstract void fly();\n// public abstract void\n}",
"public abstract void abstractMethodToImplement();",
"public abstract void operation();",
"public abstract void call();",
"public abstract void t1();",
"public abstract void t3();",
"@Override\r\n\tpublic void laught() {\n\r\n\t}",
"public abstract void executeFightButton();",
"@Override\npublic void noninvesters() {\n\t\n}",
"public abstract void drive();",
"public abstract void film();",
"public void calling(){ // when the abstract method is implemented in other class 'public' keyword is used..\r\n System.out.println(\"I am calling...\");\r\n }",
"public void smell() {\n\t\t\n\t}",
"public abstract void calculateMovement();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"public abstract void temperatureReport();",
"public interface VehicleMaintenance {\n\n public void doRepair();\n}",
"protected void handleSecondaryFuel() {\n }",
"public abstract void mo2162i();",
"public interface FlyBehevour {\n void fly();\n}",
"abstract void classRooms();",
"@Override\n public void onTakeOffTeaBagRaised() {\n }",
"public abstract void mo2624j();",
"public interface GameItemConsumer {\n\n\t/**\n\t * Adds more gold to the amount of gold the player already has\n\t * \n\t * @param gold The amount of gold to add\n\t */\n\tpublic abstract void addGold(int gold);\n\n\t/**\n\t * Add to the player's HP\n\t * \n\t * @param hp The amount of HP to add to the player\n\t */\n\tpublic abstract void incrementHealth(int hp);\n\n\t/**\n\t * Sets the AP to zero. Used by actions which take up all the AP\n\t */\n\tpublic abstract void zeroAP();\n\t\n\t\n\t/**\n\t * Informs the user of an equipment change;\n\t * @param string\n\t */\n\tpublic abstract void equipmentChange(String string);\n}",
"public void atender(){\n\n }",
"@Override\n\tpublic void bidfunction() {\n\t\t\n\t}",
"@Override\n\tpublic void bidfunction() {\n\t\t\n\t}",
"public void logic(){\r\n\r\n\t}",
"public abstract void method1();",
"public interface AbstractC7617o0oOO {\n void OooO00o(View view);\n\n void OooO0O0(View view);\n\n void OooO0OO(View view);\n}",
"public interface HouseholdAppliances {\n public void on();\n public void off();\n}",
"public abstract void fire();",
"public abstract void fire();",
"abstract void sayHello();",
"public abstract void t2();",
"public interface AbstractC7729o0ooOoo {\n void OooO00o();\n}",
"public void Atender();",
"public abstract void raiseSalary();",
"public void actionOffered();",
"public void sensorSystem() {\n\t}",
"public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}",
"public void mo21825b() {\n }",
"abstract public void performAction();",
"abstract void bookCab();",
"public void mo1400a() {\n }",
"void sitOn();",
"public interface Behaviour {\n/**abstract method of the Behaviour interface*/\n\tvoid sad();\n}",
"public abstract void eat(String foodName);",
"@Override\r\n\tpublic void emettreOffre() {\n\t\t\r\n\t}",
"public void mo21880v() {\n }",
"public void travaille();",
"public abstract int mo4375b();",
"@Override\n\tpublic void anular() {\n\n\t}"
]
| [
"0.70893407",
"0.7011902",
"0.69834447",
"0.69723237",
"0.6874643",
"0.68474823",
"0.67956465",
"0.67719406",
"0.67676836",
"0.6753972",
"0.67363465",
"0.6718253",
"0.6685603",
"0.6662422",
"0.664397",
"0.6620943",
"0.6610561",
"0.6596512",
"0.6591083",
"0.65827274",
"0.6573146",
"0.6567496",
"0.65437883",
"0.6534549",
"0.65141064",
"0.64993066",
"0.6486845",
"0.6459793",
"0.64421624",
"0.6428247",
"0.6417765",
"0.6411393",
"0.63981557",
"0.6382893",
"0.63796115",
"0.63742775",
"0.63742775",
"0.63742775",
"0.63742775",
"0.6370117",
"0.63241345",
"0.63107836",
"0.6304689",
"0.6266564",
"0.62460744",
"0.62395346",
"0.62365305",
"0.62355566",
"0.6211431",
"0.6210442",
"0.62013793",
"0.6200276",
"0.61948526",
"0.61930037",
"0.619012",
"0.6182453",
"0.6178716",
"0.6169307",
"0.6158168",
"0.6156489",
"0.61352664",
"0.61313426",
"0.61265266",
"0.61229855",
"0.6107817",
"0.6107227",
"0.61064744",
"0.6105982",
"0.61040777",
"0.61022884",
"0.6101051",
"0.6097016",
"0.60795045",
"0.60795045",
"0.60733414",
"0.6069333",
"0.6063061",
"0.6058087",
"0.6056545",
"0.6056545",
"0.60437465",
"0.6043324",
"0.60425025",
"0.60413384",
"0.603986",
"0.60396546",
"0.60297805",
"0.6023828",
"0.6019796",
"0.6012329",
"0.5989513",
"0.5987213",
"0.59853435",
"0.5983524",
"0.5981836",
"0.597935",
"0.59721863",
"0.5957017",
"0.595623",
"0.59537387"
]
| 0.6380474 | 34 |
Iterates over a set of elements and creates a List that contains all of them. The order of the elements in the List will be the order returned by iterator parameter. | public static <T> List<T> toList(Iterator<T> iterator)
{
List<T> newList = new ArrayList();
addToCollection(newList, iterator);
return newList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> List<T> toList(Iterator<T> elements) {\n List<T> list = new LinkedList<T>();\n\n while (elements.hasNext()) {\n list.add(elements.next());\n }\n\n return list;\n }",
"public static <T> List<T> toList(Iterable<T> elements) {\n return toList(elements.iterator());\n }",
"public List<Element> listElements() {\r\n List<Element> result = new ArrayList<>(numElements);\r\n for (Entry<Fitness, List<Element>> entry\r\n : elementsByFitness.descendingMap().entrySet()) {\r\n List<Element> list = entry.getValue();\r\n assert !list.isEmpty();\r\n result.addAll(list);\r\n }\r\n\r\n return result;\r\n }",
"public List allElements() {\r\n\t\tArrayList elems = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\telems.addAll(params[n].allElements());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\telems.addAll(exp_list[n].allElements());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\telems.add(ob);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\telems.add(ob);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elems;\r\n\t}",
"private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }",
"Iterable<T> list();",
"public ArrayList<Element> listeElementsDansEspaces(final Set<String> espaces) {\n return(new ArrayList<Element>());\n }",
"Collection<V> getAllElements();",
"public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public List<String> getElements() {\r\n List<String> result = new ArrayList<String>();\r\n if (order == null) {\r\n return result;\r\n }\r\n result.addAll(order.keySet());\r\n Collections.sort(result, new Comparator<String>(){\r\n @Override public int compare(String arg0, String arg1) {\r\n return order.get(arg0).compareTo(order.get(arg1));\r\n }\r\n });\r\n return result;\r\n }",
"public HashSet getElements() {\n\treturn elements;\n }",
"public static List toList(Iterator iter)\r\n {\r\n if (iter == null)\r\n {\r\n return null;\r\n }\r\n List list = new ArrayList();\r\n while (iter.hasNext())\r\n {\r\n list.add(iter.next());\r\n }\r\n return list;\r\n }",
"public static <T> List<T> createList(Iterator<T> iter) {\n\t\tList<T> list = new ArrayList<T>();\n\t\twhile (iter.hasNext()) {\n\t\t\tlist.add(iter.next());\n\t\t}\n\t\treturn list;\n\t}",
"@SafeVarargs\n public static <E> List<E> listOf(E... elements) {\n return java.util.Collections.unmodifiableList(Arrays.asList(elements));\n }",
"Iterable<? extends XomNode> elements();",
"set.addAll(Arrays.asList(a));",
"public Iterable<HTMLElement> elements() {\n return iterable;\n }",
"public ArrayList<Element> listeTousElements() {\n return(new ArrayList<Element>(cacheNomsElements.keySet()));\n }",
"private List<List<Item>> generatePermutations(final ItemSet itemSet) {\n\t\tList<List<Item>> result = new ArrayList<List<Item>>();\n\n\t\t// If the item set is zero, return an empty list\n\t\tif (itemSet.size() == 0) {\n\t\t\tresult.add(new ArrayList<Item>());\n\t\t\treturn result;\n\t\t}\n\n\t\t// Get and Remove the first item from the set\n\t\tItem firstElement = itemSet.first();\n\t\titemSet.remove(firstElement);\n\n\t\t// Generate the permutations of the smaller item set\n\t\tList<List<Item>> permutations = generatePermutations(itemSet);\n\n\t\t// For each permutation...\n\t\tfor (List<Item> permutation : permutations) {\n\t\t\t// Add the first element to the i-th position\n\t\t\tfor (int index = 0; index <= permutation.size(); index++) {\n\t\t\t\tList<Item> temp = new ArrayList<Item>(permutation);\n\t\t\t\ttemp.add(index, firstElement);\n\t\t\t\tresult.add(new ArrayList<Item>(temp));\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }",
"static public List orderedsetFlatten(Object source) {\n\t\tList result = new ArrayList();\n\t\tif ( source instanceof Collection ) {\n\t\t\tIterator it = ((Collection)source).iterator();\n\t\t\twhile ( it.hasNext() ) {\n\t\t\t\tObject elem = it.next();\n\t\t\t\tif ( elem instanceof Collection ) {\n\t\t\t\t\tresult.addAll( orderedsetFlatten(elem));\n\t\t\t\t} else {\n\t\t\t\t\tresult.add(elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"List<T> getAllDistinct();",
"public ArrayList getChunks() {\n ArrayList tmp = new ArrayList();\n for (Iterator i = iterator(); i.hasNext(); ) {\n tmp.addAll(((Element) i.next()).getChunks());\n }\n return tmp;\n }",
"public static <T> Set<T> duplicatedElementsOf(List<T> input) {\n int count = input.size();\n if (count < 2) {\n return ImmutableSet.of();\n }\n Set<T> duplicates = null;\n Set<T> elementSet = CompactHashSet.createWithExpectedSize(count);\n for (T el : input) {\n if (!elementSet.add(el)) {\n if (duplicates == null) {\n duplicates = new HashSet<>();\n }\n duplicates.add(el);\n }\n }\n return duplicates == null ? ImmutableSet.of() : duplicates;\n }",
"public List<T> getPageElementsList();",
"public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }",
"List<T> obtenerAll();",
"@Override\n\tpublic Iterator<WebElement> iterator() {\n\t\treturn this.elements.iterator();\n\t}",
"public Iterator getIterator() {\n return myElements.iterator();\n }",
"public List<T> toList() {\n return Query.toList(iterable);\n }",
"public static Set orderedSet(Set set) {\n/* 236 */ return (Set)ListOrderedSet.decorate(set);\n/* */ }",
"public static <T> List<T> immutableList(T... elements){\n return Collections.unmodifiableList(Arrays.asList(elements.clone()));\n }",
"@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }",
"private static <T> Collection<Set<T>> partitionWithComparator(\n Collection<T> elements, Comparator<T> equivalenceRelation) {\n // TODO(bazel-team): (2009) O(n*m) where n=|elements| and m=|eqClasses|; i.e.,\n // quadratic. Use Tarjan's algorithm instead.\n List<Set<T>> eqClasses = new ArrayList<>();\n for (T element : elements) {\n boolean found = false;\n for (Set<T> eqClass : eqClasses) {\n if (equivalenceRelation.compare(eqClass.iterator().next(),\n element) == 0) {\n eqClass.add(element);\n found = true;\n break;\n }\n }\n if (!found) {\n Set<T> eqClass = new HashSet<>();\n eqClass.add(element);\n eqClasses.add(eqClass);\n }\n }\n return eqClasses;\n }",
"@Test\n public void whenAddElementToTreeThenIteratorReturnsSorted() {\n final List<Integer> resultList = Arrays.asList(4, 3, 6);\n final List<Integer> testList = new LinkedList<>();\n this.tree.add(4);\n this.tree.add(6);\n this.tree.add(3);\n\n Iterator<Integer> iterator = this.tree.iterator();\n testList.add(iterator.next());\n testList.add(iterator.next());\n testList.add(iterator.next());\n\n assertThat(testList, is(resultList));\n }",
"public Set list() {\n Set result = new HashSet();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result.addAll( catalog.list() );\n }\n return result;\n\n }",
"@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}",
"public Collection<String > getResult(){\n Collection<String> result = new HashSet<String>();\n result.add(\"A\");\n result.add(\"B\");\n result.add(\"C\");\n result.add(\"D\");\n return result;\n }",
"public ArrayList<String> WebElementArrayList(By locator) {\n List<WebElement> elementList = getDriver().findElements(locator);\n ArrayList<String> elementArrayList= new ArrayList<>();\n String temp = null;\n for (int i = 0; i < elementList.size()-1; i++) {\n temp = elementList.get(i).getText();\n\n elementArrayList.add(temp);\n }\n return elementArrayList;\n }",
"public synchronized Collection getElementos() {\n return elemento.values();\n }",
"@Override\n\tpublic Iterator<T> iterator() {\n\t\t\n\t\treturn lista.iterator();\n\t}",
"private List<Set<String>> getSubSets(Set<String> set) {\n\t\tString[] setArray = set.toArray(new String[0]);\n\t\tList<Set<String>> result = new ArrayList<Set<String>>();\n\t\tfor(int i = 0; i < setArray.length; i++){\n\t\t\tSet<String> subSet = new HashSet<String>();\n\t\t\tfor(int j = 0; j < setArray.length; j++){\n\t\t\t\tif(j != i) subSet.add(setArray[j]);\n\t\t\t}\n\t\t\tresult.add(subSet);\n\t\t}\n\t\treturn result;\n\t}",
"@Override\n\tpublic ArrayList<Elezione> listaElezioni() {\n\t\tArrayList<Elezione> listaElezioni = caricaElezioni();\n\t\treturn listaElezioni;\n\t}",
"public synchronized Enumeration elements()\n\t{\n\t\treturn m_elements.elements();\n\t}",
"public Collection<V> getAllElements() {\n\t\treturn cacheMap.values();\n\t}",
"public static List<XmlAdaptedTask> getXmlSerializableTaskList(HashSet<ReadOnlyTask> taskSet) {\n return new ArrayList<XmlAdaptedTask>(taskSet.stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));\n }",
"private List<T> getCompList(){\n\t\tList<T> l = new ArrayList<T>();\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tif(indices[i]==1){\n\t\t\t\tl.add(list.get(i));\n\t\t\t}\n\t\t}\n\t\treturn l;\n\t}",
"public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }",
"public abstract List<T> all();",
"@Ignore\n @Test\n public void hashSetToStream() {\n // BEGIN HASHSET_TO_STREAM\n Set<Integer> numbers = new HashSet<>(asList(4, 3, 2, 1));\n\n List<Integer> sameOrder = numbers.stream()\n .collect(toList());\n\n // This may not pass\n assertEquals(asList(4, 3, 2, 1), sameOrder);\n // END HASHSET_TO_STREAM\n }",
"public List<T> inorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n inorderHelper(list, root);\n }\n return list;\n }",
"private Set<List<SortParameter>> getUniqueSets(final List<SortParameter> parameters) {\n\t\t// This should never happen.\n\t\tif(parameters.size() == 0) {\n\t\t\treturn new HashSet<List<SortParameter>>();\n\t\t}\n\t\t\n\t\t// Base case.\n\t\tif(parameters.size() == 1) {\n\t\t\tList<SortParameter> singleList = new ArrayList<SortParameter>(1);\n\t\t\tsingleList.add(parameters.iterator().next());\n\t\t\tHashSet<List<SortParameter>> singleSet = new HashSet<List<SortParameter>>(1);\n\t\t\tsingleSet.add(singleList);\n\t\t\t\n\t\t\treturn singleSet;\n\t\t}\n\t\t\n\t\t// Create the result which will be a set to guarantee that we don't \n\t\t// have duplicate permutations.\n\t\tSet<List<SortParameter>> result = new HashSet<List<SortParameter>>();\n\t\t\n\t\t// Create the new list without the head item.\n\t\tList<SortParameter> paramsWithoutFirst = new ArrayList<SortParameter>(parameters);\n\t\tSortParameter firstSortParameter = parameters.get(0);\n\t\tparamsWithoutFirst.remove(firstSortParameter);\n\t\t\n\t\t// Create all permutations of the list without the head item, then \n\t\t// iterate over the results.\n\t\tfor(List<SortParameter> currList : getUniqueSets(paramsWithoutFirst)) {\n\t\t\t// We need to insert the current \"first\" sort parameter into every\n\t\t\t// space between all of those created thus far.\n\t\t\tint size = currList.size();\n\t\t\tfor(int i = 0; i <= size; i++) {\n\t\t\t\tList<SortParameter> newList = new ArrayList<SortParameter>(currList);\n\t\t\t\tnewList.add(i, firstSortParameter);\n\t\t\t\tresult.add(newList);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Override\n public Iterator<Set<E>> iterator() {\n return new DisjointSetIterator(theSet);\n }",
"public Enumeration elements();",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Bars> i = BarsList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }",
"@Override\n public List<IExpression> getElements() {\n return elements;\n }",
"public ArrayList<T> getOrderedElements() {\n\t\tArrayList<T> ordered = new ArrayList<T>(itemProbs_.keySet());\n\t\tCollections.sort(ordered, new ProbabilityComparator<T>());\n\n\t\treturn ordered;\n\t}",
"public static List getList() {\r\n return Arrays.asList(ALL);\r\n }",
"public List<List<T>> allCombinationsOfGivenLength(List<T> elements, int length) {\n if (elements.size() < length)\n return new ArrayList<>();\n\n if (length == 1) {\n //the various combinations of 1 letter possible are those combinations which have one of the elements only\n List<List<T>> combinations = new ArrayList<>();\n for (T element : elements) {\n List<T> combination = new ArrayList<>();\n combination.add(element);\n combinations.add(combination);\n }\n return combinations;\n }\n\n List<List<T>> combinations = new ArrayList<>();\n //remove first element\n List<List<T>> allCombinationsTakingThisElement = allCombinationsOfGivenLength(elements.subList(1, elements.size()), length - 1);\n prependElementToAllLists(allCombinationsTakingThisElement, elements.get(0));\n\n List<List<T>> allCombinationsNotTakingThisElement = allCombinationsOfGivenLength(elements.subList(1, elements.size()), length);\n\n combinations.addAll(allCombinationsNotTakingThisElement);\n combinations.addAll(allCombinationsTakingThisElement);\n return combinations;\n }",
"public static List<Element> getElementsPreorder(Element elt) {\n List<Element> res = new ArrayList<>();\n res.add(elt);\n Node nod = elt.getFirstChild();\n while (nod != null) {\n if (nod.getNodeType() == Node.ELEMENT_NODE) {\n res.addAll(getElementsPreorder((Element) nod));\n }\n nod = nod.getNextSibling();\n }\n return res;\n }",
"public ArrayList<String> combineLists(Set<String> hs){\t\n\t\tArrayList<String> newList = new ArrayList<String>(hs);\n\t\tString[] tempString = newList.toArray(new String[newList.size()]);\n\t\tint[] tempInt = new int[tempString.length];\n\t\tfor(int i = 0; i < tempInt.length; i++){\n\t\t\ttempInt[i] = Integer.parseInt(tempString[i]);\n\t\t}\n\t\tArrays.sort(tempInt);\n\t\tnewList.clear();\n\t\tfor(int i = 0; i < tempInt.length; i++){\n\t\t\tnewList.add(String.valueOf(tempInt[i]));\n\t\t}\n\t\treturn newList;\n\t}",
"public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}",
"public Iterator iterator()\n {\n return new HashSetIterator();\n }",
"public List<T> getAll() {\n return Arrays.asList(buffer);\n }",
"private Object[] elements() {\n return elements.toArray();\n }",
"@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }",
"public List<T> inOrder() { //Time Complexity: O(1)\n List<T> list = new ArrayList<>();\n return inOrder(root, list);\n }",
"public Enumeration elements()\n {\n return element.elements();\n }",
"@SuppressWarnings(\"unchecked\")\n public static ImmutableList<Element> getEnclosedElements(Element element) {\n return (ImmutableList<Element>) enclosedBy(element).immutableSortedCopy(element.getEnclosedElements());\n }",
"public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}",
"@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }",
"public abstract Enumeration elements();",
"public List<E> sort()\n {\n ArrayList<E> answer = new ArrayList<>();\n \n while (root != null)\n {\n if(debug)\n System.out.println(\"root = \" + root);\n answer.add(root.value);\n root = root.promote();\n }\n return answer;\n }",
"public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<NoteToken> i = NotesList.iterator(); i.hasNext();){\r\n returnList.add(i.next());\r\n }\r\n return returnList;\r\n }",
"Iterable<CtElement> asIterable();",
"@Override\n public Iterator<E> iterator() {\n return new ElementIterator();\n }",
"public Set<Group> toSet() {\n assert CollectionUtil.elementsAreUnique(internalList);\n return new HashSet<>(internalList);\n }",
"Collection<T> getMinElements();",
"public List<String> permutations(String set) {\n List<String> result = new ArrayList<>();\n if (set == null) {\n return result;\n }\n char[] array = set.toCharArray();\n DFS(array, 0, result);\n return result;\n }",
"public static <T> List<T> of(T... elements) {\n final LinkedList<T> linkedList = new LinkedList<>();\n Arrays.stream(elements).forEach(linkedList::add);\n return linkedList;\n }",
"public Iterator<E> iterator()\r\n {\r\n return listIterator();\r\n }",
"public List<Element> getChildElements() {\n return getChildNodes().stream().filter(n -> n instanceof Element)\n .map(n -> (Element) n).collect(Collectors.toUnmodifiableList());\n }",
"ArrayList<E> getAll();",
"public void addAll(SelectionSet newSet)\n {\n elements.addAll(newSet.elements);\n }",
"public ArrayList<T> getList() {\n synchronized(this) {\n return new ArrayList<T>(_treeSet);\n }\n }",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"<E extends CtElement> List<E> getElements(Filter<E> filter);",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public Iterator getValues() {\n synchronized (values) {\n return Collections.unmodifiableList(new ArrayList(values)).iterator();\n }\n }",
"public Enumeration elements() {\n\t\treturn new ValuesEnumeration(values);\n\t}",
"public UnsortedList<Integer> listOfKeys() {\n\t\tUnsortedList<Integer> list \n\t\t= new UnsortedList<Integer>(new IntegerComparator());\n\t\treturn listOfKeys(list);\n\t}",
"public Iterable<K> inOrder() {\n Queue<K> q = new Queue<>();\n inOrder(root, q);\n return q;\n }",
"public List<T> getSorted() {\r\n return CollectionUtils.sort(this);\r\n }",
"public static List<Color> getColorList(){\n EnumSet<Color> allColor = EnumSet.allOf(Color.class);\n //create a List from the Collection \n return new ArrayList<Color>(allColor);\n //the ArrayList takes a Collection as an argument\n }",
"public ArrayList<Element> listeElementsHorsEspace(final String espace) {\n if (espace == null)\n return(new ArrayList<Element>());\n else\n return(listeTousElements());\n }",
"public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}",
"public static Collection<Triple> toCollection(Iterator<Triple> i) {\n LinkedList<Triple> list= new LinkedList<Triple>();\n while (i.hasNext()) {\n list.add(i.next());\n }\n return list;\n }",
"protected List<WebElement> findListOfElements(By locator) {\n waitForVisibilityOf(locator);\n return driver.findElements(locator);\n }"
]
| [
"0.7042098",
"0.6651097",
"0.6578251",
"0.63272417",
"0.59010005",
"0.5894531",
"0.5881426",
"0.58546656",
"0.58474916",
"0.58311844",
"0.5821164",
"0.5726083",
"0.5724373",
"0.5715643",
"0.5699562",
"0.5699065",
"0.56794566",
"0.5674313",
"0.5626201",
"0.5587761",
"0.5587051",
"0.5559724",
"0.5556961",
"0.55564487",
"0.5525547",
"0.54713386",
"0.54612195",
"0.54546106",
"0.5420171",
"0.54188395",
"0.53941643",
"0.53724736",
"0.5364173",
"0.53307056",
"0.5328961",
"0.5327706",
"0.53134686",
"0.53103286",
"0.53029937",
"0.5296366",
"0.52857065",
"0.52814865",
"0.527237",
"0.52652085",
"0.52609646",
"0.52540934",
"0.5233336",
"0.5226054",
"0.52165025",
"0.5206581",
"0.51721346",
"0.51713085",
"0.5169465",
"0.5163216",
"0.5151191",
"0.51439625",
"0.5141179",
"0.5131808",
"0.5126309",
"0.5121839",
"0.51193964",
"0.5118457",
"0.5116952",
"0.51158303",
"0.5112254",
"0.51074886",
"0.510237",
"0.5097453",
"0.50942224",
"0.5086954",
"0.5086229",
"0.507735",
"0.5073503",
"0.5066627",
"0.5064736",
"0.5064228",
"0.5058213",
"0.50534755",
"0.5051559",
"0.5048801",
"0.50459254",
"0.50432384",
"0.50376135",
"0.5037393",
"0.50370204",
"0.5022028",
"0.50220126",
"0.50170326",
"0.5013271",
"0.50123435",
"0.5010557",
"0.5005084",
"0.49839455",
"0.4969955",
"0.49668616",
"0.49636596",
"0.4958099",
"0.4956836",
"0.495657",
"0.49558175"
]
| 0.61030734 | 4 |
Adds the contents of an iterator to an existing Collection. | public static <T> void addToCollection(Collection<T> collection, Iterator<T> elementsToAdd)
{
while (elementsToAdd.hasNext())
{
T next = elementsToAdd.next();
collection.add(next);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@CanIgnoreReturnValue\n public static <T> boolean addAll(Collection<T> collection, Iterator<? extends T> it) {\n Preconditions.checkNotNull(collection);\n Preconditions.checkNotNull(it);\n boolean z = false;\n while (it.hasNext()) {\n z |= collection.add(it.next());\n }\n return z;\n }",
"public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }",
"public static <T> void addAll(Collection<T> collection, Iterable<T> iterable) {\n\t\tif (iterable == null || collection == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (T value : iterable) {\n\t\t\tcollection.add(value);\n\t\t}\n\t}",
"public static void add(Collection collection) {\n\t\t\n\t}",
"public void addAll(Collection other) {\n\n\t\tclass AddProcessor extends Processor {\n\t\t\tpublic void process(Object value) {\n\t\t\t\tadd(value);\n\t\t\t}\n\t\t}\n\t\tAddProcessor addProcessor = new AddProcessor();\n\n\t\tother.forEach(addProcessor);\n\t}",
"public LoopingIterator(final Collection<? extends E> collection) {\n this.collection = Objects.requireNonNull(collection, \"collection\");\n reset();\n }",
"public boolean addAll(Collection collection) {\n for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) {\n this.add(iterator.next());\n }\n return true;\n }",
"public static <T> boolean addAll(Collection<T> addTo, Iterator<? extends T> iterator){\n Preconditions.checkNotNull(addTo);\n Preconditions.checkNotNull(iterator);\n boolean wasModified = false;\n while(!iterator.hasNext()){\n wasModified |= addTo.add(iterator.next());\n }\n return wasModified;\n }",
"default void addAllTo(Collection<? super E> collection) {\n // Accepting a Collection<? super E> allows us to add elements to\n // any collection that can hold E elements, including Collection<Object>.\n for (E element : this) {\n collection.add(element);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public <T> void asCollection(final Collection<T> destination) {\n for (final Object o : this) {\n destination.add((T) o);\n }\n }",
"@Override\n public boolean addAll(final Collection<? extends T> collection) {\n this.checkCollectionNotNull(collection);\n final Iterator<? extends T> iterator = collection.iterator();\n\n while (iterator.hasNext()) {\n this.add(iterator.next());\n }\n\n return collection.size() != 0;\n }",
"@Override // java.util.Collection, java.util.Set\r\n public boolean addAll(Collection<? extends E> collection) {\r\n b(this.f513d + collection.size());\r\n boolean added = false;\r\n Iterator<? extends E> it = collection.iterator();\r\n while (it.hasNext()) {\r\n added |= add(it.next());\r\n }\r\n return added;\r\n }",
"public boolean addAll(Collection<? extends E> c) {\n\t\tfor(Iterator<? extends E> it = c.iterator(); it.hasNext();)\r\n\t\t\tadd((E)it.next());\r\n\t\treturn !c.isEmpty();\r\n\t}",
"public void addCollection(Collection<E> coll) {\n collectionList.add(coll);\n }",
"boolean addAll(Collection<? extends E> c);",
"public ConcatResourceInputStream(ResourceCollection rc) {\n iter = rc.iterator();\n }",
"public void addAll(Collection toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\taddAll(toAdd.toArray());\r\n\t}",
"public synchronized void addAll(WCollection otherCollection)\n\t{\n\t\tif(otherCollection != null)\n\t\t{\n\t\t\tEnumeration otherCollectionEnum = otherCollection.elements();\n\t\t while(otherCollectionEnum.hasMoreElements())\n\t\t {\n\t\t \tWModelObject object = (WModelObject) otherCollectionEnum.nextElement();\n\t\t \tm_elements.addElement(object);\n\t\t }\n\t\t}\n\t\t\n\t}",
"@Override\n public boolean addAll(Collection<? extends T> c) {\n Object[] newArray = c.toArray();\n int newSize = newArray.length;\n System.arraycopy(newArray, 0, data, size, newSize);\n size += newSize;\n return newSize != 0 ? true : false;\n }",
"@Override\n public boolean addAll(int index, Collection<? extends T> c) {\n Object[] newArray = c.toArray();\n int newSize = newArray.length;\n for (int i = index; i < newSize; i++) {\n add(i, (T) newArray[i]);\n }\n return true;\n }",
"public void addAll(Collection<? extends AudioFile> collection) {\n if (mOriginalValues != null) {\n synchronized (mLock) {\n mOriginalValues.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n } else {\n mObjects.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n }",
"public void addResult(CloseableIteration<T, QueryEvaluationException> res);",
"@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }",
"@Test\n public void testAddAll_int_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }",
"public void setIterator(Iterator iterator) {\n/* 96 */ this.iterator = iterator;\n/* */ }",
"public CollectionFacadeSet(java.util.Collection<java.lang.String> collection) {\n this.collection = collection;\n for (String str : collection) {\n if (contains(str) || str == null) {\n continue;\n }\n add(str);\n }\n }",
"protected abstract Collection createCollection();",
"@Override\r\n\tpublic boolean addAll(int index, Collection<? extends E> c) {\n\t\treturn false;\r\n\t}",
"void addAll(Collection<Book> books);",
"@Override\n public Iterator<T> iterator() {\n return new MyArrayList.MyIterator();\n }",
"@Override\n public boolean addAll(Collection<? extends E> c) {\n boolean result = true;\n for (E current : c) {\n result &= add(current);\n }\n return result;\n }",
"protected static void writeIterator(Output out, Iterator<Object> it) {\n log.trace(\"writeIterator\");\n // Create LinkedList of collection we iterate thru and write it out later\n LinkedList<Object> list = new LinkedList<Object>();\n while (it.hasNext()) {\n list.addLast(it.next());\n }\n // Write out collection\n out.writeArray(list);\n }",
"@Override\n public boolean addAll(final int index,\n final Collection<? extends T> collection) {\n this.checkCollectionNotNull(collection);\n this.checkIndexToAdd(index);\n int collectionSize = collection.size();\n this.increaseSizeIfAny(this.size + collectionSize);\n\n for (int j = this.size - 1; j >= index; j--) {\n this.data[j + collectionSize] = data[j];\n }\n\n final Iterator<? extends T> iterator = collection.iterator();\n int startIndex = index;\n\n while (iterator.hasNext()) {\n this.data[startIndex++] = iterator.next();\n }\n\n this.size += collectionSize;\n return collection.size() != 0;\n }",
"@Override // java.util.Collection\n public final boolean addAll(Collection<? extends C0472aH> collection) {\n throw new UnsupportedOperationException(\"Operation is not supported for read-only collection\");\n }",
"public static final List extend (List sequence, Iterator items) {\r\n while (items.hasNext()) {\r\n sequence.add(items.next());\r\n }\r\n return sequence;\r\n }",
"public static <T extends Collection> T addTo( Collection l, Object ... os ){\n Collections.addAll( l, os );\n return (T) l;\n }",
"public Iterator2Iterador(Iterator<E> iterator) {\r\n\t\tthis.iterator = iterator;\r\n\t}",
"@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }",
"public boolean addAll(int index, Collection<? extends E> c) {\n\t\tfor(Iterator<? extends E> it = c.iterator(); it.hasNext();)\r\n\t\t\tadd(index++,(E)it.next());\r\n\t\treturn !c.isEmpty();\r\n\t}",
"public boolean addAll (Collection<? extends T> collection) {\r\n\t\tboolean result = _list.addAll (collection);\r\n\t\tHeapSet.heapify (this);\r\n\t\treturn result;\r\n\t}",
"@Override\r\n\tpublic boolean addAll(Collection<? extends GIS_layer> c) {\n\t\treturn set.addAll(c);\r\n\t}",
"public void addIndexedCollection(IndexedCollection iColl) throws InvalidArgumentException,\r\n\t\t\tDuplicatedDataNameException\r\n\t{\n\t\taddDataElement(iColl);\r\n\r\n\t}",
"@Override\n\tpublic boolean addAll(Collection<? extends T> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public PeekableIterator(Iterator<Object> iterator) {\n this.iterator = iterator;\n advance();\n }",
"@Override\n\tpublic boolean addAll(Collection<? extends E> c) {\n\t\treturn false;\n\t}",
"public void addAll(MyCollection col) {\n\t\taddAll(size, col);\n\t}",
"protected void handleIterator(IAeXMLDBXQueryResponse aResponse, Collection aCollection)\r\n throws AeXMLDBException\r\n {\r\n while (aResponse.hasNextElement())\r\n {\r\n Element elem = aResponse.nextElement();\r\n aCollection.add(handleElement(elem));\r\n }\r\n }",
"public SimpleDuplicateableIterator(Iterator<E> iterator)\r\n\t{\r\n\t\tthis.currentIndex = 0;\r\n\t\tthis.oldElements = new ArrayList<E>();\r\n\t\tthis.iterator = iterator;\r\n\t}",
"void addToContainer(Container container);",
"public boolean addAll(Collection<? extends E> rhs) {\n\t\t// this is not a low-level or common function, so ok to call add()\n\t\tif (rhs.size() == 0)\n\t\t\treturn false;\n\t\tfor (E x : rhs)\n\t\t\tadd(x);\n\t\treturn true;\n\n\t}",
"@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }",
"@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }",
"public boolean addAll(Collection added)\n {\n boolean ret = super.addAll(added);\n normalize();\n return(ret);\n }",
"public static <T> Iterable<T> newIterable(Iterator<T> items) {\n final Iterator<T> finalItems = items;\n\n return new Iterable<T>() {\n @Override\n public Iterator<T> iterator() {\n return finalItems;\n }\n };\n }",
"public CompositeIterator(Iterator<MenuComponent> iterator) {\n\t\tstack.push(iterator);\n\t}",
"@Override\n public void reset() {\n iterator = collection.iterator();\n }",
"public Iiterator getIterator() { \n\t\treturn new GameCollectionIterator();\n\t}",
"public static Collection<Triple> toCollection(Iterator<Triple> i) {\n LinkedList<Triple> list= new LinkedList<Triple>();\n while (i.hasNext()) {\n list.add(i.next());\n }\n return list;\n }",
"@Override\n public List<FeatureId> addFeatures(\n FeatureCollection<SimpleFeatureType, SimpleFeature> collection) throws IOException {\n TransformFeatureCollectionWrapper transformed = new TransformFeatureCollectionWrapper(collection, invertedTransformer);\n return store.addFeatures(transformed);\n\n // TODO: re-shape feature ids...\n }",
"@Override\n protected boolean hasNextForCollection(Object qc) {\n boolean bRet = super.hasNextForCollection(qc);\n return bRet;\n }",
"public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}",
"public boolean addAll(Iterable<T> c){\r\n\t\t//same addAll from HW2 denseboard\r\n\t\tboolean added = false;\r\n\t\tfor(T thing : c){\r\n\t\t\tadded |= this.add(thing);\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"@Test\n public void testAddAll_int_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }",
"public ImmutableIterator(final Iterator<T> iterator) {\n\t\t_decorated = iterator;\n\t}",
"public void addItemCollection(ItemCollection itemCollection) {\n\t\t// Start of user code for method addItemCollection\n\t\t// End of user code\n\t}",
"@Override\n public Iterator<T> iterator() {\n return items.iterator();\n }",
"@Override\n public Iterator<T> iterator() {\n return new Iterator<T>(){\n private int ci = 0;\n \n /**\n * Checks if ArrayList has next element \n * @return \n */\n public boolean hasNext(){\n return ci < size;\n }\n \n /**\n * Returns next element and moves iterator forward\n * @return \n */\n public T next(){\n return (T)data[ci++];\n }\n \n /**\n * Does nothing\n */\n public void remove(){\n \n }\n };\n }",
"private static Iterator getAllElementsIterator(EventSource session, CollectionType collectionType, Object collection) {\n\t\treturn collectionType.getElementsIterator(collection, session);\n\t}",
"@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }",
"public static void AddToCollection(Collection<? extends Person> c)\r\n\t{\r\n\t\t//c.add(new Person(\"abc\"));\r\n\t\t//c.add(new Worker(\"a\", \"b\"));\r\n\t\t//c.add(new Object());\r\n\t\t//Collection<? extends Object> c1 = new ArrayList<Person>();\r\n\t\t//c1.add(new Object());\r\n\t}",
"public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}",
"public Iterator<Item> iterator() { return new ListIterator(); }",
"Collect getColl();",
"public long add(Collection<String> collection, int amount) {\n List<String> testData = new ArrayList<>();\n for (int i = 0; i < amount; i++) {\n long data = System.currentTimeMillis() + (int) Math.random() * 100 + i;\n String str = String.valueOf(data);\n testData.add(str);\n }\n\n long start = System.currentTimeMillis();\n\n for (int i = 0; i < amount; i++) {\n collection.add(testData.get(i));\n }\n\n long finish = System.currentTimeMillis();\n System.out.println(String.format(\"Collection after adding - %s\", collection.size()));\n return finish - start;\n }",
"@Override\n\tpublic boolean addAll(Collection<? extends Integer> c) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean addAll(Collection<? extends SimpleFeature> collection) {\n\t\tboolean ret = super.addAll(collection);\n\t\tfor (SimpleFeature f : collection) {\n\t\t\taddToIndex(f);\n\t\t}\n\t\treturn ret;\n\t}",
"public interface Container {\n\n Iterator getIterator();\n}",
"public SubspaceWrapper(Iterator<Integer> contents) {\n LinkedList<Integer> list = new LinkedList<>();\n Iterators.addAll(list, contents);\n this.wrapped = list;\n }",
"public boolean addAll(int index, Collection<? extends E> coll)\r\n {\r\n int size = this.size();\r\n ListIterator<E> itr = listIterator(index);\r\n for (E element : coll)\r\n {\r\n itr.add(element);\r\n }\r\n return size != this.size();\r\n }",
"public interface Collection2<T> extends Collection {\n default void forEachId(Consumer<T> action, Predicate<T> filter) {\n Objects.requireNonNull(filter);\n final Iterator<T> each = iterator();\n while (each.hasNext()) {\n T element = each.next();\n if (filter.test(element)) {\n action.accept(element);\n }\n }\n }\n}",
"@Override\n public Iterator<Item> iterator() {\n return new ListIterator();\n }",
"@Override\r\n\tpublic boolean addAll(Collection<? extends SeriesEntry> c)\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}",
"public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }",
"@Nullable\n @SuppressWarnings(\"unchecked\")\n protected Collection createCollection(MappingContext context, Object value) {\n if (value instanceof Iterable<?>) {\n TypeInformation entryType = context.getGenericTypeInfoOrFail(0);\n Collection result = createCollectionMatchingType(context);\n\n int index = 0;\n for (Object entry : (Iterable) value) {\n Object convertedEntry = convertValueForType(context.createChild(\"[\" + index + \"]\", entryType), entry);\n if (convertedEntry == null) {\n context.registerError(\"Cannot convert value at index \" + index);\n } else {\n result.add(convertedEntry);\n }\n }\n return result;\n }\n return null;\n }",
"public Iterator<E> iterator()\n {\n return new MyListIterator();\n }",
"@Override\n public Iterator<E> reverseIterator() {\n return collection.iterator();\n }",
"boolean addAllByteString(Collection<? extends ByteString> c);",
"@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }",
"public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }",
"public Iterator<Item> iterator() { \n return new ListIterator(); \n }",
"@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }",
"protected abstract Set<String> _addToSet(String key, Collection<String> str);",
"@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }",
"public void pushAll(Collection<? extends E> src) {\n //Implementation\n }",
"public Iterator iterator()\n {\n return new HashSetIterator();\n }",
"public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }",
"public Iterator<T> iterator() {\n return new ListIterator<T>(this);\n }",
"public static <T> List<T> toList(Iterator<T> iterator)\n {\n List<T> newList = new ArrayList();\n addToCollection(newList, iterator);\n return newList;\n }",
"public Collection() {\n this.collection = new ArrayList<>();\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }"
]
| [
"0.6482723",
"0.63582844",
"0.59851795",
"0.59407234",
"0.5920235",
"0.59087664",
"0.59077656",
"0.57560617",
"0.5712872",
"0.5654249",
"0.5647245",
"0.56229275",
"0.5462145",
"0.54514503",
"0.5442568",
"0.54326355",
"0.5289733",
"0.5271267",
"0.5258999",
"0.52395064",
"0.5229498",
"0.5222645",
"0.5220678",
"0.52133137",
"0.5200288",
"0.5199842",
"0.51981324",
"0.51909983",
"0.51890004",
"0.5181172",
"0.5173688",
"0.51730394",
"0.5172084",
"0.5165005",
"0.5154532",
"0.51408297",
"0.5122817",
"0.5100291",
"0.5099786",
"0.5091743",
"0.50900906",
"0.50873494",
"0.50778556",
"0.5068863",
"0.506781",
"0.5064573",
"0.5059081",
"0.5055531",
"0.5050911",
"0.50469947",
"0.50446945",
"0.5039101",
"0.50347906",
"0.5015363",
"0.5008578",
"0.49866906",
"0.49697256",
"0.49554032",
"0.49546102",
"0.49355066",
"0.4934272",
"0.4929825",
"0.49262387",
"0.49083742",
"0.4904868",
"0.48979095",
"0.48849434",
"0.48842305",
"0.48834252",
"0.48762557",
"0.48538148",
"0.48510006",
"0.48477447",
"0.48440236",
"0.48422697",
"0.48355097",
"0.48355085",
"0.4811114",
"0.48060316",
"0.48003322",
"0.47851428",
"0.4783947",
"0.47826874",
"0.4780782",
"0.47778347",
"0.47775096",
"0.4771973",
"0.47653478",
"0.47604644",
"0.47582698",
"0.4757439",
"0.47567514",
"0.4754942",
"0.475368",
"0.47490817",
"0.47383842",
"0.47383842",
"0.47371194",
"0.4737039",
"0.47367674"
]
| 0.65618974 | 0 |
Copies the contents of a List to a new, unmodifiable List. If the List is null, an empty List will be returned. This is especially useful for methods which take List parameters. Directly assigning such a List to a member variable can allow external classes to modify internal state. Classes may have different state depending on the size of a List; for example, a button might be disabled if the the List size is zero. If an external object can change the List, the containing class would have no way have knowing a modification occurred. | public static <T> List<T> copyToUnmodifiableList(List<T> list)
{
if (list != null)
{
List<T> listCopy = new ArrayList(list);
return Collections.unmodifiableList(listCopy);
}
else
{
return Collections.emptyList();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> List<T> unmodifiableList(List<T> original) {\n ArrayList<T> list = new ArrayList<>(original.size());\n original.forEach(list::add);\n return Collections.unmodifiableList(list);\n }",
"public static java.util.List unmodifiableList(java.util.List arg0)\n { return null; }",
"public static <T> List<T> immutableList(T... elements){\n return Collections.unmodifiableList(Arrays.asList(elements.clone()));\n }",
"public static <T> List<T> m66049a(List<T> list) {\n return Collections.unmodifiableList(new ArrayList(list));\n }",
"public static void copy(java.util.List arg0, java.util.List arg1)\n { return; }",
"public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n }\n }\n }",
"private ConstList(List<T> list) {\n this.list = list;\n }",
"@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}",
"public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }",
"public Immutable(int field1, MutableField field3, List<String> list) {\n this.field1 = field1;\n this.field3 = field3;\n this.list = Collections.unmodifiableList(list);\n //this.list.add(\"\"); // UnsupportedOperationException\n }",
"public static <T> List<T> clone(List<T> list, PropertyFilter propertyFilter) {\n\t\tList<T> clonedList = new ArrayList<T>(list.size());\n\t\tcloneCollection(list, clonedList, propertyFilter);\n\t\treturn clonedList;\n\t}",
"@Override\r\n public ListADT<T> toMutable() {\r\n return new ListADTImpl<T>(this.head);\r\n }",
"private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }",
"public MemberList(List members)\n/* 10: */ {\n/* 11:10 */ this.members = members;\n/* 12: */ }",
"@Test\r\n public void testImmutableObservableList() {\r\n ObservableList data = createObservableList(true);\r\n ImmutableObservableList immutable = new ImmutableObservableList<>(data);\r\n ListChangeReport report = new ListChangeReport(immutable);\r\n immutable.setBackingList(null);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected single removed\", wasSingleRemoved(report.getLastChange()));\r\n report.clear();\r\n immutable.setBackingList(data);\r\n assertEquals(1, report.getEventCount());\r\n assertTrue(\"expected singe added\", wasSingleAdded(report.getLastChange()));\r\n report.clear();\r\n ObservableList other = FXCollections.observableArrayList(\"onxe\", \"tewo\", \"other\");\r\n immutable.setBackingList(other);\r\n assertEquals(1, report.getEventCount());\r\n// report.prettyPrint();\r\n assertTrue(\"expected single replaced\", wasSingleReplaced(report.getLastChange()));\r\n }",
"public List<E> clone();",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(ArrayList<E> lst) {\n list = (E[])new Object[lst.size()];\n capacity = lst.capacity;\n size = lst.size;\n for(int i = 0; i < size; i++) {\n list[i] = lst.list[i];\n }\n }",
"public ListHolder()\n {\n this.list = new TestList(15, false);\n }",
"@SuppressWarnings(\"unchecked\")\n \tpublic static <T> List<T> createConcurrentList() {\n \t\treturn (List<T>) Collections.synchronizedList(createArrayList());\n \t}",
"public void setList(DOCKSList param) {\r\n localListTracker = param != null;\r\n\r\n this.localList = param;\r\n }",
"@Override\r\n public ListADT<T> toImmutable() {\r\n return new ImmutableListADTImpl<T>(new ListADTImpl<T>(this.head));\r\n }",
"public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }",
"public static java.util.List synchronizedList(java.util.List arg0)\n { return null; }",
"public ListADTImpl(ImmutableListADTImpl<T> listToMakeMutable) {\r\n this.head = new GenericEmptyNode();\r\n for (int i = 0; i < listToMakeMutable.getSize(); i++) {\r\n T value = listToMakeMutable.get(i);\r\n this.head = this.head.addBack(value);\r\n }\r\n }",
"public interface ReadOnlyListManager<T> {\n /**\n * Returns an unmodifiable view of the list.\n * This list will not contain any duplicate elements.\n */\n\n ObservableList<T> getReadOnlyList();\n}",
"public UnmodifiableFloatList(FloatList l) {\r\n super(l);\r\n }",
"public static <T> List<T> getOrCreateList(List<T> list) {\n return list == null ? new ArrayList<>() : list;\n }",
"public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}",
"public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }",
"public static <T, I extends T> List<T> toImmutableList(final List<T> list, final Function<T, I> toImmutable) {\n requireNonNull(list, \"list\");\n requireNonNull(toImmutable, \"toImmutable\");\n return list.isEmpty() ? Collections.emptyList() : Collections.unmodifiableList(list.stream()//\n .map(toImmutable)//\n .collect(Collectors.toList()));\n }",
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"private static <T> List<T> m971u(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"public static <T, U> List<?> copyListOfProperties(List<T> list, U u) {\n\t\tType listType = new TypeToken<List<U>>() {\n\t\t}.getType();\n\t\treturn modelMapper.map(list, listType);\n\t}",
"@SuppressWarnings(\"unchecked\" )\n public ConstList<T> makeConst() {\n if (clist == null)\n clist = (list.isEmpty() ? emptylist : new ConstList<T>(list));\n return clist;\n }",
"ObservableList<T> getReadOnlyList();",
"public interface List<E> {\n\n /**\n * Return number of elements in the list\n * @return Number of elements\n */\n int size();\n\n /**\n * Returns whether the list is empty\n * @return True if the list is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Returns the element at index i\n * @param i Index\n * @return Element at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E get(int i) throws IndexOutOfBoundsException;\n\n /**\n * Replaces the element at index i with e, and returns the replaced element\n * @param i Index\n * @param e New element\n * @return Element replaced by e\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E set(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Inserts element e to be at index i, shifting all subsequent elements later\n * @param i Index\n * @param e New element\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n void add(int i, E e) throws IndexOutOfBoundsException;\n\n /**\n * Removes and returns the element at index i, shifting subsequent elements\n * earlier\n * @param i Index\n * @return Element previously at i\n * @exception IndexOutOfBoundsException If i is not valid, exception\n */\n E remove(int i) throws IndexOutOfBoundsException;\n\n /**\n * Empty the list\n */\n public void clear();\n\n /**\n * Construct a clone (copy) of the object.\n * @return New list object with the same structure. This copy should be\n * shallow, i.e., the individual elements are not cloned.\n */\n public List<E> clone();\n}",
"public abstract void setList(List<T> items);",
"public TempList() {\n list = new ArrayList<T>();\n }",
"public void m(List<?> list) {\n\t}",
"public List<New> list();",
"public interface ListReadOnly<T> {\n /**\n * Returns the number of elements in this list.\n *\n * @return The number of elements in this list.\n */\n\n public int size();\n\n\n /**\n * Returns the element at the specified position in this list.\n *\n * @param index Index of the element to return\n * @return The element at the specified position in this list.\n * @throws IndexOutOfBoundsException If the index is out of range\n * (<code>index < 0 || index >= size()</code>)\n */\n public T get(int index);\n}",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public void setList(java.util.List newAktList) {\n\t\tlist = newAktList;\n\t}",
"public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }",
"private Lists() { }",
"@SuppressWarnings(\"unchecked\" )\n public static <T> ConstList<T> make() {\n return emptylist;\n }",
"public void testCopyList_copyNullList()\n\t{\n\t\t// Arrange\n\t\t// let's add a new list, category, and a few items to the new list\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tassertEquals(2, listId);\n\n\t\t// Act\n\t\tservice.copyList(-13, \"testList2\");\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testList2\");\n\n\t\t// Assert\n\t\tassertNull(newList);\n\t}",
"public static <T> List<T> mirrored(List<T> l) throws IllegalArgumentException {\n if (l.isEmpty()) {\n throw new IllegalArgumentException();\n }\n List<T> mirroredList1 = new ArrayList<T>(l);\n List<T> mirroredList2 = new ArrayList<T>(l);\n Collections.reverse(mirroredList2);\n mirroredList2 = mirroredList2.subList(1, mirroredList2.size());\n mirroredList1.addAll(mirroredList2);\n return mirroredList1;\n }",
"public static <T> List<T> createList (T... args) {\n\tif (args == null) { return new ArrayList<T>(); };\n\treturn new ArrayList<T>(Arrays.asList(args));\n }",
"private static <T> List<T> m450e(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}",
"public Builder clearIsList() {\n bitField0_ = (bitField0_ & ~0x00000008);\n isList_ = false;\n onChanged();\n return this;\n }",
"public Builder clearIsList() {\n bitField0_ = (bitField0_ & ~0x00000004);\n isList_ = false;\n onChanged();\n return this;\n }",
"@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }",
"public static MemberList instance() {\n\t\tif (memberList == null) {\n\t\t\treturn (memberList = new MemberList());\n\t\t} else {\n\t\t\treturn memberList;\n\t\t}\n\t}",
"public static ArrayList<ConfigurableItemStack> copyList(List<ConfigurableItemStack> list) {\n ArrayList<ConfigurableItemStack> copy = new ArrayList<>(list.size());\n for(ConfigurableItemStack stack : list) {\n copy.add(new ConfigurableItemStack(stack));\n }\n return copy;\n }",
"abstract void makeList();",
"public List() {\n\t\tthis.head = null; \n\t}",
"public void setList(DList2 list1){\r\n list = list1;\r\n }",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"void addAll(intList list) throws IllegalAccessException;",
"public void setListSynchronsprecher( List<Person> listSynchronsprecher ) {\n\t\tthis.listSynchronsprecher.clear();\n\t\tthis.listSynchronsprecher.addAll( listSynchronsprecher );\n\t}",
"public List()\n {\n list = new Object [10];\n }",
"public TaskList(List<ListItem> inputList) {\n this.listItems = new ArrayList<ListItem>(inputList);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}",
"@Override\r\n\tpublic void fill(ArrayList<T> list) {\r\n\t\t//Copy of list\r\n\t\tArrayList<T> copyData = list;\r\n\t\t// Add copy of list to the Stack\r\n\t\tfor (T e: copyData) {\r\n\t\t\tdata.add(e);\r\n\t\t}\r\n\t}",
"public void setItems(List<T> items) {\n log.debug(\"set items called\");\n synchronized (listsLock){\n filteredList = new ArrayList<T>(items);\n originalList = null;\n updateFilteringAndSorting();\n }\n }",
"public XSListSimpleType asList() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: idiv \n // 1: laload \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}",
"@Override\n public synchronized WebBackForwardList clone() {\n return new WebBackForwardListImpl(this);\n }",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"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 ModifyCitedPublicationList( ArrayList <CitedPublication> StartedList ){\n \n modifiedList = new ArrayList<Integer>(); \n IndexDeletedItem = new ArrayList<Integer>();\n deletedItem = new ArrayList <CitedPublication>();\n \n KeepItem = StartedList;\n \n }",
"@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}",
"private static void concurrentList(){\n\t\tList<Object> unsafeList = new ArrayList<Object>();\n\t\tList<Object> safeList = Collections.synchronizedList(unsafeList);\n\t\t\n\t\t/*\n\t\t * Note that you must manually synchronize the returned list when iterating over it, for example:\n\t\t */\n\t\tsynchronized (safeList) {\n\t\t Iterator<Object> it = safeList.iterator();\n\t\t while (it.hasNext()) {\n\t\t System.out.println(it.next());\n\t\t }\n\t\t}\n\t}",
"public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }",
"public static <T> List<T> clone(List<T> a) {\n\t\tList<T> newList = new ArrayList<T>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tnewList.add(elt);\n\t\t\n\t\treturn newList;\n\t}",
"private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }",
"@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"public void reUpdateTargetList(CopyOnWriteArrayList<Balloon> newList) {\r\n\t\tballoons = newList;\r\n\t}",
"public void setUserList(CopyOnWriteArrayList<User> userList) {\r\n\t\tBootstrap.userList = userList;\r\n\t}",
"public static <T> Collection<T> copyToUnmodifiableCollection(Collection<T> collection)\n {\n if (collection != null)\n {\n Collection<T> collectionCopy = new ArrayList(collection);\n return Collections.unmodifiableCollection(collectionCopy);\n }\n else\n {\n return Collections.emptyList();\n }\n }",
"@Test\n public void testSetListItems() {\n System.out.println(\"setListItems\");\n List listItems = null;\n DataModel instance = new DataModel();\n instance.setListItems(listItems);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public MultiList<R,S> copy(){\n MultiList<R,S> retVal = new MultiList<R,S>();\n retVal.putAll_forCopy(this);\n return retVal;\n }",
"public static ImmutableIntList of() {\n return EMPTY;\n }",
"public void setUpList(List upList) {\n\t\tthis.upList = upList;\n\t}",
"public final void accept(List<l> list) {\n com.iqoption.core.data.b.c a = this.dlr.dlm;\n kotlin.jvm.internal.h.d(list, \"it\");\n a.setValue(list);\n }",
"private static <T> ImmutableList<T> shuffleImmutableList(List<T> sourceList, Random random) {\n List<T> mutableList = new ArrayList<>(sourceList);\n Collections.shuffle(mutableList, random);\n return ImmutableList.copyOf(mutableList);\n }",
"public void setList(List<ListItem> list) {\n this.items = list;\n\n Log.d(\"ITEMs\",items+\"\");\n }",
"public void testCopyList_copyEmptyList()\n\t{\n\t\t// Arrange\n\t\t// let's add a new list, category, and a few items to the new list\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tassertEquals(2, listId);\n\n\t\t// Act\n\t\tservice.copyList(listId, \"testList2\");\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testList2\");\n\n\t\t// Assert\n\t\tassertNotNull(newList);\n\t\tassertTrue(newList.getCategories().isEmpty());\n\t}",
"abstract protected Object newList( int capacity );",
"public List toList() throws TemplateModelException {\n if (unwrappedList == null) {\n Class listClass = list.getClass();\n List result = null;\n try {\n result = (List) listClass.newInstance();\n } catch (Exception e) {\n throw new TemplateModelException(\"Error instantiating an object of type \" + listClass.getName() + \"\\n\" + e.getMessage());\n }\n BeansWrapper bw = BeansWrapper.getDefaultInstance();\n for (int i=0; i<list.size(); i++) {\n Object elem = list.get(i);\n if (elem instanceof TemplateModel) {\n elem = bw.unwrap((TemplateModel) elem);\n }\n result.add(elem);\n }\n unwrappedList = result;\n }\n return unwrappedList;\n }",
"interface List { // List ADT\npublic void clear(); // Remove all Objects from list\npublic void insert(Object item); // Insert Object at curr position\npublic void append(Object item); // Insert Object at tail of list\npublic Object remove(); // Remove/return current Object\npublic void setFirst(); // Set current to first position\npublic void next(); // Move current to next position\npublic void prev(); // Move current to prev position\npublic int length(); // Return current length of list\npublic void setPos(int pos); // Set current to specified pos\npublic void setValue(Object val); // Set current Object's value\npublic Object currValue(); // Return value of current Object\npublic boolean isEmpty(); // Return true if list is empty\npublic boolean isInList(); // True if current is within list\npublic void print(); // Print all of list's elements\n}",
"public void populateList() {\n }",
"@Override\n\tpublic SecuredRDFList copy();",
"public static <T> List<T> list(T... items)\r\n\t{\r\n\t\treturn new ArrayList<T>(Arrays.asList(items));\r\n\t}",
"private static void containerListNotSafe() {\n List<String> list = new CopyOnWriteArrayList<>();\n // 开启了20个线程\n for (int i = 1; i <= 30; i++) {\n new Thread(() -> {\n list.add(UUID.randomUUID().toString().substring(0,8));\n System.out.println(Thread.currentThread().getName()+list);\n }, String.valueOf(i)).start();\n }\n\n // java.util.ConcurrentModificationException 并发修改异常\n //1.故障现象\n //\tjava.util.ConcurrentModificationException 并发修改异常\n //2.导致原因\n //\n //3.解决方案\n //\t3.1 new Vector<>();\n //\t3.2 Collections.synchronizedList(new ArrayList<>());\n //\t3.3 new CopyOnWriteArrayList<>();\n //4.优化方案\n //\n\n // 写时复制\n // CopyOnWrite,容器即写时复制的容器.往一个容器添加元素的时候,不直接往当前容器Object[]添加,而是先将当前容器Object[]进行copy,复制出\n // 一个新的容器,Object[] newElements,然后新的容器Object[] newElements里面添加元素,添加完元素之后,\n // 再将原容器的引用指向新的容器 setArray(newElements);这样做的好处是可以对CopyOnWrite容器进行并发的读,而不需要加锁,\n // 因为当前容器不会添加任何元素.所以CopyOnWrite容器也是一种读写分离的思想,\n\n // /**\n // * Appends the specified element to the end of this list.\n // *\n // * @param e element to be appended to this list\n // * @return {@code true} (as specified by {@link Collection#add})\n // */\n // public boolean add(E e) {\n // final ReentrantLock lock = this.lock;\n // lock.lock();\n // try {\n // Object[] elements = getArray();\n // int len = elements.length;\n // Object[] newElements = Arrays.copyOf(elements, len + 1);\n // newElements[len] = e;\n // setArray(newElements);\n // return true;\n // } finally {\n // lock.unlock();\n // }\n // }\n\n\n }",
"public void setCurrentListToBeUndoneList();",
"public TempList(Collection< ? extends T> all) {\n list = new ArrayList<T>(all);\n }"
]
| [
"0.7099561",
"0.7083281",
"0.6890263",
"0.679757",
"0.65768874",
"0.65739113",
"0.65033495",
"0.6486175",
"0.6467644",
"0.633608",
"0.61943763",
"0.6168564",
"0.6164404",
"0.6143026",
"0.6127561",
"0.611831",
"0.6116043",
"0.6101336",
"0.60718715",
"0.6022269",
"0.599665",
"0.5977098",
"0.596717",
"0.592388",
"0.59222883",
"0.5913427",
"0.59114563",
"0.58826154",
"0.5869536",
"0.58532006",
"0.58426636",
"0.5774885",
"0.5772406",
"0.576731",
"0.5760213",
"0.57421875",
"0.5740419",
"0.5706509",
"0.5706467",
"0.56958324",
"0.5655711",
"0.56443626",
"0.56413966",
"0.5598273",
"0.5593737",
"0.55862707",
"0.55657643",
"0.55589384",
"0.55396056",
"0.5530914",
"0.55226207",
"0.55193216",
"0.550997",
"0.55067223",
"0.55049896",
"0.5482172",
"0.54807895",
"0.54807216",
"0.5474913",
"0.54748356",
"0.54736614",
"0.54654366",
"0.5460972",
"0.5456162",
"0.5449793",
"0.54359907",
"0.543557",
"0.5421497",
"0.54113775",
"0.5411201",
"0.54101735",
"0.54078364",
"0.53976285",
"0.5397225",
"0.5396762",
"0.53875417",
"0.53666365",
"0.5366045",
"0.53625286",
"0.53611714",
"0.53605926",
"0.5356492",
"0.53546464",
"0.53544897",
"0.5351162",
"0.53473777",
"0.5328103",
"0.5322485",
"0.532245",
"0.5320712",
"0.53125334",
"0.5306186",
"0.52968925",
"0.52925426",
"0.5289928",
"0.52840894",
"0.5281708",
"0.52806586",
"0.52757853",
"0.5275646"
]
| 0.7813309 | 0 |
Copies the contents of a Collection to a new, unmodifiable Collection. If the Collection is null, an empty Collection will be returned. This is especially useful for methods which take Collection parameters. Directly assigning such a Collection to a member variable can allow external classes to modify internal state. Classes may have different state depending on the size of a Collection; for example, a button might be disabled if the the Collection size is zero. If an external object can change the Collection, the containing class would have no way have knowing a modification occurred. | public static <T> Collection<T> copyToUnmodifiableCollection(Collection<T> collection)
{
if (collection != null)
{
Collection<T> collectionCopy = new ArrayList(collection);
return Collections.unmodifiableCollection(collectionCopy);
}
else
{
return Collections.emptyList();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static java.util.Collection unmodifiableCollection(java.util.Collection arg0)\n { return null; }",
"public Collection() {\n this.collection = new ArrayList<>();\n }",
"public static java.util.Collection synchronizedCollection(java.util.Collection arg0)\n { return null; }",
"public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"public static <E, C extends Collection<E>> SynchronizedMutableCollection<E> of(C collection)\n {\n return new SynchronizedMutableCollection<E>(CollectionAdapter.adapt(collection));\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Collection<T> compatibleWith(Collection<T> collection) {\n \ttry {\n \t\treturn (Collection<T>)collection.getClass().newInstance();\n \t} \n \tcatch (InstantiationException exception) {}\n \tcatch (IllegalAccessException exception) {}\n \treturn new ArrayList<T>();\n }",
"protected abstract Collection createCollection();",
"public static <T> Set<T> convertCollectionToSet(Collection<T> collection) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(collection == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new HashSet<T>(collection);\r\n\t}",
"public static void add(Collection collection) {\n\t\t\n\t}",
"private void clearCollection() {\n \n collection_ = getDefaultInstance().getCollection();\n }",
"Collect getColl();",
"public static void AddToCollection(Collection<? extends Person> c)\r\n\t{\r\n\t\t//c.add(new Person(\"abc\"));\r\n\t\t//c.add(new Worker(\"a\", \"b\"));\r\n\t\t//c.add(new Object());\r\n\t\t//Collection<? extends Object> c1 = new ArrayList<Person>();\r\n\t\t//c1.add(new Object());\r\n\t}",
"public static <T> ConstList<T> make(Iterable<T> collection) {\n if (collection == null)\n return make();\n if (collection instanceof ConstList)\n return (ConstList<T>) collection;\n if (collection instanceof Collection) {\n Collection<T> col = (Collection<T>) collection;\n if (col.isEmpty())\n return make();\n else\n return new ConstList<T>(new ArrayList<T>(col));\n }\n ArrayList<T> ans = null;\n for (T x : collection) {\n if (ans == null)\n ans = new ArrayList<T>();\n ans.add(x);\n }\n if (ans == null)\n return make();\n else\n return new ConstList<T>(ans);\n }",
"public Collection getCollection() {\n return mCollection;\n }",
"public GameCollection() {\n\t\tcollection = new Vector();\n\t}",
"public SmartList(Collection<? extends E> collection) {\n size = collection.size();\n\n if (collection.size() == 0) {\n storage = null;\n } else if (collection.size() == 1) {\n storage = collection.toArray()[0];\n } else if (collection.size() <= 5) {\n storage = collection.toArray();\n } else {\n storage = new ArrayList<>(collection);\n }\n }",
"public NodeListImpl(final Collection<Node> collection) {\n super();\n nodeList = new ArrayList<>(collection);\n }",
"public CollectionFacadeSet(java.util.Collection<java.lang.String> collection) {\n this.collection = collection;\n for (String str : collection) {\n if (contains(str) || str == null) {\n continue;\n }\n add(str);\n }\n }",
"public Collection<T> getItems() {\r\n return Collections.unmodifiableCollection(items);\r\n }",
"public Collection() {\n }",
"public void mo83566a(Collection<File> collection) {\n this.f60298e.lock();\n if (collection != null) {\n try {\n this.f60299f.removeAll(collection);\n } catch (Throwable th) {\n this.f60298e.unlock();\n throw th;\n }\n }\n this.f60298e.unlock();\n }",
"public void clear() {collection.clear();}",
"public void setCollection(ArrayList<Fonds> collection){\r\n this.collection = collection;\r\n }",
"@Test\n public void initializeFromAnotherCollectionWhenCreating() {\n List<Integer> lst1 = new ArrayList<>(List.of(3, 1, 2));\n assertThat(lst1).hasSize(3);\n\n // create and initialize an ArrayList from Arrays.asList\n List<Integer> lst2 = new ArrayList<>(Arrays.asList(3, 1, 2));\n assertThat(lst2).hasSize(3);\n\n // create and initialize an ArrayList from Java 9+ Set.of\n List<Integer> lst3 = new ArrayList<>(Set.of(5, 4, 6));\n assertThat(lst3).hasSize(3);\n\n // create and initialize from an existing collection\n List<Integer> lst4 = new ArrayList<>(lst3);\n assertThat(lst4).hasSize(3);\n }",
"default void addAllTo(Collection<? super E> collection) {\n // Accepting a Collection<? super E> allows us to add elements to\n // any collection that can hold E elements, including Collection<Object>.\n for (E element : this) {\n collection.add(element);\n }\n }",
"@Override\n public Collection<SonarQubeIssueModel> convert(final Collection<InspectCodeIssueModel> issueCollection) {\n if (issueCollection == null || issueCollection.isEmpty()) {\n return java.util.Collections.emptySet();\n }\n\n // Convert the entire collection in parallel using the Java Stream API and return the converted collection\n return issueCollection.parallelStream()\n .map(this::convert)\n .collect(Collectors.toSet());\n }",
"public static <E, C extends Collection<E>> SynchronizedMutableCollection<E> of(C collection, Object lock)\n {\n return new SynchronizedMutableCollection<E>(CollectionAdapter.adapt(collection), lock);\n }",
"private void checkCollection(SnmpCollection collection) {\n if (collection.getSystems() == null)\n collection.setSystems(new Systems());\n if (collection.getGroups() == null)\n collection.setGroups(new Groups());\n }",
"public interface CollectionView<E> extends Iterable<E>, Serializable {\n\n// /**\n// * Creates an empty unmodifiable collection.\n// *\n// * @param <E> the type of elements in the collection\n// * @return the unmodifiable collection\n// */\n// static <E> CollectionView<E> of() {\n// return ListView.of();\n// }\n//\n// /**\n// * Creates a singleton unmodifiable collection.\n// *\n// * @param element the element in the collection\n// * @param <E> the type of elements in the collection\n// * @return the unmodifiable collection\n// */\n// static <E> CollectionView<E> of(E element) {\n// return ListView.of(element);\n// }\n//\n// /**\n// * Creates an unmodifiable collection from the specified array.\n// *\n// * Changes to the input array are reflected in this collection.\n// *\n// * @param elements the elements in the collection\n// * @param <E> the type of elements in the collection\n// * @return the unmodifiable collection\n// */\n// @SafeVarargs static <E> CollectionView<E> of(E... elements) {\n// return ListView.of(elements);\n// }\n//\n// /**\n// * Creates an unmodifiable collection by wrapping the specified iterable.\n// *\n// * Changes to the input iterable are reflected in this collection.\n// *\n// * @param elements the elements to wrap\n// * @param <E> the type of elements in the collection\n// * @return the unmodifiable collection\n// */\n// static <E> CollectionView<E> from(Iterable<? extends E> elements) {\n// if (elements instanceof CollectionView<?>) {\n// // When the collection is an unmodifiable collection (and implements CollectionView) we can just return it.\n// //noinspection unchecked\n// return (CollectionView<E>)elements;\n// } else if (elements instanceof Collection<?>) {\n// // When the iterable is a collection, we call the other overload.\n// //noinspection unchecked\n// return from((Collection<E>)elements);\n// } else {\n// // Otherwise, we wrap the iterable in an unmodifiable list.\n// return ListView.from(elements);\n// }\n// }\n//\n// /**\n// * Creates an unmodifiable collection wrapping the specified collection.\n// *\n// * Changes to the input collection are reflected in this collection.\n// *\n// * @param collection the collection to wrap\n// * @param <E> the type of elements in the collection\n// * @return the unmodifiable collection\n// */\n// static <E> CollectionView<E> from(Collection<? extends E> collection) {\n// if (collection instanceof CollectionView<?>) {\n// // When the collection is an unmodifiable collection (and implements CollectionView) we can just return it.\n// //noinspection unchecked\n// return (CollectionView<E>)collection;\n// } else if (collection instanceof List<?>) {\n// // When the collection is a list, we wrap it in a ListView.\n// //noinspection unchecked\n// return ListView.from((List<E>)collection);\n// } else if (collection instanceof Set<?>) {\n// // When the collection is a set, we wrap it in a SetView.\n// //noinspection unchecked\n// return SetView.from((Set<E>)collection);\n// } else {\n// // Otherwise, we wrap the collection in an unmodifiable collection.\n// return new CollectionWrappingView<>(collection);\n// }\n// }\n\n /**\n * Gets the size of the collection.\n *\n * @return the size of the collection\n */\n int size();\n\n /**\n * Gets whether the collection is empty.\n *\n * @return {@code true} when the collection is empty; otherwise, {@code false}\n */\n default boolean isEmpty() {\n return size() == 0;\n }\n\n /**\n * Gets the equality comparator used to compare the objects in this collection.\n *\n * @return the equality comparator\n */\n default EqualityComparator<? super E> getComparator() {\n // Most implementations do not support custom equality comparators,\n // and just use the equals() and hashCode() implementations of the objects by default.\n return EqualityComparator.getDefault();\n }\n\n /**\n * Determines whether the collection contains the specified element.\n *\n * @param element the element to check\n * @return {@code true} when the collection contains the specified element;\n * otherwise, {@code false}\n */\n // Accepting Object instead of E is consistent with the Collection<?> interface.\n // It also allows comparison to an object whose static type is not known.\n // Additionally, it allows this interface to be covariant in E, as it has no methods\n // with a parameter of type E. Finally, this method will just return false when the\n // given object is of the wrong type, because then it clearly is not in the collection.\n boolean contains(Object element);\n\n /**\n * Determines whether the collection contains all the specified elements.\n *\n * @param elements the elements to check\n * @return {@code true} when the collection contains all the specified elements;\n * otherwise, {@code false}\n */\n default boolean containsAll(Collection<?> elements) {\n // Accepting Collection<?> instead of Collection<E> or Collection<? extends E>\n // is consistent with the Collection<?> interface and the contains(Object) method.\n for (Object element : elements) {\n if (!contains(element)) return false;\n }\n return true;\n }\n\n /**\n * Adds all elements from this collection to the specified collection.\n *\n * @param collection the collection to add all elements to\n */\n default void addAllTo(Collection<? super E> collection) {\n // Accepting a Collection<? super E> allows us to add elements to\n // any collection that can hold E elements, including Collection<Object>.\n for (E element : this) {\n collection.add(element);\n }\n }\n\n /**\n * Creates a serial stream from this collection.\n *\n * @return the created stream\n */\n default Stream<E> stream() {\n return StreamSupport.stream(this.spliterator(), false);\n }\n\n /**\n * Creates a parallel stream from this collection.\n *\n * @return the created stream\n */\n default Stream<E> parallelStream() {\n return StreamSupport.stream(spliterator(), true);\n }\n\n /**\n * Returns this collection as an unmodificable object implementing {@link Collection}.\n *\n * @return the unmmodifiable collection\n */\n Collection<E> asUnmodifiable();\n\n /**\n * Copies all elements from this collection to a new array.\n *\n * @return the new array with all the elements\n */\n default Object[] toArray() {\n return toArray(new Object[0]);\n }\n\n /**\n * Copies all elements from this collection to a new array.\n *\n * @param a an array indicating the type of elements in the array\n * @param <T> the type of elements in the array\n * @return the new array with all the elements\n */\n default <T> T[] toArray(T[] a) {\n int size = size();\n\n // It is more efficient to call this method with an empty array of the correct type.\n // See also: https://stackoverflow.com/a/29444594/146622 and https://shipilev.net/blog/2016/arrays-wisdom-ancients/\n @SuppressWarnings(\"unchecked\")\n T[] array = a.length != size ? (T[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), size) : a;\n\n // This implementation allocates the iterator object,\n // since collections, in general, do not have random access.\n\n Iterator<E> iterator = this.iterator();\n int i = 0;\n // Copy all the elements from the iterator to the array we allocated\n while (iterator.hasNext() && i < size) {\n @SuppressWarnings(\"unchecked\")\n T element = (T)iterator.next();\n array[i] = element;\n i += 1;\n }\n if (i < size) {\n // Somehow we got less elements from the iterator than expected.\n // Null-terminate the array (seems to be good practice).\n array[i] = null;\n // Copy the interesting part of the array and return it.\n return Arrays.copyOf(array, i);\n }\n else if (iterator.hasNext()) {\n // Somehow there are more elements in the iterator than expected.\n // We'll use an ArrayList for the rest.\n List<T> list = Arrays.asList(array);\n while (iterator.hasNext()) {\n @SuppressWarnings(\"unchecked\")\n T element = (T)iterator.next();\n list.add(element);\n }\n // Here we know the array was too small, so it doesn't matter what we pass.\n return list.toArray(a);\n } else {\n // Happy path: the array's size was just right to get all the elements from the iterator.\n return array;\n }\n }\n\n}",
"public static <T> Set<T> toSet(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return new HashSet<T>(0);\n } else {\n return new HashSet<T>(collection);\n }\n }",
"public static <T> List<T> convertCollectionToList(Collection<T> collection) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(collection == null) return null;\r\n\t\t\r\n\t\t// On retourne la Liste\r\n\t\treturn new ArrayList<T>(collection);\r\n\t}",
"private List<Object> serializeActualCollectionMembers(AbstractPersistentCollection collection)\r\n\t{\r\n\t\tList<Object> result = new ArrayList<Object>();\r\n\t\tif (!collection.wasInitialized())\r\n\t\t{\r\n\t\t\tcollection.forceInitialization();\r\n\t\t}\r\n\t\tIterator<Object> itr = collection.entries(null);\r\n\t\twhile (itr.hasNext())\r\n\t\t{\r\n\t\t\tObject next = itr.next();\r\n\t\t\tObject newObj = serialize(next);\r\n\t\t\tresult.add(newObj);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"boolean removeAll(Collection<?> c);",
"private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tSet<Object> exploredEntities = new HashSet<Object>();\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, exploredEntities));\n\t\t}\n\t}",
"@Override\n public boolean retainAll(final Collection<?> collection) {\n return this.removeCollection(collection, false);\n }",
"public static <T> List<T> toList(final Collection<T> collection) {\n\n if (isEmpty(collection)) {\n return new ArrayList<T>(0);\n } else {\n return new ArrayList<T>(collection);\n }\n }",
"@Override\n\tpublic boolean retainAll(Collection<?> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public static <T> Set<T> set(Collection<T> collection) {\n if (collection == null) return new HashSet<>();\n return collection.stream().filter(Objects::nonNull).collect(Collectors.toSet());\n }",
"@Override // java.util.Collection\n public final boolean addAll(Collection<? extends C0472aH> collection) {\n throw new UnsupportedOperationException(\"Operation is not supported for read-only collection\");\n }",
"public com.google.protobuf.ByteString\n getCollectionBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(collection_);\n }",
"public static <T extends Collection> T addTo( Collection l, Object ... os ){\n Collections.addAll( l, os );\n return (T) l;\n }",
"public boolean retainAll(Collection<?> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public static <T> List<T> adaptCollection(Collection<?> collection, Class<T> klass)\n {\n List<T> r = new ArrayList<T>();\n \n for(Object o : collection)\n {\n T t = adapt(o, klass);\n if(t != null)\n {\n r.add(t);\n }\n }\n \n return r;\n }",
"@Immutable\npublic interface ImmutableCollection<E> extends Collection<E> {\n \n}",
"public CollectionDataStore(FeatureCollection<SimpleFeatureType,SimpleFeature> collection) {\n this.collection = collection;\n if (collection.size() == 0) {\n this.featureType = FeatureTypes.EMPTY;\n } else {\n this.featureType = collection.getSchema();\n }\n }",
"@Override\n public boolean removeAll(Collection<?> collection) {\n for (Object o : collection) {\n onAccess.accept(o);\n }\n return delegate.removeAll(collection);\n }",
"public void supprimerCollection(){\r\n collection.clear();\r\n }",
"public static <T> Collection<T> requireNonEmpty(Collection<T> col) {\n if (col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }",
"public TempList(Collection< ? extends T> all) {\n list = new ArrayList<T>(all);\n }",
"interface MyCollection{\n\n boolean\tadd(Object o); // Ensures that this collection contains the specified element (optional operation).\n void\tclear(); // Removes all of the elements from this collection (optional operation).\n boolean\tcontains(Object o); // Returns true if this collection contains the specified element.\n boolean\tequals(Object o); // Compares the specified object with this collection for equality.\n boolean\tremove(Object o); // Removes a single instance of the specified element from this collection, if it is present (optional operation).\n boolean\tisEmpty(); // Returns true if this collection contains no elements.\n int\tsize(); // Returns the number of elements in this collection.\n //Object[] toArray(); // Returns an array containing all of the elements in this collection.\n\n/*\n boolean\tcontainsAll(Collection<?> c); Returns true if this collection contains all of the elements in the specified collection.\n int\thashCode(); Returns the hash code value for this collection.\n Iterator<E>\titerator(); Returns an iterator over the elements in this collection.\n boolean\tremoveAll(Collection<?> c); Removes all of this collection's elements that are also contained in the specified collection (optional operation).\n boolean\tretainAll(Collection<?> c); Retains only the elements in this collection that are contained in the specified collection (optional operation).\n <T> T[]\ttoArray(T[] a); Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array.\n*/\n\n\n\n\n}",
"static Object[] m59445a(Collection<?> collection) {\n return m59444a((Iterable<?>) collection, new Object[collection.size()]);\n }",
"@Override\n public PermissionCollection newPermissionCollection() {\n\t/* bug 4158302 fix */\n\treturn new Collection();\n }",
"public boolean removeAll(Collection<? extends E> collection) {\n clear();\n // This is fucking dodgy lol.\n return true;\n }",
"private List<ConnectionSetup> createDetachedSnapshotOfCollection() {\n return Collections.unmodifiableList(new ArrayList<ConnectionSetup>(setups));\n }",
"@Override\r\n\tpublic boolean removeAll(Collection<?> c)\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}",
"protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }",
"public static void main(String[] args) {\n Collection collection= new ArrayList();\n collection.add(1500);\n collection.add(true);\n collection.add(12.32);\n collection.add(\"s\");\n collection.add('f');\n //System.out.println(collection);\n\n //Collection add(item) bunda item qo'sha olsa true aksi bo'lsa false qataradi\n System.out.println(collection.add(2200)); // bunda console da true bo'ladi 2200 qo'sha olgani uchun\n\n /* Collection ni addAll metothdi bu bizga collection methodiga narsalarni collection1 b-n\n ketma ketlikda qo'shish imkonini beradi*/\n\n Collection collection1=new ArrayList();\n collection1.addAll(collection);\n collection1.add(\"otherNumber1\");\n collection1.add(\"otherNumber2\");\n collection1.add(\"otherNumber3\");\n System.out.println(collection1);\n\n // boolean remove(object item) bu ko'rsatilgan obyektni collectionda o'chiradi listlarda index bilan bajariladi\n collection1.remove(12.32);\n System.out.println(collection1);\n\n // boolean removeAll(Collection<?> col)\n collection1.removeAll(collection);\n System.out.println(collection1);\n\n\n\n\n\n }",
"public static <T> Collection<T> requireNullOrNonEmpty(Collection<T> col) {\n if (col != null && col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }",
"@Override\n\tpublic boolean removeAll(Collection<?> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"void setLibroCollection1(Collection<Libro> libroCollection1);",
"public MethodCollector(Collection<Method> collection)\n {\n this.collection = collection;\n }",
"@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }",
"public Builder clearCollection() {\n copyOnWrite();\n instance.clearCollection();\n return this;\n }",
"private static <T> T identity(Collection<T> collection) {\n return identity(collection.iterator());\n }",
"public boolean removeAll(Collection<?> arg0) {\n\t\treturn false;\n\t}",
"@Override\n public boolean removeAll(final Collection<?> collection) {\n return this.removeCollection(collection, true);\n }",
"private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"public static <T, V> Set<V> set(Collection<T> collection, Function<T, V> mapping) {\n if (mapping == null) throw new IllegalArgumentException(\"Mapping function not set!\");\n if (collection == null) return set();\n return collection.stream()\n .filter(Objects::nonNull)\n .map(mapping)\n .filter(Objects::nonNull)\n .collect(Collectors.toSet());\n }",
"public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }",
"public Collection<T> mo29734a() {\n return new ArrayList();\n }",
"public void setTodo(java.util.Collection aTodo);",
"private void setCollection(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n collection_ = value;\n }",
"@Override\n\tpublic boolean addAll(Collection<? extends T> c) {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"@Override\r\n\tpublic boolean retainAll(Collection<?> c) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean retainAll(Collection<?> c) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean retainAll(Collection<?> c)\r\n\t{\n\t\tthrow new UnsupportedOperationException(\"Series collection doesn't support this operation.\");\r\n\t}",
"public <T> Collection<T> initialize(Collection<T> entities);",
"public void addAll(Collection toAdd) {\r\n\t\tAssert.isNotNull(toAdd);\r\n\t\taddAll(toAdd.toArray());\r\n\t}",
"public synchronized void resetCollections() {\n collections = null;\n }",
"public void addAll(Collection<? extends AudioFile> collection) {\n if (mOriginalValues != null) {\n synchronized (mLock) {\n mOriginalValues.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n } else {\n mObjects.addAll(collection);\n if (mNotifyOnChange) notifyDataSetChanged();\n }\n }",
"@Override\n\tpublic boolean retainAll(Collection<?> c) {\n\t\treturn false;\n\t}",
"private NotesCollection getCollection() {\n\t\t\n\t\tif (collection == null || collection.isRecycled() ) {\n\t\t\tNotesDatabase db = new NotesDatabase(ExtLibUtil.getCurrentSession(), \"\", fakenamesPath);\n\t\t\tcollection = db.openCollectionByName(\"contacts\");\n\t\t}\n\n\t\treturn collection;\n\t}",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"public boolean retainAll (Collection<?> collection) {\r\n\t\tboolean result = _list.retainAll (collection);\r\n\t\tHeapSet.heapify (this);\r\n\t\treturn result;\r\n\t}",
"@Override\r\n\tpublic boolean removeAll(Collection<?> c) {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean removeAll(Collection<?> c) {\n\t\treturn false;\r\n\t}",
"public void setCollectionInfo(CollectionInfo collectionInfo) {\n/* 1105 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Builder members(Supplier<? extends Collection> collection) {\n return members(collection.get());\n }",
"public void triCollection(){\r\n Collections.sort(collection);\r\n }",
"@Override\n\t\tpublic boolean retainAll(Collection<?> c) {\n\t\t\treturn false;\n\t\t}",
"protected Object undoCollection(Object potentialCollection, Object otherObject) {\n if ((otherObject != null) && (potentialCollection instanceof Collection) &&\n !(otherObject instanceof Collection)) {\n if ((((Collection<?>) potentialCollection).size() == 1) && ((Collection) potentialCollection).iterator()\n .next().getClass().equals(otherObject.getClass())) {\n potentialCollection = ((Collection) potentialCollection).iterator().next();\n }\n }\n return potentialCollection;\n }",
"public synchronized void addAll(WCollection otherCollection)\n\t{\n\t\tif(otherCollection != null)\n\t\t{\n\t\t\tEnumeration otherCollectionEnum = otherCollection.elements();\n\t\t while(otherCollectionEnum.hasMoreElements())\n\t\t {\n\t\t \tWModelObject object = (WModelObject) otherCollectionEnum.nextElement();\n\t\t \tm_elements.addElement(object);\n\t\t }\n\t\t}\n\t\t\n\t}",
"private void updateCollection(Resource subject, Property property,\r\n\t\t\tCollection<?> c) {\r\n\t\tif (supportsDelete(c))\r\n\t\t\tsubject.removeAll(property);\r\n\t\tAddSaver saver = new AddSaver(subject, property);\r\n\t\tfor (Object o : c)\r\n\t\t\tif (isPrimitive(o))\r\n\t\t\t\tsaver.write(o); // leaf\r\n\t\t\telse\r\n\t\t\t\tsubject.addProperty(property, _write(o, true)); // recursive\r\n\t}",
"@Override\n\tpublic List<Object> getCollection() {\n\t\treturn null;\n\t}",
"public RandomFromCollectionGenerator(@Nonnull Collection<T> items) {\n this.items = ImmutableList.copyOf(checkNotNull(items, \"Collection for generation can't be null\"));\n exclusiveIndex = this.items.size();\n }",
"public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}",
"private CollectionType() {}",
"public void addCollection(Collection<E> coll) {\n collectionList.add(coll);\n }",
"PropertyArray(Collection<?> collection) {\n if (collection == null) {\n this.myArrayList = new ArrayList<>();\n } else {\n this.myArrayList = new ArrayList<>(collection.size());\n for (Object o : collection) {\n this.myArrayList.add(PropertyObject.wrap(o));\n }\n }\n }"
]
| [
"0.7087516",
"0.65174484",
"0.6500942",
"0.6490624",
"0.64628243",
"0.64505535",
"0.6397691",
"0.6128131",
"0.59260094",
"0.5896016",
"0.58171237",
"0.57875365",
"0.5771589",
"0.5752326",
"0.5721814",
"0.57177377",
"0.56132257",
"0.5599796",
"0.55916256",
"0.55769926",
"0.5572112",
"0.5566731",
"0.5560368",
"0.55516404",
"0.55511177",
"0.5518175",
"0.5516216",
"0.54912317",
"0.5475964",
"0.54754084",
"0.5471553",
"0.54638755",
"0.5442227",
"0.5437189",
"0.5429489",
"0.54241973",
"0.5409733",
"0.53884774",
"0.5382441",
"0.535737",
"0.53509",
"0.5350745",
"0.5344991",
"0.5338379",
"0.53369296",
"0.53327066",
"0.5329042",
"0.53266466",
"0.5318381",
"0.5309046",
"0.53031933",
"0.52956533",
"0.5292434",
"0.52823263",
"0.527058",
"0.52573967",
"0.5256477",
"0.52380365",
"0.52314836",
"0.5227497",
"0.52170026",
"0.521372",
"0.52087027",
"0.520293",
"0.5200037",
"0.51951593",
"0.5190309",
"0.5189376",
"0.5180197",
"0.5177218",
"0.5171186",
"0.51656264",
"0.51637876",
"0.516158",
"0.51570576",
"0.51570576",
"0.5148765",
"0.5143964",
"0.5131602",
"0.5125952",
"0.5116409",
"0.51101464",
"0.5109319",
"0.51092345",
"0.51091105",
"0.5104653",
"0.5104653",
"0.50933015",
"0.50848967",
"0.50789976",
"0.50787425",
"0.5076531",
"0.5076419",
"0.5075988",
"0.5075566",
"0.5072266",
"0.50617814",
"0.50603265",
"0.5055565",
"0.50521916"
]
| 0.76607674 | 0 |
Open a new handle to the database. The caller is responsible for closing the returned handle. | public SQLiteDatabase openDatabase() {
synchronized (mLock) {
Log.d("Opening database.");
File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);
//Check if database exists and if not copy from assests folder
if (!path.exists()) {
try {
mOpenHelper = new DatabaseOpenHelper(mContext);
mOpenHelper.getWritableDatabase();
copyDataBase();
}
catch (IOException e) {
Log.e("Could not copy dictionary.", e);
}
}
if (mOpenHelper == null) {
mOpenHelper = new DatabaseOpenHelper(mContext);
}
return mOpenHelper.getWritableDatabase();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DBHandler open() throws SQLException\r\n {\r\n DBHelper = new DBHelper(context);\r\n DB = DBHelper.getWritableDatabase();\r\n return this;\r\n }",
"public DBinterface open() throws SQLException {\r\n db = helper.getWritableDatabase();\r\n return this;\r\n }",
"public abstract ODatabaseInternal<?> openDatabase();",
"public TrucksDB open() throws SQLException {\n mDbHelper = new DatabaseHelper(mCtx);\n mDb = mDbHelper.getWritableDatabase();\n return this;\n }",
"public int maDBOpen(String path)\n \t{\n \t\ttry\n \t\t{\n \t\t\tMoDatabase database = MoDatabase.create(path);\n \t\t\t++mDatabaseCounter;\n \t\t\taddDatabase(mDatabaseCounter, database);\n \t\t\treturn mDatabaseCounter;\n \t\t}\n \t\tcatch (SQLiteException ex)\n \t\t{\n \t\t\tlogStackTrace(ex);\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \t}",
"public DatabaseManager open() throws SQLException {\n db = DBHelper.getWritableDatabase();\n return this;\n }",
"public RevisionDbAdapter open() throws SQLException {\n\t\tif (mDbHelper == null) {\n\t\t\tmDbHelper = new DatabaseHelper(mCtx);\n\t\t}\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t\treturn this;\n\t}",
"public DataBase open(){\n myDB = new MyHelper(ourContext);\n myDataBase = myDB.getWritableDatabase();\n return this;\n }",
"public NdbAdapter open() throws SQLException {\n dbHelper = new DbHelper(context);\n mDb = dbHelper.getWritableDatabase();\n return this;\n }",
"public synchronized SQLiteDatabase open() {\n\n mOpenCounter++;\n\n if(mOpenCounter == 1) {\n // Opening new database\n mDatabase = mDatabaseHelper.getWritableDatabase();\n }\n return mDatabase;\n }",
"public void open() {\n if (mDB == null || !mDB.isOpen()) {\n Log.d(this.getClass().getName(), \"open new DB connection\");\n mDB = mDBHelper.getWritableDatabase();\n }\n }",
"private void openDatabase() {\n database = new DatabaseExpenses(this);\n database.open();\n }",
"public DbAdapter open() throws SQLException{\n\t\tdbHelper = new DbHelper(context);\n\t\tdb = dbHelper.getWritableDatabase();\n\t\treturn this;\n\t}",
"public SQLiteDatabase open(String databaseName) {\n return context.openOrCreateDatabase(databaseName);\n }",
"protected void open() throws TzException {\n synchronized (dbLock) {\n if (!isOpen()) {\n getDb();\n open = true;\n return;\n }\n }\n }",
"public void open() {\n\n\t\t_database = _dbHelper.getWritableDatabase();\n\t}",
"public void open() throws SQLException {\r\n this.database = dbhelper.getWritableDatabase();\r\n }",
"public void open() throws SQLException {\n database = helper.getWritableDatabase();\n }",
"public void open() {\n this.database = openHelper.getWritableDatabase();\n }",
"public void open() {\n this.database = openHelper.getWritableDatabase();\n }",
"public void open() {\n this.database = openHelper.getWritableDatabase();\n }",
"public void open() {\n this.database = openHelper.getWritableDatabase();\n }",
"public void open() {\n this.database = openHelper.getWritableDatabase();\n }",
"public void open() throws SQLException {\n\t\tdatabase = dbHelper.getWritableDatabase();\n\t}",
"public PlayerDBAdapter open() throws SQLException {\r\n\t\tthis.mDbHelper = new DatabaseHelper(this.mCtx);\r\n\t\tthis.mDb = this.mDbHelper.getWritableDatabase();\r\n\t\treturn this;\r\n\t}",
"public void open() throws SQLException {\n database = helperAngkot.getWritableDatabase();\n }",
"public void open() {\n this.db = this.mSqlHelper.getWritableDatabase();\n }",
"public void openRWDB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READWRITE);\r\n\t}",
"private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}",
"public void openRODB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READONLY);\r\n\t}",
"private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}",
"public void openDatabase(@NonNull Context context){\n if (databaseClosed)\n {\n NoteDatabaseHelper dbHelper = new NoteDatabaseHelper(context, Util.DATABASE_NAME, null, Util.DATABASE_VERSION);\n noteDatabase = dbHelper.getWritableDatabase();\n databaseClosed = false;\n } else if (noteDatabase.isReadOnly())\n {\n //the database is open, but in the wrong mode (i.e. readonly, and not writeable),\n // so it needs to be closed, and reopened in writable mode.\n closeDatabase();\n openDatabase(context);\n }\n }",
"public void open(){\n\t\tbdd = maBaseSQLite.getWritableDatabase();\n\t}",
"private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }",
"public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }",
"public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }",
"public Database getDatabase() {\n return dbHandle;\n }",
"public PregDbAdapter open() throws SQLException {\n mDbHelper = new DatabaseHelper(mCtx);\n mDb = mDbHelper.getWritableDatabase();\n return this;\n }",
"public void open() {\n dbHelper = new DatabaseHelper(context);\n sqLiteDatabase = dbHelper.getWritableDatabase();\n }",
"public DBAdapter open() {\n db = myDBHelper.getWritableDatabase();\n return this;\n }",
"public void open() throws SQLException {\n\t\t// creates or opens a database\n\t\tdatabase = dbHelper.getWritableDatabase();\n//\t\tdbHelper.onUpgrade(database, 1, 1); // Use this statement to reset database\n\t}",
"private void openDB()\r\n \t{\n \t\tif ( lootDB != null )\r\n \t\t\treturn;\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tlootDB = SQLiteDatabase.openDatabase( DB_PATH, null, SQLiteDatabase.OPEN_READWRITE );\r\n \t\t\tif ( lootDB.needUpgrade( DB_VERSION ) )\r\n \t\t\t\tif ( !this.upgradeDB( DB_VERSION ) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t}\r\n \t\t// catch SQLiteException if the database doesn't exist, then create it\r\n \t\tcatch (SQLiteException sqle)\r\n \t\t{\r\n \t\t\ttry\r\n \t\t\t{\r\n \t\t\t\tlootDB = SQLiteDatabase.openOrCreateDatabase( DB_PATH, null);\r\n \t\t\t\tif ( !createDB(lootDB) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t\t// something went wrong creating the database\r\n \t\t\tcatch ( SQLiteException e )\r\n \t\t\t{\r\n \t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// throw an exception if we've made it through the try/catch block\r\n \t\t// and the database is still not opened\r\n \t\tif ( lootDB == null )\r\n \t\t{\r\n \t\t\tthrow new SQLException( \"Database could not be opened\" );\r\n \t\t}\r\n \t}",
"public MoviesDBHelper open() throws SQLException {\n\t\tLog.d(\"INIT\", \"MoviesDBHelper.........\");\n\t\tmDbHelper = new DatabaseHelper(mContext);\n\t\tmDb = mDbHelper.getWritableDatabase();\n\t\treturn this;\n\t}",
"public void open() throws SQLException {\n\t\t \n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\n\t\t //refreshCompanies();\n\t }",
"private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }",
"public DBAdapter open() throws SQLException\n {\n db = DBHelper.getWritableDatabase();\n return this;\n }",
"public void open(){\n this.db = this.typeDatabase.getWritableDatabase();\n }",
"private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }",
"public HotelsDbAdapter open() throws SQLException {\r\n mDbHelper = new DatabaseHelper(mCtx);\r\n mDb = mDbHelper.getWritableDatabase();\r\n return this;\r\n }",
"protected abstract ODatabaseInternal<?> newDatabase();",
"public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here */\n\t\t\tc = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:postgresql://localhost:5432/testdata\", \"postgres\",\n\t\t\t\t\t\" \");\n\n\t\t\tlogger.info(\"Opened database successfully\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstatus = OPEN_SUCCESS;\n\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private void openDatabase() {\r\n SearchHelper = new DBHelper(this);\r\n }",
"public DaoSession openReadableDb() {\n isInitOk();\n SQLiteDatabase db = openHelper.getReadableDatabase();\n DaoMaster daoMaster = new DaoMaster(db);\n DaoSession daoSession = daoMaster.newSession();\n return daoSession;\n }",
"public DaoSession openWritableDb() {\n isInitOk();\n SQLiteDatabase db = openHelper.getWritableDatabase();\n DaoMaster daoMaster = new DaoMaster(db);\n DaoSession daoSession = daoMaster.newSession();\n return daoSession;\n }",
"public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void open() {\n\t\tbanco =BancoHelper.getWritableDatabase();\n\t}",
"public void open() {\n db = dbHelper.getWritableDatabase();\n articleDAO.open(db);\n categoryDAO.open(db);\n sourceDAO.open(db);\n }",
"public VideoUrlHelper open() throws SQLException {\n dbMediaHelper = new DbMediaHelper(context);\n database = dbMediaHelper.getWritableDatabase();\n return this;\n }",
"private Database openTestDb(ReplicatedEnvironment master)\n throws DatabaseException {\n\n Environment env = master;\n DatabaseConfig config = new DatabaseConfig();\n config.setAllowCreate(true);\n config.setTransactional(true);\n config.setSortedDuplicates(true);\n Database testDb = env.openDatabase(null, TEST_DB, config);\n return testDb;\n }",
"public LoginDataBaseAdapter open() throws SQLException {\n db = dbHelper.getWritableDatabase();\n return this;\n }",
"private static void openDBIfClosed(Context context) {\n if (mMetaDb == null || !mMetaDb.isOpen()) {\n openDB(context);\n }\n }",
"private SQLiteDatabase openDatabase(String name){\n\n SQLiteDatabase result = null;\n\n try{\n result = SQLiteDatabase.openDatabase(name, null, 0);\n this.isActive = true;\n }\n catch(Exception e){\n // result = this.createDatabase(name);\n }\n\n return result;\n\n }",
"public CommonStorage open() {\r\n ++accessNb;\r\n getDatabase(); // To trigger the possible database setup if it has not been yet done\r\n return this;\r\n }",
"public DBAdapter open_rw() throws SQLException {\n db = DBHelper.getWritableDatabase();\n return this;\n }",
"public Connection openConnection(){\n try {\n c = DriverManager.getConnection(\"jdbc:sqlite:LIB.db\");\n s = c.createStatement();\n\n System.out.println(\"Database connection open\");\n return c;\n }catch (SQLException e) {\n System.err.println(\"Opening connection failed: \" + e.getMessage());\n }\n return null;\n }",
"public DatabaseReference open() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n myPokemonDbRef = database.getReference(PokemonDataTag);\n return myPokemonDbRef;\n }",
"private void open() throws SQLiteException {\n\n database = dbHelper.getWritableDatabase();\n }",
"public SQLiteDatabase openDatabaseSafe() {\n SQLiteDatabase db = null;\n try {\n db = SQLiteDatabase.openDatabase(DB_PATH, null, SQLiteDatabase.OPEN_READONLY);\n } catch(SQLiteException e){\n Log.i(TAG, \"Error: could not open database.\", e);\n }\n return db;\n }",
"public static DBMaker openMemory(){\n return new DBMaker();\n }",
"public DatabaseAccess(Context context) {\n this.openHelper = new OlpbhtbDatabase(context);\n }",
"public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }",
"@Deprecated\n <DB extends ODatabase> DB open(final OToken iToken);",
"public static LevelDB Open(Options options, String dbname) throws IOException, BadFormatException, DecodeFailedException {\n LevelDBImpl impl = new LevelDBImpl(options, dbname);\n VersionEdit version_edit = impl.Recover();\n if (version_edit != null) {\n long log_number = impl.NewFileNumber();\n DataOutputStream log_writer = new DataOutputStream(new FileOutputStream(FileName.LogFileName(dbname, log_number)));\n version_edit.SetLogNumber(log_number);\n \n impl.log_file = log_writer;\n impl.log_num = log_number;\n impl.log = new LogWriter(log_writer);\n impl.version_set.LogAndApply(version_edit);\n \n impl.DeleteObsoleteFiles();\n impl.MaybeScheduleCompaction();\n }\n return impl;\n }",
"public void openConnection() throws SQLException {\r\n if (getConnection() == null || getConnection().isClosed()) {\r\n LOG.ok(\"Get new connection, it is closed\");\r\n setConnection(getNativeConnection(config));\r\n }\r\n }",
"public static void open()\n\t{\n\t\ttry\n\t\t{\n\t\t\tClass.forName(PATH_DRIVER_JDBC).newInstance();\n\t\t\tCONNECTION \t= DriverManager.getConnection(PATH_DB,USER,PASSWORT);\n\t\t\tSTATEMENT \t= CONNECTION.createStatement();\n\t\t\tlink = true;\n\t\t\n\t\t} catch (Exception e) \n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Handle newHandle();",
"public ODatabaseInternal<?> db() {\n return ODatabaseRecordThreadLocal.INSTANCE.get().getDatabaseOwner();\n }",
"private void openStore()\n throws Exception {\n\n dbStore = Utils.openStore(master, Utils.DB_NAME);\n primaryIndex = \n dbStore.getPrimaryIndex(Integer.class, RepTestData.class);\n }",
"@Override\n\tprotected SQLiteDatabase openReadableDb() {\n\t\treturn super.openReadableDb();\n\t}",
"static public int open(LuaState L) throws LuaException\n {\n L.pushJavaFunction(new JavaFunction(L){\n \n /**\n * Creates a LuaSQLCursor and returns it.\n */\n public int execute() throws LuaException\n {\n ResultSet rs = (ResultSet) L.getObjectFromUserdata(2);\n \n L.pushJavaObject(new LuaSQLCursor(L, rs));\n \n return 1;\n }\n });\n \n return 1;\n }",
"protected void openConnection() {\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:sqlite:\" + name);\n\t\t\tif (conn == null) {\n\t\t\t\tconnectionOpened = false;\n\t\t\t} else {\n\t\t\t\tconnectionOpened = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connect problem: \" + e.getMessage());\n\t\t\tconn = null;\n\t\t}\n\t}",
"public void open() throws SQLException {\n try {\n Class.forName(driverName);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n return;\n }\n con = DriverManager.getConnection(url, userId, password);\n stmt = con.createStatement();\n isOpen = true;\n }",
"@Override\n\tprotected SQLiteDatabase openWritableDb() {\n\t\treturn super.openWritableDb();\n\t}",
"@Override\r\n protected void openInternal(\r\n final Map<String, CassandraEmbDatabase> theDatabase) {\r\n // empty the table and query complete list of keyspaces from DB.\r\n theDatabase.clear();\r\n final List<KsDef> ksDefs;\r\n try {\r\n ksDefs = server.describe_keyspaces();\r\n for (final KsDef keyspaceDefinition : ksDefs) {\r\n final CassandraEmbDatabase db = new CassandraEmbDatabase(this,\r\n keyspaceDefinition);\r\n theDatabase.put(keyspaceDefinition.getName(), db);\r\n }\r\n } catch (final Exception e) {\r\n throw new DBException(\"Error Opening Database.\", e);\r\n }\r\n }",
"public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}",
"public int openReadableDB() {\n int statusCode = OPEN_SUCCESS;\n\n try {\n db = dbHelper.getReadableDatabase();\n }\n catch (SQLiteException dbReadableException) {\n statusCode = OPEN_FAIL;\n // Log the exception\n }\n\n return statusCode;\n }",
"public Connection openDBConnection() {\n try {\n // Load driver and link to driver manager\n Class.forName(\"oracle.jdbc.OracleDriver\");\n // Create a connection to the specified database\n Connection myConnection = DriverManager.getConnection(\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" +\n \"csci.cscioraclesrv.ad.csbsju.edu\",\"TEAM5\", \"mnz\");\n return myConnection;\n } catch (Exception E) {\n E.printStackTrace();\n }\n return null;\n }",
"private Connection openConnection() throws SQLException {\r\n\t\tConnection dbConnection = DriverManager.getConnection(databaseURL, username, password);\r\n\t\treturn dbConnection;\r\n\t}",
"@Override\n public SQLiteDatabase openOrCreateDatabase(String name,\n int mode,\n SQLiteDatabase.CursorFactory factory) {\n final File path = getDatabasePath(name);\n Logger.pii(LOG_TAG, \"Opening database through absolute path \" + path.getAbsolutePath());\n return SQLiteDatabase.openOrCreateDatabase(path, null);\n }",
"public boolean open(String databaseName) {\n\t\tif (dbConnection == null) {\n\t\t\ttry {\n\t\t\t\t// db parameters\n\t\t\t\tString url = \"jdbc:sqlite:\" + databaseName + \".db\";\n\t\t\t\tdbConnection = DriverManager.getConnection(url);\n\t\t\t\tthis.dbName = databaseName;\n\n\t\t\t\tSystem.out.println(\"Connection to SQLite has been established.\");\n\t\t\t\treturn true;\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }",
"private DatabaseAccess(Context context) {\n this.openHelper = new MyDatabase(context);\n }",
"private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }",
"public int openWritableDB()\n {\n int statusCode = OPEN_SUCCESS;\n\n try {\n db = dbHelper.getWritableDatabase();\n }\n catch (SQLiteException dbWriteableException) {\n statusCode = OPEN_FAIL;\n // Log the exception\n }\n\n return statusCode;\n }",
"public static Transaction open(String database) {\n HashMap<String, Transaction> transactions = instance.getTransactions();\n Transaction transaction = transactions.get(database);\n if (transaction == null) {\n DataSource dataSource = instance.getDataSource(database);\n if (dataSource == null) {\n ensureConfigured(database); // throws!\n }\n transaction = new Transaction(dataSource, database);\n transactions.put(database, transaction);\n }\n return transaction;\n }",
"public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"protected Connection openConnection() throws PersistenceException {\n\n String connectionName = getConnectionName();\n if ( connectionName == null){\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using default connection\"));\n } else {\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using connection name: \" + connectionName));\n }\n Connection conn = Helper.createConnection(getConnectionFactory(),\n connectionName);\n try {\n \tif(useManualCommit) {\n \t\tconn.setAutoCommit(false);\n \t}\n return conn;\n } catch (SQLException e) {\n throw new PersistenceException(\"Error occurs when setting \"\n + (connectionName == null ? \"the default connection\"\n : (\"the connection '\" + connectionName + \"'\"))\n + \" to support transaction.\", e);\n }\n\n }",
"private DatabaseAccess(Context context) {\n this.openHelper = new RecipesDatabase(context);\n }",
"public DBInterface obre() throws SQLException {\n bd = helper.getWritableDatabase();\n return this;\n\n }"
]
| [
"0.71668977",
"0.7165062",
"0.7080477",
"0.6807136",
"0.6727241",
"0.6689199",
"0.66812813",
"0.66613144",
"0.6643718",
"0.6635896",
"0.662035",
"0.66118395",
"0.65881866",
"0.65484995",
"0.65422064",
"0.65407205",
"0.653616",
"0.6508758",
"0.6501198",
"0.6501198",
"0.6501198",
"0.6501198",
"0.6501198",
"0.64922124",
"0.64852685",
"0.6484751",
"0.6474974",
"0.64630234",
"0.6455888",
"0.6436648",
"0.6415278",
"0.63669324",
"0.63577664",
"0.6322732",
"0.6318205",
"0.6318205",
"0.6318205",
"0.6297826",
"0.6293262",
"0.6287967",
"0.62489384",
"0.62060845",
"0.61970794",
"0.6179105",
"0.61786884",
"0.6173717",
"0.6172006",
"0.614335",
"0.61324114",
"0.6009427",
"0.59916174",
"0.59877574",
"0.5952178",
"0.5937051",
"0.5931354",
"0.59313345",
"0.5928505",
"0.5924746",
"0.5924729",
"0.5921692",
"0.58953106",
"0.58944666",
"0.5894263",
"0.58771473",
"0.58692205",
"0.5865512",
"0.57825536",
"0.57759935",
"0.5775627",
"0.5733139",
"0.5732017",
"0.5700965",
"0.56930304",
"0.5678767",
"0.56540805",
"0.56500036",
"0.56409574",
"0.564053",
"0.5629014",
"0.56253445",
"0.56189823",
"0.56118506",
"0.561016",
"0.5608553",
"0.55943316",
"0.5577689",
"0.5543622",
"0.5534824",
"0.55176246",
"0.54898536",
"0.5454636",
"0.54322463",
"0.5431992",
"0.54201794",
"0.5414577",
"0.54082614",
"0.5404845",
"0.54043335",
"0.5389548",
"0.53633815"
]
| 0.6033233 | 49 |
Delete all public databases. Current database handles will remain valid as the file isn't removed until all open file handles are closed. | public void deleteDatabase() {
synchronized (mLock) {
Log.d("Deleting database.");
File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);
FileUtils.deleteQuietly(path);
mOpenHelper = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void delete_database() {\n //deletes file and by doing so all the tables\n File file = new File(url);\n String path = \"..\" + File.separator + file.getPath();\n File file_path = new File(path);\n file_path.delete();\n }",
"public static void closeAllDb() {\r\n\t\tlogger.info(\"Close all database connections\");\r\n\t\tcloseAllMsiDb();\r\n\t\tcloseUdsDb();\r\n\t}",
"public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }",
"public static void deleteAll() throws RocksDBException {\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n db.delete(iter.key());\n }\n\n iter.close();\n }",
"private void clearAllDatabases()\n\t{\n\t\tdb.clear();\n\t\tstudent_db.clear();\n\t}",
"public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}",
"public void deleteDB() {\n File dbFile = new File(dbPath + dbName);\n if (dbFile.exists()) {\n dbFile.delete();\n }\n }",
"public static void deleteDatabase() {\n\n deleteDatabaseHelper(Paths.get(DATA_DIR));\n\n }",
"@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public void close()\r\n {\r\n curDb_ = null;\r\n curConnection_ = null;\r\n try\r\n {\r\n for(Map.Entry<Db_db, Connection> entry: connections_.entrySet())\r\n {\r\n entry.getValue().close();\r\n }\r\n }catch(Exception e){};\r\n \r\n connections_.clear();\r\n }",
"public void closeAndDeleteDB() {\n\t\tboolean gotSQLExc = false;\n\t\ttry {\n\t\t\tthis.deleteAllTable();\n\t\t\tconn.close();\n //DriverManager.getConnection(\"jdbc:derby:;shutdown=true\"); \n \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tif (e.getSQLState().equals(\"XJ015\") ) {\t\t\n\t gotSQLExc = true;\n\t } else e.printStackTrace();\n\t\t}\n//\t\t\n//\t\tif (!gotSQLExc) {\n//\t \t System.out.println(\"Database did not shut down normally\");\n//\t } else {\n//\t System.out.println(\"Database shut down normally\");\t\n//\t }\n\t\t\n\t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (Legacydb legacydb : findAll()) {\n\t\t\tremove(legacydb);\n\t\t}\n\t}",
"public int deleteAllPreg(){\n \tint i=1;\n \tmDbHelper.close(); \n mDb.close(); \n if (mCtx.deleteDatabase(DATABASE_NAME)) { \n Log.d(TAG, \"deleteDatabase(): database deleted.\"); \n } else { \n Log.d(TAG, \"deleteDatabase(): database NOT deleted.\"); \n } \n \t\n \treturn i;\n }",
"@Override\r\n\tpublic void deleteDatabase() {\r\n\t\tlog.info(\"Enter deleteDatabase\");\r\n\r\n\t\t\r\n\t\tConnection connection = null;\t\t\r\n\t\ttry {\r\n\t\t\tconnection = jndi.getConnection(\"jdbc/libraryDB\");\t\t\r\n\t\t\t\r\n\r\n\t\t\t \r\n\t\t\t\tPreparedStatement pstmt = connection.prepareStatement(\"Drop Table Users_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cams_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table User_Cam_Mapping_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cam_Images_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Datenbank wurde erfolgreich zurueckgesetzt!\");\t\t\t\t\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Fehler: \"+e.getMessage());\r\n\t\t\tlog.error(\"Error: \"+e.getMessage());\r\n\t\t} finally {\r\n\t\t\tcloseConnection(connection);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }",
"public static void closeAllMsiDb() {\r\n\t\tconnectionByProjectIdMap.forEach((k, v) -> {\r\n\t\t\ttry {\r\n\t\t\t\tif (v != null && !v.isClosed()) {\r\n\t\t\t\t\tlogger.info(\"Close msi_db_project_{} connection\", k);\r\n\t\t\t\t\tv.close();\r\n\t\t\t\t\tv = null;\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlogger.error(\"Error while trying to close msi_db database connections\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void deleteDatabase() {\n mOpenHelper.close();\r\n Context context = getContext();\r\n NoteDatabase.deleteDatabase(context);\r\n mOpenHelper = new NoteDatabase(getContext());\r\n }",
"public void deleteAll() {\n try (Connection connection = dataSource.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.DELETE_ALL.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }",
"private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }",
"public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }",
"private static void deleteDatabaseHelper(final Path path) {\n if (path != null) {\n\n try {\n if (!Files.isDirectory(path)) {\n Files.delete(path);\n } else {\n \n // see http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html\n // for an explanation of streams and foreach\n Files.newDirectoryStream(path).forEach(filePath -> deleteDatabaseHelper(filePath));\n Files.delete(path);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(ConnectionManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"@Override\n\tpublic void deleteAll() {\n\t\tdao.deleteAll();\n\n\t}",
"public void delete() {\n\t\tclose();\n\t\t// delete the files of the container\n\t\tfor (int i=0; i<BlockFileContainer.getNumberOfFiles(); i++)\n\t\t\tfso.deleteFile(prefix+EXTENSIONS[i]);\n\t}",
"public static void closeDatabase() {\n if (instance != null) {\n instance.kill();\n instance = null;\n }\n }",
"void removeAllData() throws DatabaseNotAccessibleException;",
"public void wipeDB() {\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tdb.delete(EventDataSQLHelper.TABLE, null, null);\n\t\tdb.close();\n }",
"public void deleteAll() {\n new Thread(new DeleteAllRunnable(dao)).start();\n }",
"private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }",
"public void clearRegistry() {\r\n implementedDatabases.clear();\r\n }",
"public void close(){\n\t\tif(dbReadable != null && dbReadable.isOpen()){\n\t\t\tdbReadable.close();\n\t\t\tdbReadable = null;\n\t\t}\n\t\t\n\t\tif(dbWritable != null && dbWritable.isOpen()){\n\t\t\tdbWritable.close();\n\t\t\tdbWritable = null;\n\t\t}\n\t}",
"public void destroy() {\n closeSqlDbConnections();\n\n\n }",
"private void closeDatabase() {\r\n try {\r\n if ( connect != null ) {\r\n connect.close();\r\n }\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: Could not close database connection, \" + e.getMessage() );\r\n } finally {\r\n connect = null;\r\n }\r\n }",
"public void destroyAllResource() {\r\n\t\ttry {\r\n\t\t\tif(outrs != null){\r\n\t\t\t\toutrs.close();\r\n\t\t\t\toutrs=null;\r\n\t\t\t}\r\n\t\t\tif(outstmt != null ){\r\n\t\t\t\toutstmt.close();\r\n\t\t\t\toutstmt=null;\r\n\t\t\t} \r\n\t\t\tif (dbConnection != null){\r\n\t\t\t\tdbConnection.close();\r\n\t\t\t\tdbConnection=null;\r\n\t\t\t} \r\n\t\t}catch (SQLException ex) {\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void deleteAll() throws Exception {\n\t\t\n\t}",
"public void unsetDb()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(DB$2, 0);\r\n }\r\n }",
"public void closeDatabase() {\n hoardDBOpenHelper.close();\n }",
"public void deleteAll() {\n repository.deleteAll();\n }",
"void deleteTheDatabase() {\n mContext.deleteDatabase(MediaDbHelper.DATABASE_NAME);\n }",
"public void deleteAll() {\n\t\t\n\t}",
"public void deleteAll();",
"public void deleteAll();",
"public void deleteAll();",
"public void closeDB() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tconn = null;\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Failed to close database connection: \" + e);\n\t\t}\n\t}",
"public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}",
"@Deprecated\n public static void deleteAllConnections() {\n synchronized (HBASE_INSTANCES) {\n Set<HConnectionKey> connectionKeys = new HashSet<HConnectionKey>();\n connectionKeys.addAll(HBASE_INSTANCES.keySet());\n for (HConnectionKey connectionKey : connectionKeys) {\n deleteConnection(connectionKey, false);\n }\n HBASE_INSTANCES.clear();\n }\n }",
"public void clearDatabase() {\n new ExecutionEngine(this.database).execute(\"MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r, n\");\n }",
"void deleteAll() throws Exception;",
"void deleteAll() throws Exception;",
"public void deleteAllMappings() {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.delete(TABLE_APP, null, null);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\n\t}",
"public void clearDatabase();",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\n public void close() {\n for (PipelineDataSourceWrapper each : cachedDataSources.values()) {\n try {\n each.close();\n } catch (final SQLException ex) {\n log.error(\"An exception occurred while closing the data source\", ex);\n }\n }\n cachedDataSources.clear();\n }",
"public void deleteAll() {\n\n\t}",
"private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }",
"public void clearDatabase(){\n\t\tem.createNativeQuery(\"DELETE FROM CAMINHO\").executeUpdate();\r\n\t\tem.createNativeQuery(\"DELETE FROM MAPA\").executeUpdate();\r\n\t\t\r\n\t\tlog.info(\"Limpou a base de dados\");\r\n\t\r\n\t}",
"public void dispose() {\n Collection<File> values = compareFiles.values();\n for (File file : values) {\n file.delete();\n }\n\n compareFiles.clear();\n }",
"public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }",
"public void deleteAllStocks(){\n this.open();\n database.execSQL(\"DELETE FROM \" + SQLiteHelper.TABLE_STOCK);\n this.close();\n }",
"public synchronized void clearAndCloseDatabase() throws java.lang.RuntimeException {\n /*\n r2 = this;\n monitor-enter(r2)\n r2.clear() // Catch:{ Exception -> 0x0012 }\n r2.closeDatabase() // Catch:{ Exception -> 0x0012 }\n java.lang.String r0 = \"ReactNative\"\n java.lang.String r1 = \"Cleaned RKStorage\"\n com.facebook.common.logging.FLog.m861d(r0, r1) // Catch:{ Exception -> 0x0012 }\n monitor-exit(r2)\n return\n L_0x0010:\n r0 = move-exception\n goto L_0x0029\n L_0x0012:\n boolean r0 = r2.deleteDatabase() // Catch:{ all -> 0x0010 }\n if (r0 == 0) goto L_0x0021\n java.lang.String r0 = \"ReactNative\"\n java.lang.String r1 = \"Deleted Local Database RKStorage\"\n com.facebook.common.logging.FLog.m861d(r0, r1) // Catch:{ all -> 0x0010 }\n monitor-exit(r2)\n return\n L_0x0021:\n java.lang.RuntimeException r0 = new java.lang.RuntimeException\n java.lang.String r1 = \"Clearing and deleting database RKStorage failed\"\n r0.<init>(r1)\n throw r0\n L_0x0029:\n monitor-exit(r2)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.react.modules.storage.ReactDatabaseSupplier.clearAndCloseDatabase():void\");\n }",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void closeDB() {\n\t\tcommonDao.closeDB();\n\t}",
"public void clearDatabase() {\n\t\tstudentRepository.deleteAll();\n\t}",
"@Override\n\tpublic void closeAndCleanupAllData() throws Exception {\n\t\tclose();\n\t}",
"public void deleteAllPages() {\n cache.removeAll();\n final Set<Long> indexSet = getExistingBackFileIndexSet();\n this.deletePages(indexSet);\n if (logger.isDebugEnabled())\n logger.debug(\"All page files in dir \" + this.pageDir + \" have been deleted.\");\n }",
"@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t\tString[] tables = {\"account\", \"consumer\", \"transaction\"};\n\t \t\tfor (int i=0; i<3;i++) {\n\t \t\t\tString query = \"DELETE FROM \" + tables[i];\n\t \t\t\tstmt.executeUpdate(query);\n\t \t\t}\n\t \t}",
"public void schliessen() {\n mDb.close();\n }",
"public void deleteDB(){\n \t\tSQLiteDatabase db = this.getWritableDatabase();\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS user\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS poll\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS time\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS status\");\n \t\tonCreate(db);\n \t}",
"public void deleteAll()\n\t{\n\t}",
"public void deleteAll()\n\t{\n\t}",
"void deleteAll();",
"void deleteAll();",
"void deleteAll();",
"public static void close_DB() {\n try {\n for (int i=0; i<conns; i++) {\n if (con_pool[i]!=null)\n con_pool[i].close();\n }\n } catch (SQLException ex) {\n Logger.getLogger(DB_Backend.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"static synchronized void closeAll() {\n List<BlackLabEngine> copy = new ArrayList<>(engines);\n engines.clear();\n for (BlackLabEngine engine : copy) {\n engine.close();\n }\n }",
"private void closeDB() {\n locationDBAdapter.close();\n }",
"public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }",
"public void saveDatabase() {\r\n\t\ttry {\r\n\t\t\tFile databaseDirectory = new File (System.getProperty(\"user.home\")\r\n\t\t\t\t\t+ File.separator + \"Documents\" + File.separator + \"DatabaseUniverse\"\r\n\t\t\t\t\t+ File.separator + name);\r\n\t\t\tdatabaseDirectory.mkdirs();\r\n\t\t\tFile[] files = databaseDirectory.listFiles();\r\n\t\t\tSystem.gc();\r\n\t\t\tfor (File file : files) {\r\n\t\t\t\tFiles.delete(file.toPath());\r\n\t\t\t}\r\n\t\t\tfor (Table table : tables) {\r\n\t\t\t\ttable.saveTable(databaseDirectory.getPath());\r\n\t\t\t}\r\n\t\t} catch (SecurityException e) {\r\n\t\t\tSystem.out.println(\"Access Denied in Documents folder. Please check your security settings\"\r\n\t\t\t\t\t+ \"to enable file saving\");\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.err.print(e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\t}",
"public void clearAllConnections() {\r\n clearAllConnections(false);\r\n }",
"public void deleteAll(){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"delete from \" + TABLE_NAME);\n }",
"@Override\r\n\tpublic void deleteAll() {\n\r\n\t}",
"@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}",
"private static void dropTheBase()\n\t{\n\t\ttry (MongoClient mongoClient = MongoClients.create())\n\t\t{\n\t\t\tmongoClient.getDatabase(\"TestDB\").drop();\n\t\t\tmongoClient.getDatabase(\"myDB\").drop();\n\t\t}\n\n\t\t//Dropping all Neo4j databases.\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(DBProperties.SERVER_ROOT_URI, \"bolt://localhost:7687\");\n\t\tIDBAccess dbAccess = DBAccessFactory.createDBAccess(iot.jcypher.database.DBType.REMOTE, props, AuthTokens.basic(\"neo4j\", \"neo4j1\"));\n\t\ttry\n\t\t{\n\t\t\tdbAccess.clearDatabase();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tdbAccess.close();\n\t\t}\n\n\t\tprops = new Properties();\n\t\tprops.setProperty(DBProperties.SERVER_ROOT_URI, \"bolt://localhost:11008\");\n\t\tdbAccess = DBAccessFactory.createDBAccess(DBType.REMOTE, props, AuthTokens.basic(\"neo4j\", \"neo4j1\"));\n\t\ttry\n\t\t{\n\t\t\tdbAccess.clearDatabase();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tdbAccess.close();\n\t\t}\n\n\t\t//Dropping all SQL databases.\n\t\ttry (DSLContext connection = using(\"jdbc:sqlite:src/main/resources/sqliteDB/test.db\"))\n\t\t{\n\t\t\tconnection.dropTableIfExists(\"User\").execute();\n\t\t\tconnection.dropTableIfExists(\"MovieRate\").execute();\n\t\t\tconnection.dropTableIfExists(\"SeriesRate\").execute();\n\t\t\tconnection.dropTableIfExists(\"EpisodeRate\").execute();\n\t\t\tconnection.dropTableIfExists(\"MovieRole\").execute();\n\t\t\tconnection.dropTableIfExists(\"SeriesRole\").execute();\n\t\t\tconnection.dropTableIfExists(\"EpisodeRole\").execute();\n\t\t\tconnection.dropTableIfExists(\"Movie\").execute();\n\t\t\tconnection.dropTableIfExists(\"Series\").execute();\n\t\t\tconnection.dropTableIfExists(\"Episode\").execute();\n\t\t\tconnection.dropTableIfExists(\"Genre\").execute();\n\t\t\tconnection.dropTableIfExists(\"Quote\").execute();\n\t\t\tconnection.dropTableIfExists(\"Goof\").execute();\n\t\t\tconnection.dropTableIfExists(\"Trivia\").execute();\n\n\t\t}\n\t}",
"public void destroyDatabase(){\n \n \t\t//Make sure database exist so you don't attempt to delete nothing\n \t\tmyDB = openOrCreateDatabase(dbFinance, MODE_PRIVATE, null);\n \n \t\t//Make sure database is closed before deleting; not sure if necessary\n \t\tif (myDB != null){\n \t\t\tmyDB.close();\n \t\t}\n \n \t\ttry{\n \t\t\tthis.deleteDatabase(dbFinance);\n \t\t}\n \t\tcatch(Exception e){\n \t\t\tToast.makeText(this, \"Error Deleting Database!!!\\n\\n\" + e, Toast.LENGTH_LONG).show();\n \t\t}\n \n \t\t//Navigate User back to dashboard\n \t\tIntent intentDashboard = new Intent(Options.this, Main.class);\n \t\tintentDashboard.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n \t\tstartActivity(intentDashboard);\n \n \t}",
"public void close() {\n if (db.isOpen()) {\n db.close();\n }\n }",
"public void deleteAll()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.deleteAll();\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}"
]
| [
"0.73340523",
"0.6950764",
"0.6853688",
"0.6815194",
"0.67706084",
"0.67459905",
"0.66045344",
"0.65435076",
"0.64291567",
"0.6417644",
"0.62920946",
"0.6287499",
"0.62664765",
"0.62650484",
"0.6257303",
"0.6188378",
"0.6141527",
"0.60941076",
"0.6087128",
"0.6014996",
"0.6013055",
"0.6011689",
"0.59947085",
"0.5990612",
"0.59705377",
"0.59635085",
"0.58962804",
"0.58922684",
"0.58825403",
"0.5882065",
"0.586002",
"0.5852901",
"0.5847935",
"0.5840907",
"0.58381736",
"0.5835034",
"0.5828497",
"0.5825238",
"0.5823835",
"0.5818456",
"0.58078057",
"0.58078057",
"0.58078057",
"0.5805394",
"0.58004135",
"0.57982326",
"0.5788907",
"0.5774025",
"0.5774025",
"0.5768523",
"0.5767526",
"0.57669413",
"0.57669413",
"0.57669413",
"0.57669413",
"0.57633674",
"0.57581836",
"0.57426137",
"0.573835",
"0.5736732",
"0.5718545",
"0.5715895",
"0.571218",
"0.5710567",
"0.5710567",
"0.5710567",
"0.5710567",
"0.5710567",
"0.5710567",
"0.5710567",
"0.5710567",
"0.56968516",
"0.5689886",
"0.5689561",
"0.56872064",
"0.56721264",
"0.56682944",
"0.56682944",
"0.56682944",
"0.5663348",
"0.56619376",
"0.56553805",
"0.5655291",
"0.5655291",
"0.5653126",
"0.5653126",
"0.5653126",
"0.56525785",
"0.5626915",
"0.5621523",
"0.5618442",
"0.5612927",
"0.56012607",
"0.55928034",
"0.55848205",
"0.55823433",
"0.55796707",
"0.5576512",
"0.5571302",
"0.55695325"
]
| 0.6412927 | 10 |
Create a program which checks the int if it is odd number Odd : 1,3,5,7,9,11,... Even : 0,2,4,6,8,10... | public static void main(String[] args) {
int num = 90;
if (num % 2 == 1) {
System.out.println(num+" is an odd number");
}
// Create a program which checks the int if it is even number
if (num % 2 == 0) {
System.out.println(num+" is an even number");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void findOddEven() {\n\t\tif (number % 2 == 0) {\n\t\t\tif (number >= 2 && number <= 5)\n\t\t\t\tSystem.out.println(\"Number is even and between 2 to 5...!!\");\n\t\t\telse if (number >= 6 && number <= 20)\n\t\t\t\tSystem.out.println(\"Number is even and between 6 to 20...!!\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Number is even and greater than 20...!!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Number is odd...!!\");\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n // create a scanner for user input \n Scanner input = new Scanner(System.in);\r\n \n //prompt user for their number\n System.out.println(\"Enter your number\"); \n //intialize user's number\n int number = input.nextInt();\n //intialize the remainder\n int remainder = number % 2; \n \n //Determin whether user's number is odd or even\n if (remainder >= 1){\n System.out.println(number + \" is an odd number \");\n }else{\n System.out.println(number +\" is an even number\");\n } \n\n\r\n }",
"boolean isOddOrEven(int n){\n return (n & 1) == 0;\n }",
"public static void main(String[] args) {\n\n System.out.println(\"Let's find if the number is even or odd\");\n\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a number: \");\n\n int num = input.nextInt();\n if (num % 2 == 0) {\n System.out.println(\"The number entered is even number\");\n } else {\n System.out.println(\"The number entered is odd number\");\n }\n }",
"public static void main(String[] args) {\r\n // create a scanner for user import\r\n Scanner input = new Scanner(System.in);\n\n // declare a variable to see if a number is divisible by two\n final int DIVISIBLE_TWO = 2;\n\n // find out user number\n System.out.println(\"Please enter a number\");\n int number = input.nextInt();\n\n // declare a variable for the divided number\n int number2 = number%DIVISIBLE_TWO;\n\n //figure out if number is divisible by two\n if (number/DIVISIBLE_TWO == number2){\n System.out.println(\"Your number is odd\");\n } else {\n System.out.println (\"Your number is even\");\n }\n\r\n }",
"public static void printOddInt() {\n\t\t\n\t\t//For Loop\n\t\tfor(int i=4; i<10; i++) {\n\t\t\tif(i%2!=0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t}",
"public static PerformOperation isOdd() {\n return (num) -> num % 2 != 0;\n }",
"public static boolean isOdd(int value)\n\t{\n\t\treturn (value % 2) != 0;\n\t}",
"private static void oddEven(int a) {\n\t\tif(a%2 ==0) {\n\t\t\tSystem.out.println(\"number is even\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"number is odd\");\n\t\t}\n\t}",
"public void parity() {\n System.out.print(\"Enter an integer: \");\n int int2 = in.nextInt();\n\n if ((int2 % 2) == 0) {\n System.out.println(\"\\nEven.\\n\");\n } else {\n System.out.println(\"\\nOdd.\\n\");\n }\n }",
"public static final boolean odd(int x) {\n \t\treturn !even(x);\n \t}",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int num; //Declare a variable\n System.out.println(\"Enter a number:\");\n num = input.nextInt();\n input.close();//scanner close\n\n if ( num % 2 == 0 ) //if any number divided by 2 is even number\n System.out.println(\"The entered number is even\");\n else // else odd number\n System.out.println(\"The entered number is odd\");\n }",
"public void getEvenOdd(int num) {\r\n\t\t\r\n\t\tSystem.out.println(\"The given number is : \"+num);\r\n\t\t\r\n\t\tif(num % 2 == 0) {\r\n\t\t\tSystem.out.println(\"This is Even number\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"This is odd number\");\r\n\t\t}\r\n\r\n\t}",
"public static boolean isOdd(MyInteger number1){\r\n\t\tif (number1.getInt() % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static boolean isOdd(int number){\r\n\t\tif (number % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean isOdd(){\r\n\t\tif (value % 2 == 0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static boolean isOdd(int num){\n boolean isOdd = true;\n if(num%2!=0){\n isOdd= true;\n }else if( num%2==0){\n isOdd=false;\n }\n\n return isOdd;\n\n }",
"public static boolean isOdd(int i){\n if((i & 1) == 0){\n return false;\n }\n return true;\n }",
"public String determineEvenOrOdd(int number){\n\t\t if((number%2)==0) { return \"even\"; } else { return \"odd\"; }\n\t\t }",
"public static boolean isOdd(MyInteger n1){\n return n1.isOdd();\n }",
"public static boolean isEven(MyInteger number1){\r\n\t\tif (number1.getInt()%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}",
"public static String oddEven(int n){\n // Returning String as an \"Even\" or \"Odd\"\n return n%2==0?\"Even\":\"Odd\";\n }",
"public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n int input = 1;\n String output = \"\";\n\n\n do {\n input = scanner.nextInt();\n if (input % 2 == 0 && input != 0) {\n output = output + \"even\\n\";\n }\n if (input % 2 != 0 && input != 0) {\n output = output + \"odd\\n\";\n }\n } while (input != 0);\n System.out.println(output);\n }",
"public static int getOdd() {\n int odd = getValidNum();\n\n while ((odd % 2) == 0) {\n System.out.print(\"Please enter an ODD number: \");\n odd = getValidNum();\n }\n return odd;\n }",
"public static void main(String[] args) {\n checkIfNumberIsOddOrEven(112);\n checkIfNumberIsOddOrEven(111);\n\n }",
"boolean odd(int x) {\n if (x == 0) {\n return false;\n } else {\n y = x - 1;\n even(y);\n }\n}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter your number :: \"); \n\t\tint i = input.nextInt(); \n\t\t\n\t\t\n\t\tif(i%2==0)\n\t\t{\n\t\t\tSystem.out.print(\"Yes It is Even\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Yes, it is odd number\");\n\t\t}\n\t\t\t\n\t}",
"public PerformOperation isOdd() {\n return n -> ((n & 1) == 1);\n }",
"private static boolean isEven(Integer element) {\n return element % 2 == 0;\n }",
"public static int getEven() {\n int even = getValidNum();\n\n while ((even % 2) == 1) {\n System.out.print(\"Please enter an EVEN number: \");\n even = getValidNum();\n }\n return even;\n }",
"public static boolean isEven(int num) {\n\t\t\treturn num%2==0;\n\t\n\t\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"ODD OR EVEN\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the number:\");\r\n\t\tint n=sc.nextInt();\r\n\t\tSystem.out.println(\"odd numbers\");\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t {\r\n\t\t\tif(i%2==1) \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t System.out.println(\"even numb\");\r\n\t\t\tfor(int i=0;i<=n;i++){\r\n\t\t\t\tif(i%2==0) \r\n\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t}",
"boolean isEven(int x) {\r\n\t\t\tif((x%2)==0) return true; else return false;\r\n\t\t}",
"public static boolean isOdd(int iValue) {\n boolean result = (iValue % 2) != 0;\n return result;\n }",
"bool isEven(int n)\r\n{\n\tif (n ^ 1 == n + 1)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}",
"public static boolean isOdd(MyInteger value)\n\t{\n\t\treturn isOdd(value.getValue());\n\t}",
"boolean checkOdd(int[] table)\n{\n boolean found = false;\n for (int count : table)\n if (count % 2 == 1)\n {\n if (found) return false;\n found = true;\n }\n return true;\n}",
"public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}",
"public static boolean isEven(MyInteger n1){\n return n1.isEven();\n }",
"public static boolean isEven(int num){\n\n boolean isEven = (num%2==0)? true: false;\n\n return isEven;\n }",
"static boolean isEvenNumber(int number) {\n\t\tif (number < 0 || number % 2 == 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn isEvenNumber(number - 1);\n\t\t}\n\t}",
"public static boolean isEven(int value)\n\t{\n\t\treturn (value % 2) == 0;\n\t}",
"public static final boolean odd(long x) {\n \t\treturn !even(x);\n \t}",
"public static void isEven(int n)\n\t{\n\t\tif (n % 2 == 0)\n\t\t\tSystem.out.println(n + \" is even\");\n\t\telse\n\t\t\tSystem.out.println(n + \" is odd\");\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number : \");\r\n\t\tint num=scan.nextInt();\r\n\t\tint even_count=0;\r\n\t\tint odd_count=0;\r\n\t\twhile(num>0)\r\n\t\t{\r\n\t\t\tint rem=num%10;\r\n\t\t\tif(rem%2==0)\r\n\t\t\t\teven_count+=1;\r\n\t\t\telse\r\n\t\t\t\todd_count+=1;\r\n\t\t\tnum=num/10;\r\n\t\t}\r\n\t\tSystem.out.println(\"Odd digits : \"+odd_count);\r\n\t\tSystem.out.println(\"Even digits : \"+even_count);\r\n\t\t\r\n\r\n\t}",
"public static boolean isEven(int a) {\r\n //8th error redundancy ? wonder consider or not\r\n return a % 2 == 0;\r\n }",
"public boolean isOdd() {\n boolean isOdd = false;\n if (value % 2 != 0)\n isOdd = true;\n return isOdd;\n }",
"public static boolean isEven(int number){\r\n\t\tif (number%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}",
"public static boolean isOdd(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn !isOdd(n - 1);\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[] nums = {input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt()};\n\n //TODO: Write your code below\n int countEven = 0;\n for(int each : nums){\n if(each % 2 != 0){\n continue;\n }\n countEven++;\n }\n System.out.println(countEven);\n\n\n\n }",
"public static boolean isEven(int a) {\n return a % 2 == 0;\n }",
"public Integer oddNumbers(int fromThisNumber, int toThisNumber){\n\t\tSystem.out.println(\"Print odd numbers between 1-255\");\n\t\tfor(int i = fromThisNumber; i <= toThisNumber; i++){\n\t\t\tif(i % 2 == 1){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}",
"public static void main(String[] args) {\n\t\tint n;\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter your number: \");\n\t\tn = sc.nextInt();\n\t\tif(n%2 == 0)\n\t\t\tSystem.out.println(n + \" is even\");\n\t\telse\n\t\t\tSystem.out.println(n + \" is odd\");\n\t}",
"public static void main(String[] args) {\n\t\tfor(int i=1;i<20;i++)\r\n\t\t{\r\n\t\t\tif(i%2!=0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i+\" is an ODD Number\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t}",
"public static void printodd() {\n for (int i = 0; i < 256; i++){\n if(i%2 != 0){\n System.out.println(i);\n }\n \n }\n }",
"public static void printOddNumbers (int from, int to) {//when we dont know the range\n for(int i=from; i<=to; i++){\n if(i%2!=0){\n System.out.print(i + \" \");\n }\n\n }\n System.out.println();\n }",
"public boolean isOdd() {\n int lc = left == null ? 0 : left.isOdd() ? 1 : 0;\n int rc = right == null ? 0 : right.isOdd() ? 1 : 0;\n return (lc + rc + 1) % 2 == 1;\n }",
"private boolean isOddPrime(int t) // Not the most efficient method, but it will serve\n {\n int test = 3;\n boolean foundFactor = false;\n while(test*test < t && !foundFactor)\n {\n foundFactor = (t%test == 0); // is it divisible by test\n test += 2;\n }\n\n return !foundFactor;\n }",
"@Override\n\t\t\tpublic boolean test(Integer t) {\n\t\t\t\tint tmp = t;\n\t\t\t\tif (tmp % 2 == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint intNum1 = 34;\n\t\t\n\t\tint intMode = (intNum1 % 2);\n\t\t\n\t\tboolean even = (intMode == 0);\n\t\t\n\t\t//if(even == true) {\n\t if(even) {\n\t \t// even이 true 일 때 실행할 명령문들\n\t System.out.println(\"짝수 맞네!\");\n\t System.out.print(\"변수의 값은 \");\n\t System.out.print(intNum1);\n\t System.out.println(\" 입니다.\");\n\t\t} else {\n\t\t\t// even이 false 일 때 실행할 명령문들\n\t\t\tSystem.out.println(\"아니야 홀수야!\");\n\t\t}\n // if문, 비교판단문 \n\t // if(변수, 식) {} : 만약 변수나 식이 true인가 아닌가를 판단해서 명령문의 흐름을 바꾸는 keyword다.\n\t \n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수라니까!\");\n\t }\n\t // intMode == 0 의 결과가 false 이면 위 문을 건너뛴다.\n\t \n\t // intMode는 0아니면 1인 값을 당연히 갖는다.\n\t // 라고 생각하지만 어떤 불가항력적인 이유로 0과 1이 아닌 값을 가질 수있다.\n\t // 그래서 기준이 되는 intMode == 0 이라는 식의 반대되는 개념은 intMode == 1이 아닌 intMode != 0 이라는 생각을 해야한다.\n\t if(intMode != 0) {\n\t \t\n\t }\n\t \n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수만세\");\n\t } else {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t if(intMode == 0) {\n\t \tSystem.out.println(\"짝수만세\");\n\t } \n\t if(intMode != 0) {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t if(intMode == 1) {\n\t \tSystem.out.println(\"홀수만세\");\n\t }\n\t}",
"public static boolean isEven(int n) {\n\r\n\t\treturn (n % 2) == 0 ? true : false;\r\n\r\n\t}",
"public static final boolean even(int x) {\n \t\treturn ((x & 0x1) == 0);\n \t}",
"public static void main(String[] args) {\n\t\t\n\t\tint no;\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the no.\");\n\t\tno = sc.nextInt();\n\t\t\n\t\tif(no%2==0)\n\t\t{\n\t\t\tSystem.out.println(\"No is Even\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No is odd\");\n\t\t}\n\t\tsc.close();\n\t}",
"public boolean isOdd()\n\t{\n\t\treturn isOdd(value);\n\t}",
"public static void main(String[] args) {\n\t\tint num = 8;\n\t\tint a = num & 1;\n\t\tSystem.out.println(a);\n\t\tif(a>0)\n\t\t\tSystem.out.println(\"Odd!\");\n\t\telse\n\t\t\tSystem.out.println(\"Even!\");\n\t}",
"default boolean isEven(int a){\n return a % 2 ==0;\n }",
"@Test public void evenOddTest() {\n check(\"declare function local:odd($n) {\" +\n \" if($n = 0) then false()\" +\n \" else local:even($n - 1)\" +\n \"};\" +\n \"declare function local:even($n) {\" +\n \" if($n = 0) then true()\" +\n \" else local:odd($n - 1)\" +\n \"};\" +\n \"local:odd(12345)\",\n\n true,\n\n count(Util.className(StaticFuncCall.class) + \"[@tailCall eq 'false']\", 1)\n );\n }",
"public static boolean isEven(MyInteger value)\n\t{\n\t\treturn isEven(value.getValue());\n\t}",
"@Override\n\tpublic boolean isEvenNumber(long number) {\n\t\tif(number%2 == 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isEven(int a) {\n if (a % 2 == 0) {\n return true;\n }\n return false;\n }",
"public static boolean checkOdious(int num) {\n\t\tint numberOfOnes = 0;\n\t\tint numberOfZeros = 0;\n\n\t\t// See how many 1s and 0s in number\n\t\twhile (num != 0) {\n\t\t\tif (num % 2 == 1) {\n\t\t\t\tnumberOfOnes++;\n\t\t\t} else {\n\t\t\t\tnumberOfZeros++;\n\t\t\t}\n\t\t\tnum = num / 2;\n\t\t}\n\n\t\t// Check if there is an odd number of 1s\n\t\tif (numberOfOnes % 2 == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static int getRandOdd() {\n int randOdd = (int) (Math.random() * 10); // Generate random numbers\n if ((randOdd % 2) == 0) {\n return randOdd + 1; // Turn even to odd\n } else {\n return randOdd;\n }\n }",
"public static final boolean odd(short x) {\n \t\treturn !even(x);\n \t}",
"public static void main(String[] args) {\n\n int number ;\n\n number=25;\n String result = \"\";\n\n //lets try with if\n if (number % 2 == 0){\n result = number + \" is even\";\n }else {\n result = number + \" is odd\";\n }\n\n //shortcut of println is sout\n System.out.println(result);\n\n //ternary\n //if == ?\n //else == :\n\n String result2= (number % 2 == 0) ? number + \" is even \" : number + \" is odd\" ;\n\n System.out.println(result2);\n\n System.out.println(\"**************\");\n\n //ben calisma yapiyorum\n int mert;\n mert=11;\n String sonuc= \"\";\n if ( mert % 2== 0){\n sonuc= mert+ \"is even\";\n }else {\n sonuc =mert+\"is odd\";\n }\n System.out.println(sonuc);\n\n\n String sonuc1 = (number%2==0) ? mert + \"is even\" : mert + \" is odd\";\n System.out.println(sonuc1);\n\n }",
"public static void main(String[] args) {\nint i=1;//display from 20 to 10\nSystem.out.println(\"odd even\");\nwhile(i<=10)\n{\n\tif(i%2!=0) {\n\tSystem.out.println(i+\" \"+(i+1));//for space /t is fine\n\t}\ni++;\n}\n\t}",
"public static void main(String[] args) {\n\t int[] numbers = {13, 45, 26, 22, 19, 24, 20, 30, 90, 12};\n\n for(int i = 0; i < numbers.length; i++){\n if(numbers[i]%2 == 0){\n System.out.println(\"Even number: \" + numbers[i]);\n }\n }\n }",
"public boolean isEven(){\r\n\t\tif (value%2==0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\t}",
"public static void main (String [] args) {\n while (true) {\n System.out.println(\"Please enter an integer\");\n Scanner scanner = new Scanner(System.in);\n int input = scanner.nextInt();\n if (input == 17) {\n break;\n }\n else if (input % 2 == 0) {\n System.out.println(\"even\");\n } else {\n System.out.println(\"odd\");\n }\n }\n System.out.println(\"My number 17! Show is over\");\n }",
"int main()\n\n{\n\n int n,t,e,o;\n\n cin>>n;\n\n while(n>0)\n\n {\n\n t=n%10;\n\n if(t%2==0)\n\n {\n\n e=e+t;\n\n }\n\n else\n\n {\n\n o=o+t;\n\n }\n\n n=n/10;\n\n }\n\n if(e==o)\n\n {\n\n cout<<\"Yes\";\n\n }\n\n else\n\n {\n\n cout<<\"No\";\n\n }\n\n \n\n}",
"public static void main(String[] args) {\n int counter = 0;\n while (counter<30){\n counter +=3;\n System.out.print(counter + \" \");\n\n }\n System.out.println(\" \");\n int evenNumber = 0;\n while(evenNumber <=50){\n System.out.print( evenNumber + \" \");\n evenNumber +=2;\n\n }\n System.out.println(\" \");\n int oddNumber = 1;\n while (oddNumber<=50){\n System.out.print(oddNumber + \" \");\n\n oddNumber+=2;\n }\n\n System.out.println(\"---------------------\");\n int evenNumber2 = 20;\n if(evenNumber2 %2 == 0){\n System.out.println(evenNumber2 + \" is even number\");\n }else{\n System.out.println(evenNumber2 + \" is odd number\");\n }\n ++evenNumber2;\n\n\n System.out.println(\"---------------------------------\");\n\n int oddNumber2 = 21;\n if (oddNumber2 %2==1){\n System.out.println(oddNumber2 + \" is odd number\");\n }else{\n System.out.println(evenNumber2 + \" is even number\");\n }\n ++oddNumber2;\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.print(\"Enter an integer: \");\n\t\tScanner input = new Scanner(System.in);\n\t\tint integer = input.nextInt();\n\t\t\n\t\t// Call function\n\t\tcheckOddOrEven(integer);\n\t}",
"public static void main(String[] args) {\n\n\t int even=20;\n\t do {\n\t\tSystem.out.println(even);\n\t even+=2;\n\t }while (even<=50);\n//2. way\n\t int even1=20;\n\t do {\n\t\t if (even1%2==0) {\n\t\t\t System.out.println(even1);\n\t\t }\n\t even1++;\n\t }while (even1<=50);\n}",
"public static void main(String[] args) {\n\t\tScanner t = new Scanner(System.in);\n\t\tint n = t.nextInt();\n\t\tint[] a = new int[n];\n\t\tArrayList<Integer> odd = new ArrayList<>();\n\t\tArrayList<Integer> even = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = t.nextInt();\n\n\t\t\tif (a[i] % 2 == 0)\n\t\t\t\teven.add(i + 1);\n\t\t\telse\n\t\t\t\todd.add(i + 1);\n\t\t}\n\n\t\tif (even.size() == 1)\n\t\t\tSystem.out.println(even.get(0));\n\t\telse\n\t\t\tSystem.out.println(odd.get(0));\n\n\t}",
"public static void main(String[] args) {\n System.out.println(\"your number?\");\n Scanner s = new Scanner(System.in);\n int i1 = s.nextInt();\n int i2 = s.nextInt();\n int i3 = s.nextInt();\n int i4 = s.nextInt();\n int i5 = s.nextInt();\n int sum = i1 + i2 + i3 + i4 + i5;\n if (sum % 2 == 0) {\n System.out.println(sum);\n }\n }",
"public static void CountEvenOdd(int[] array) {\n\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Please a number\\n\");\n\t\tint num = sc.nextInt();\n\t\tString msg = (num % 2 == 0) ? \"The number is Even\" : \"The number is Odd\";\n\t\tSystem.out.println(msg);\n\n\t}",
"public static void main(String[] args){\n\n int x = 1;\n\n while(x < 11){\n if((x % 2) == 0){\n System.out.println(\"Even number: \"+x);\n }\n x++;\n }\n\n\n\n //uncomment next line if input required\n //input.close();\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"To print the odd number from 1 to 100\");\n\t\tfor ( int i = 1;i<=100;i++)\n\t\t{\n\t\t\tif (!(i % 2 == 0))\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n System.out.print(\"All numbers: \");\n for(int i = 1; i <= 50; i++ ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // even numbers:\n System.out.print(\"Even Numbers: \");\n for(int i = 2; i <= 50; i+= 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // Odd numbers:\n System.out.print(\"Odd Numbers\");\n for(int i = 1; i<=49; i += 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n System.out.println(\"======================================================\");\n for(int i = 1; i <= 50; i++ ){\n if(i%2 != 0){ // if i' value is odd\n continue; // skip\n }\n System.out.print(i+\" \");\n }\n\n System.out.println();\n\n for(int i = 1; i <= 50; i++ ){\n if(i%2==0){ // if i is odd number\n continue; // skip it\n }\n\n System.out.print(i+\" \");\n\n if(i == 29){\n break; // exits the loop\n }\n\n }\n\n\n System.out.println(\"Hello\");\n\n\n\n }",
"public static void main(String[] args) {\n int[] nums = {2,3,8,6,2,7,3,3,8};\n// oddOne(nums);\n System.out.println(oddOne(nums));\n }",
"@Test\n public void testIsEven_0() {\n NaturalNumber n = new NaturalNumber2(0);\n boolean result = CryptoUtilities.isEven(n);\n assertEquals(\"0\", n.toString());\n assertTrue(result);\n }",
"public boolean isOdd(int h,int w){\n if(h % 2 != 0 && w % 2 != 0){\n return true;\n }\n return false;\n }",
"public static void main(String[] args) {\r\n\tint a=1;\r\n\twhile(a>=1 && a<10) {\r\n\t\ta+=1;\r\n\t\tif(a%2==0) {\r\n\t\t\tSystem.out.println(\"\"+a);\r\n\t\t}\r\n\t}\r\n\tint max = 50;\r\n\tint add =0;\r\n\tfor(int s =0;s<=max;s+=1) {\r\n\t\tadd+= s;\r\n\t}\r\n\tSystem.out.println(\"\"+add);\r\n\t/*Adding up odd numbers 1-25\r\n\t * \r\n\t */\r\n\tint sum = 0;\r\n\tint c = 25;\r\n\tfor(int b=1 ;b<=c;b+=2) {\r\n\t\tsum+=b;\r\n\t\tSystem.out.println(\"\"+sum);\r\n\t}\r\n\t\r\n}",
"public int setNextOdd() {\n\t\twhile(x % 2 != 1){\n\t\t\tx++;\n\t\t}\n\t\t\n\t\t// sets the new odd number equal to x\n\t\tRuntimeThr.evenOddSequence = x;\n\n\t\t// Returns the next odd number\n\t\treturn x;\n\t}",
"public static void main(String[] args) {\n\n\t\tfor (int i = 15; i <= 35; i++) {\n\n\t\t\tif (i % 6 == 0) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tSystem.out.print(i + \" \");\n\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int a = 15; a < 36; a++) {\n\t\t\tif (a % 2 == 0 && a % 3 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(a + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tfor (int x = 0; x <= 10; x++) {\n\t\t\tif (x == 4) {\n\t\t\t\tSystem.out.println(\"I am stopping the loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.print(x + \" \");\n\t\t}\n\t\tSystem.out.print(\" \");\n\t\tfor (int y = 1; y <= 10; y++) {\n\t\t\tif (y == 4) {\n\t\t\t\tSystem.out.println(\"i am skipping the loop\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(y+\"-)\");\n\t\t\tSystem.out.println(\" i am inside the loop\");\n\t\t}\n\t\t/*\n\t\t * write a program that needs a range of integers(start and end point)\n\t\t * provided by a user and then from that range prints the sum of the even\n\t\t */\n\t\tSystem.out.println(\" \");\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"please write a min number\");\n\t\tint min=scan.nextInt();\n\t\tSystem.out.println(\"please write a max number\");\n\t\tint max=scan.nextInt();\n\t\t\n\t\tint sumEven=0;\n\t\tint sumOdd=0;\n\t\tfor(int n=min; n<max+1; n++) {\n\t\t\tif(n%2==0) {\n\t\t\t\tsumEven=sumEven+n;\n\t\t\t}else if(n%2!=0) {sumOdd=sumOdd+n;\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\tSystem.out.println(sumEven+\" is sum of even numbers\");\n\t\tSystem.out.println(sumOdd+\" is sum of odd numbers\");\n\n}",
"public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tScanner sc = new Scanner(System.in); \r\n\t\t\r\n\t\tint number = sc.nextInt();\r\n\t\t\r\n\t\tif (number % 2 == 0 && number != 2) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"YES\");\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\tSystem.out.println(\"NO\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\r\n\t}",
"public static void main(String[]args){\r\n\tint x = 101;\r\n\r\n\tif ((x%2)==0)\r\n\t{\r\n\t\tx = (x/2);\r\n\t\tSystem.out.println(\"X is even, so new value is: \" + x);\r\n\t}//end if\r\n\telse\r\n\t{\r\n\t x = ((x * 3) - 1);\r\n\t System.out.println(\"X is odd, so new value is: \" + x);\r\n\t}//end else\r\n}",
"public static void main (String args[]){ // Start of main method\n\t\n\tint x = 5;\n\tint y = 5;\n\t\n\tSystem.out.println(\"x is \" + x); // print out the value of x\n\tSystem.out.println(\"y is \" + y); // print out the value of y\n\t\n\tif (x < y){\n\t\tSystem.out.println(\"x is less than y\"); // if x is less than y, print statement\n\t}\n\telse if (x == y){\n\t\tSystem.out.println(\"x is equal to y\"); // if x is equal to y, print statement\n\t}\n\telse if (x > y){\n\t\tSystem.out.println(\"x is greater than y\"); // if x is greater than y, print statement\n\t}\n\t\n\tint number = 5;\n\t\n\tif (number%2 == 0){ // if the value of number is divided by two and there is no remainder, print the statement\n\tSystem.out.println(\"The number \" + number + \" is EVEN\"); \n\t}\n\telse if (number%2 != 0){ // if the value of number is divided by two and there is a remainder, print the statement\n\t\tSystem.out.println(\"The number \" + number + \" is ODD\");\n\t}\n\t\n\t\n\t}",
"public static int listEvenNumber( IntNode head ) {\r\n\t\tif( head == null )\r\n\t\t\treturn 0;\r\n\t\t\r\n\t\tint eCnt = 0;\r\n\t\tfor( IntNode cursor = head; cursor != null; cursor = cursor.link ) {\r\n\t\t\tif( cursor.data % 2 == 0 )\r\n\t\t\t\teCnt++;\r\n\t\t} // end for\r\n\t\treturn eCnt;\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tInteger n;\nScanner sc= new Scanner (System.in);\n System.out.print (\"Introdusca un Numero\");\n\t\tn = sc. nextInt();\n\t\tif (n%2==0);\n\t\t\tSystem.out.print(\"Es un numero par\");\n\t\n\telse\n\t\t\tSystem.out.print(\"es un numero impar\");\n\t\t\n\n\t}"
]
| [
"0.79263765",
"0.7827762",
"0.7513354",
"0.74541974",
"0.7400156",
"0.7397862",
"0.7337798",
"0.7325783",
"0.7304134",
"0.7291167",
"0.72676146",
"0.7229846",
"0.7207441",
"0.7200086",
"0.7198447",
"0.7173909",
"0.7140642",
"0.7085181",
"0.7076805",
"0.70655584",
"0.7031461",
"0.7007405",
"0.69908684",
"0.69776326",
"0.6954519",
"0.6938298",
"0.6916017",
"0.68691945",
"0.6864931",
"0.68607545",
"0.6822327",
"0.68206584",
"0.68168074",
"0.68099564",
"0.6785305",
"0.67847747",
"0.6782391",
"0.67384404",
"0.66659945",
"0.6663205",
"0.665673",
"0.66370475",
"0.6612217",
"0.660329",
"0.6599178",
"0.65976375",
"0.65787536",
"0.65560645",
"0.6554067",
"0.65473473",
"0.6525523",
"0.6489867",
"0.6479564",
"0.64695674",
"0.6454083",
"0.6453564",
"0.64527017",
"0.6446917",
"0.6400631",
"0.6394675",
"0.63939553",
"0.63936025",
"0.6378153",
"0.6362669",
"0.6353105",
"0.63196117",
"0.63147515",
"0.63101286",
"0.630431",
"0.63016754",
"0.6295061",
"0.62909603",
"0.62873083",
"0.6285252",
"0.62723535",
"0.62558687",
"0.62313527",
"0.6224922",
"0.6222801",
"0.6205476",
"0.61749053",
"0.6167028",
"0.6161605",
"0.6155206",
"0.61396664",
"0.61311203",
"0.6123549",
"0.6121244",
"0.61181706",
"0.60901695",
"0.60877913",
"0.60664105",
"0.6050802",
"0.60230035",
"0.60201764",
"0.6005858",
"0.5993684",
"0.59689236",
"0.59662324",
"0.5955886"
]
| 0.7070868 | 19 |
creamos el objeto vehiculo | private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {
miVehiculo = new Vehiculo(placa,tipo,color, numdoc);
showProgressDialog();
//empresavehiculo
//1. actualizar el reference, empresavehiculo
//2. mDatabase.child("ruc").child("placa").setValue
mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
hideProgressDialog();
if (task.isSuccessful()) {
Toast.makeText(getApplicationContext(),"Se registro Correctamente...!",Toast.LENGTH_LONG).show();
//
setmDatabase(getDatabase().getReference("empresasvehiculos"));
//
mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario("ruc")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
hideProgressDialog();
if (task.isSuccessful()) {
Toast.makeText(getApplicationContext(),"Se registro Correctamente...!",Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getApplicationContext(), "Error intente en otro momento...!", Toast.LENGTH_LONG).show();
}
}
});
} else {
Toast.makeText(getApplicationContext(), "Error intente en otro momento...!", Toast.LENGTH_LONG).show();
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }",
"public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}",
"public void interactuarCon(Vehiculo4x4 vehiculo) {\r\n Vehiculo nuevoVehiculo = VehiculoMoto.nuevoVehiculo(vehiculo);\r\n this.actualizarMovimiento(nuevoVehiculo, vehiculo);\r\n observador.cambiarVehiculo(nuevoVehiculo);\r\n Logger.instance.log(\"Cambio de vehiculo! Ahora es una moto.\\n\");\r\n }",
"private static Vehiculo generarDatosVehiculo() throws VehiculoException{\n \n System.out.print(\"Introduzca el numero de bastidor: \");\n String bastidor = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de matricula: \");\n String matricula = teclado.nextLine();\n\n System.out.print(\"Introduzca la marca: \");\n String marca = teclado.nextLine();\n\n System.out.print(\"Introduzca el modelo: \");\n String modelo = teclado.nextLine();\n\n System.out.print(\"Introduzca el color: \");\n String color = teclado.nextLine();\n\n System.out.print(\"Introduzca la cilindrada: \");\n String cilindrada = teclado.nextLine();\n\n System.out.print(\"Introduzca el tipo de motor: \");\n String motor = teclado.nextLine();\n\n System.out.print(\"Introduzca la potencia: \");\n int potencia = Integer.parseInt(teclado.nextLine());\n\n System.out.print(\"Introduzca los extras instalados: \");\n String extras = teclado.nextLine();\n\n System.out.print(\"Introduzca el precio: \");\n double precio = teclado.nextDouble();\n\n System.out.print(\"Introduzca el tipo de vehiculo: \");\n String tipo = teclado.nextLine();\n\n System.out.print(\"Introduzca el estado del vehiculo: \");\n String estado = teclado.nextLine();\n\n Vehiculo vehiculo = new Vehiculo(bastidor, matricula, marca, modelo, color, precio, extras, motor, potencia, cilindrada, tipo, estado);\n vehiculoController.validarVehiculo(vehiculo);\n\n return vehiculo;\n }",
"public void ingresaVehiculo (){\r\n \r\n Vehicle skate = new Skateboard(\"vanz\", \"2009\", \"1 metro\");\r\n Vehicle carro = new Car(\"renault\", \"2009\", \"disel\",\"corriente\" );\r\n Vehicle jet = new Jet(\"jet\", \"2019\", \"premiun\", \"ocho motores\");\r\n Vehicle cicla = new Bicycle(\"shimano\", \"2010\",\"4 tiempos\" ) ; \r\n Vehuculo.add(skate);\r\n Vehuculo.add(carro);\r\n Vehuculo.add(jet);\r\n Vehuculo.add(cicla); \r\n \r\n /*\r\n for en el cual se hace el parceo y se instancia la clase Skateboard\r\n \r\n */\r\n for (Vehicle Vehuculo1 : Vehuculo) {\r\n if(Vehuculo1 instanceof Skateboard){\r\n Skateboard skatevehiculo = (Skateboard)Vehuculo1;\r\n skatevehiculo.imprimirPadre();\r\n skatevehiculo.imprimirSkate();\r\n skatevehiculo.imprimirInterfaz();\r\n }\r\n /*\r\n se intancia y se hace el parceo de la clase car\r\n \r\n */\r\n else if(Vehuculo1 instanceof Car){\r\n \r\n Car carvhiculo = (Car)Vehuculo1;\r\n carvhiculo.imprimirPadre();\r\n carvhiculo.imprimirCarro();\r\n carvhiculo.imprimirVehiculopotenciado();\r\n \r\n \r\n \r\n }\r\n /*se intancia y se hace el parceo de la clase\r\n \r\n */\r\n else if(Vehuculo1 instanceof Jet){\r\n \r\n Jet jethiculo = (Jet)Vehuculo1;\r\n jethiculo.imprimirPadre();\r\n jethiculo.imprimirJet();\r\n jethiculo.imprimirVehiculopotenciado();\r\n jethiculo.imprimirInterfaz();\r\n }\r\n else if(Vehuculo1 instanceof Bicycle){\r\n \r\n Bicycle ciclavehiculo = (Bicycle)Vehuculo1;\r\n ciclavehiculo.imprimirPadre();\r\n ciclavehiculo.imprimirBici();\r\n }\r\n }\r\n \r\n \r\n }",
"Vehiculo findVehiculoById(long vehiculo_id) throws BusinessException;",
"public void interactuarCon(VehiculoMoto vehiculo) {\r\n Vehiculo nuevoVehiculo = VehiculoAuto.nuevoVehiculo(vehiculo);\r\n this.actualizarMovimiento(nuevoVehiculo, vehiculo);\r\n observador.cambiarVehiculo(nuevoVehiculo);\r\n Logger.instance.log(\"Cambio de vehiculo! Ahora es un auto.\\n\");\r\n }",
"public static void mostrarVehiculos() {\n for (Vehiculo elemento : vehiculos) {\n System.out.println(elemento);\n }\n\t}",
"public void vincular() {\n\n\t\ttry {\n\t\t\tList<Veiculo> veiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tList<Motorista> motoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja vincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (motorista.getVeiculo() == null) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista selecionado com sucesso.\");\n\n\t\t\t\t\t\t\tSystem.out.println(\"Digite a placa do veiculo que deseja vincular ao motorista \"\n\t\t\t\t\t\t\t\t\t+ motorista.getNome());\n\t\t\t\t\t\t\tString placa = entrada.next();\n\t\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\t\tif (veic.getPlaca().equals(placa)) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\t\tveiculo = veic;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (veiculo == null) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo nao encontrado!\");\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// RN004\n\t\t\t\t\t\t\t\tif (veiculo.getMotorista() == null) {\n\t\t\t\t\t\t\t\t\t// RN001\n\t\t\t\t\t\t\t\t\tif (Character.toLowerCase(motorista.getCategoria_Habilitacao()) == 'c') {\n\t\t\t\t\t\t\t\t\t\tveiculo.setMotorista(motorista);\n\t\t\t\t\t\t\t\t\t\tmotorista.setVeiculo(veiculo);\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Motorista registrado com sucesso.\");\n\n\t\t\t\t\t\t\t\t\t} else if (veiculo.getCarga() == 1\n\t\t\t\t\t\t\t\t\t\t\t&& Character.toLowerCase(motorista.getCategoria_Habilitacao()) == 'b') {\n\t\t\t\t\t\t\t\t\t\tveiculo.setMotorista(motorista);\n\t\t\t\t\t\t\t\t\t\tmotorista.setVeiculo(veiculo);\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Motorista registrado com sucesso.\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Tipo da CNH do motorista invalida.\");\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\tSystem.out.println(\"O veiculo desejado ja esta vinculado a um motorista.\");\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} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista ja esta vinculado a um veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}",
"public void interactuarCon(VehiculoAuto vehiculo) {\r\n Vehiculo nuevoVehiculo = Vehiculo4x4.nuevoVehiculo(vehiculo);\r\n this.actualizarMovimiento(nuevoVehiculo, vehiculo);\r\n observador.cambiarVehiculo(nuevoVehiculo);\r\n Logger.instance.log(\"Cambio de vehiculo! Ahora es una 4x4.\\n\");\r\n }",
"@Override\n\tpublic ResponseConsulta consultarVehiculos() {\n\t\tResponseConsulta respConsulta = new ResponseConsulta();\n\t\ttry {\n\t\t\tList<Vehiculo> listaVeiculos = vehiculoRepositorio.buscarTodasVehiculo();\n\t\t\trespConsulta.setListVehiculos(listaVeiculos);\n\t\t\trespConsulta.setMensaje(properties.msgExito);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(properties.errorGenerico + e);\n\t\t\trespConsulta.setMensaje(properties.errorGenerico);\n\t\t}\n\t\treturn respConsulta;\n\t}",
"@Override\r\n public VehiculoModel consultarVehiculo(String placa) {\n Connection conn = null;\r\n VehiculoModel vehiculo = null; //defino un objeto de vehiculo como nulo\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Select * from vehiculo where vehPlaca=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql); //se prepara para la query\r\n statement.setString(1, placa);\r\n ResultSet result = statement.executeQuery(sql);\r\n while(result.next()){\r\n vehiculo = new VehiculoModel(result.getString(1), result.getString(2), result.getString(3), \r\n result.getInt(4), result.getInt(5), result.getString(6), result.getInt(7));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError: \" + ex.getMessage());\r\n }\r\n \r\n return vehiculo;\r\n }",
"private void doNovo() {\n contato = new ContatoDTO();\n popularTela();\n }",
"public static void main (String[] args){\n Vehiculo misVehiculos[] = new Vehiculo[4];\n\n misVehiculos[0] = new Vehiculo (\"XYS34\", \"Volkswagen\", \"Jetta\");\n misVehiculos[1] = new VehiculoTurismo(\"AVF76\", \"Ford\", \"Fiesta\", 4);\n misVehiculos[2] = new VehiculoDeportivo(\"AJK12\", \"Ferrari\", \"A89\", 500);\n misVehiculos[3] = new VehiculoFurgoneta(\"LKU90\", \"Toyota\", \"J9\", 2000);\n\n for(Vehiculo vehiculos: misVehiculos){\n System.out.println(vehiculos.mostrarDatos());\n System.out.println(\" \");\n }\n\n }",
"@Override\r\n public void agregarVehiculo(VehiculoModel vehiculo) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Insert into vehiculo(veh_placa, veh_marca, veh_modelo, veh_anio, veh_capacidad, veh_color, veh_kilometros) values (?, ?, ?, ?, ?, ?, ?)\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, vehiculo.getVehPlaca());\r\n statement.setString(2, vehiculo.getVehMarca());\r\n statement.setString(3, vehiculo.getVehModelo());\r\n statement.setInt(4, vehiculo.getVehAnio());\r\n statement.setInt(5, vehiculo.getVehCapacidad());\r\n statement.setString(6, vehiculo.getVehColor());\r\n statement.setInt(7, vehiculo.getVehKilometros());\r\n //para insert into se usa executeUpdate();\r\n int rowUpdated = statement.executeUpdate();\r\n if(rowUpdated > 0){\r\n JOptionPane.showMessageDialog(null, \"El registro fue \" \r\n + \" creado exitosamente.\");\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError : \" + ex.getMessage());\r\n }\r\n }",
"public Vehiculo() {\r\n }",
"public Veiculo() {\r\n\r\n }",
"public static Venta pedirDatosVenta() throws VentaException {\n\n System.out.print(\"Introduzca el dni del empleado: \");\n String dniEmpleado = teclado.nextLine();\n\n System.out.print(\"Introduzca el dni del cliente: \");\n String dniCliente = teclado.nextLine();\n\n System.out.print(\"Introduzca el numero de bastidor del vehiculo: \");\n String bastidor = teclado.nextLine();\n\n Venta venta = new Venta(null, dniEmpleado, dniCliente, bastidor);\n ventaController.validarVenta(venta);\n\n return venta;\n\n }",
"@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public void desvincular() {\n\t\tList<Motorista> motoristas = new ArrayList<>();\n\t\tList<Veiculo> veiculos = new ArrayList<>();\n\t\ttry {\n\t\t\tveiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tmotoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja desvincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\tif (veic.getPlaca().equals(motorista.getVeiculo().getPlaca())) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\tveiculo = veic;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (motorista.getVeiculo() != null) {\n\t\t\t\t\t\t\tveiculo.setMotorista(null);\n\t\t\t\t\t\t\tmotorista.setVeiculo(null);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista desvinculado com sucesso.\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista nao esta vinculado a nenhum veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}",
"public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);",
"public Tecnico(){\r\n\t\tthis.matricula = 0;\r\n\t\tthis.nome = \"NULL\";\r\n\t\tthis.email = \"NULL\";\r\n\t\tthis.telefone = \"TELEFONE\";\r\n\t\tlistaDeServicos = new ArrayList<Servico>();\r\n\t}",
"Videogioco findVideogiocoById(int id);",
"public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public VistaConsultarMovimientosPorCliente() {\n initComponents();\n continuarInicializandoComponentes();\n }",
"Vehicle createVehicle();",
"Vehicle createVehicle();",
"public Vehiculo buscarVehiculo(String patente) {\n return vehiculos.get(patente);\n }",
"public void solicitarDatos() {\n Scanner scanner = new Scanner(System.in);\n Terreno terreno = new Terreno();\n Vivienda vivienda = new Vivienda();\n\n //preguntamos datos:\n System.out.println(\"Metros cuadrados: \");\n Integer m2 = scanner.nextInt();\n\n System.out.println(\"Precio: \");\n Double precio = scanner.nextDouble();\n\n System.out.println(\"Nombre del pueblo: \");\n String nombrePueblo = scanner.next();\n\n System.out.println(\"ID: \");\n Integer id = scanner.nextInt();\n\n //escogemos opción:\n\n System.out.println(\"Estás creando un Terreno(t) o una Vivienda(v)?: \");\n String opcion = scanner.next();\n //controlamos que la opción introducida sea válida y el precio mayor que 0 en ambos casos:\n //(si el precio es menor a 0, directamente no se crea el objeto a la hora de añadir)\n if (opcion.equals(\"t\") && precio > 0) {\n terreno.solicitarDatos(m2, precio, nombrePueblo, id);\n } else if (opcion.equals(\"v\") && precio > 0) {\n vivienda.solicitarDatos(m2, precio, nombrePueblo, id);\n } else {\n System.out.println(\"El precio es menor a 0 o no has introducido una opción correcta\");\n }\n }",
"public CarroVO getFormCarro() {\n try {\n String placa = cadastroView.getTxtPlaca().getText().trim();\n String cor = (String) cadastroView.getCbCor().getSelectedItem();\n ModeloVO modelo = (ModeloVO) cadastroView.getCbModelo().getSelectedItem();\n MarcaVO marca = (MarcaVO) cadastroView.getCbMarca().getSelectedItem();\n modelo.setMarca(marca);\n return new CarroVO(placa, cor, modelo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public void cargarEConcepto() {\n\tevidenciaConcepto = true;\n\tif (conceptoSeleccionado.getOrigen().equals(\n\t OrigenInformacionEnum.CONVENIOS.getValor())) {\n\t idEvidencia = convenioVigenteDTO.getId();\n\t nombreFichero = iesDTO.getCodigo() + \"_\"\n\t\t + convenioVigenteDTO.getId();\n\t}\n\n\ttry {\n\t listaEvidenciaConcepto = institutosServicio\n\t\t .obtenerEvidenciasDeIesPorIdConceptoEIdTabla(\n\t\t iesDTO.getId(), conceptoSeleccionado.getId(),\n\t\t idEvidencia, conceptoSeleccionado.getOrigen());\n\n\t} catch (ServicioException e) {\n\t LOG.log(Level.SEVERE, e.getMessage(), e);\n\t}\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }",
"public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }",
"public Carro getCarro() {\n return carro;\n }",
"List<VoziloDto> sveVozila();",
"public static void menuVentas() throws PersistenciaException, VehiculoException, VentaException {\n boolean salir = false;\n int opcion;\n Vehiculo vehiculo;\n Venta venta;\n\n while (!salir) {\n System.out.println(\"\\n1. Vender Vehiculo\");\n System.out.println(\"2. Vehiculos vendidos\");\n System.out.println(\"3. Listado de vehiculos\");\n System.out.println(\"4. Salir\\n\");\n venta=null;\n vehiculo = null;\n try {\n System.out.print(\"Introduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n\n switch (opcion) {\n case 1:\n venta = pedirDatosVenta();\n vehiculo = vehiculoController.buscar(venta.getBastidor());\n vehiculo.setEstado(\"Vendido\");\n ventaController.insertar(venta);\n vehiculoController.modificar(vehiculo);\n System.out.println(\"Venta completada\");\n break;\n case 2:\n System.out.println(\"Lista vehiculos vendidos\");\n ArrayList<String> ventasAgrupadas = ventaController.agruparVentas();\n for (String grupo : ventasAgrupadas) {\n System.out.println(grupo);\n }\n break;\n case 3:\n System.out.println(\"Lista de vehiculos: \");\n ArrayList<Vehiculo> vehiculos = vehiculoController.listadoVehiculos();\n for (Vehiculo vehiculo2 : vehiculos) {\n System.out.println(vehiculo2.toString());\n }\n break;\n case 4:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 4\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }",
"public Veiculo(int numPassageiros, String modeloVeiculo, String tipo){\n this.numPassageiros = numPassageiros;\n this.tipo = tipo;\n this.modeloVeiculo = modeloVeiculo;\n }",
"public Mach buscarEmpleado(Vacante vacante) {\r\n\t\tSystem.out.println(\"buscando empleo\");\r\n\t\tMach ELpapa = null;\r\n\t\tMach nuevo = null;\r\n\t\tArrayList<Mach> maches = new ArrayList<>();\r\n\t\tfor (Persona persona : personas) {\r\n\t\t\tSystem.out.println(\"aqui\");\r\n\t\t\tif (persona instanceof Obrero) {\r\n\t\t\t\tif (vacante instanceof vacanteObrero) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui obrero\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteObrero) vacante).getHabilidades())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Tecnico) {\r\n\t\t\t\tif (vacante instanceof vacanteTecnico) {\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteTecnico) vacante).getArea_desarrollo())) {\r\n\t\t\t\t\t\tSystem.out.println(\"esoty aqui tecnico\");\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Universitario) {\r\n\t\t\t\tif (vacante instanceof vancanteUniversitario) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui univeristario\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vancanteUniversitario) vacante).getCarreraUniv())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tELpapa = buscarmayorIndiceDeMACHES(maches);\r\n\t\tif (ELpapa != null) {\r\n\t\t\tSystem.out.println(\"no es null\");\r\n\t\t}\r\n\t\treturn ELpapa;\r\n\t}",
"public Hipermercado(){\r\n this.clientes = new CatalogoClientes();\r\n this.produtos = new CatalogoProdutos();\r\n this.numFiliais = 3;\r\n this.faturacao = new Faturacao(this.numFiliais);\r\n this.filial = new ArrayList<>(this.numFiliais);\r\n for (int i = 0; i < this.numFiliais; i++){\r\n this.filial.add(new Filial());\r\n }\r\n \r\n this.invalidas = 0;\r\n }",
"public Evento getEvento() { \n\t\t Evento evento = new Evento();\n\t\t List<Prenda> Lprendas = new ArrayList<Prenda>();\n\t\t Sugerencia sug = new Sugerencia();\n\t Prenda prend = new Prenda();\n Categoria categoria = new Categoria();\n\n categoria.setCodCategoria(1);\n categoria.setDescripcion(\"Zapatillas\");\n TipoPrenda tp = new TipoPrenda();\n tp.setDescripcion(\"lalal\");\n tp.setCategoria(categoria);\n tp.setCodTipoPrenda(1);\n \n \n Guardarropa guard = new Guardarropa();\n guard.setCompartido(false);\n guard.setDescripcion(\"guardarropa\");\n guard.setId(0); \n prend.setGuardarropa(guard);\n prend.setColorPrimario(\"rojo\");\n prend.setTipoPrenda(tp);\n prend.setColorSecundario(\"azul\");\n prend.setDescripcion(\"prenda 1\");\n prend.setNumeroDeCapa(EnumCapa.Primera);\n \tfor( int i = 0 ; i <= 4; i++) {\n prend.setCodPrenda(i);\n\t\t\tLprendas.add(prend);\t\t\t\n\t\t}\n \tsug.setIdSugerencia(1);\n \tsug.setMaxCapaInferior(0);\n \tsug.setMaxCapaSuperior(2);\t\n \tsug.setUsuario(new Usuario());\n \tsug.setListaPrendasSugeridas(Lprendas);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n \tevento.AgregarSugerenciaAEvento(sug);\n\n \t return evento;\n\t }",
"public ObjetoVida getObjeto(){\r\n\t\treturn objeto;\r\n\t}",
"public void novo() {\n cliente = new Cliente();\n }",
"private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}",
"public Cgg_veh_categoria(){}",
"public void MostrarDatos(){\n // En este caso, estamos mostrando la informacion necesaria del objeto\n // podemos acceder a la informacion de la persona y de su arreglo de Carros por medio de un recorrido\n System.out.println(\"Hola, me llamo \" + nombre);\n System.out.println(\"Tengo \" + contador + \" carros.\");\n for (int i = 0; i < contador; i++) {\n System.out.println(\"Tengo un carro marca: \" + carros[i].getMarca());\n System.out.println(\"El numero de placa es: \" + carros[i].getPlaca()); \n System.out.println(\"----------------------------------------------\");\n }\n }",
"public PeticionesAmistad(vPrincipal vista, VFrame cuadro) {\n initComponents();\n this.vista = vista;\n ventana = cuadro;\n not_nuevoAmigo.setVisible(false);\n not_envioPeticion.setVisible(false);\n modelo = new DefaultListModel();\n modeloBuscar = new DefaultListModel();\n try {\n ArrayList<String> peticiones = vista.getServidor().getPeticiones(vista.getUsuario().getNombre());\n for(String s : peticiones)\n modelo.addElement(s);\n listaPeticiones.setModel(modelo);\n } catch (RemoteException ex) {\n Logger.getLogger(PeticionesAmistad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }",
"public void setCarro(Carro carro) {\n this.carro = carro;\n }",
"public GestorDeConseptos() {\n initComponents();\n service=new InformeService(); \n m=new ConseptoTableModel();\n this.jTable1.setModel(m);\n cuentas=new Vector<ConseptoEnCuenta>();\n }",
"DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;",
"public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }",
"private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }",
"public Ventas() {\n setIdVenta(1);\n setIdCliente(1);\n setFecha(new Date());\n setEstado(0); \n }",
"public void addVehicule(Vehicule vehicule) { listeVehicule.add(vehicule); }",
"public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }",
"public AfiliadoVista() {\r\n }",
"public void carregarCadastro() {\n\n try {\n\n if (codigo != null) {\n\n ClienteDao fdao = new ClienteDao();\n\n cliente = fdao.buscarCodigo(codigo);\n\n } else {\n cliente = new Cliente();\n\n }\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n\n }",
"List<Vehiculo>listar();",
"public Veiculo(String marca, String modelo, int ano, double valorParaLocacao) { // Criando os construtores\n this.marca = marca;\n this.modelo = modelo;\n this.ano = ano;\n this.valorParaLocacao = valorParaLocacao;\n\n }",
"private void buscarCliente(String id) {\r\n\t\ttry {\r\n\t\t\tif(txtNif.getText().equals(\"\")){\r\n\t\t\t\tString mensaje = \"Por favor, introduce el nif\";\r\n\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\t\t\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tCliente cliente = new Cliente();\r\n\t\t\t\tcliente=manager.getClienteById(id);\r\n\t\t\t\tmodel.removeAllElements();\r\n\t\t\t\tif(cliente.getNif().equals(null)) {\r\n\t\t\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"NO EXISTE ESE CLIENTE\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\tmodel.addElement(cliente);\t\t\t\t\r\n\t\t\t\tcliente.toString();\r\n\t\t\t\ttxtNif.setText(\"\");\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\t\t\r\n\t}",
"public Socio(String nombre, int id_socio)\r\n {\r\n this.nombre = nombre;\r\n this.id_socio = id_socio;\r\n motos = new ArrayList<Moto>();\r\n System.out.println(\"Socio creado \" + id_socio + \" \" + nombre + \"\\n\");\r\n }",
"public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}",
"public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }",
"public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}",
"public void cargarProductosEnVenta() {\n try {\n //Lectura de los objetos de tipo producto Vendido\n FileInputStream archivo= new FileInputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n this.productosEnVenta = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"ERROR: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }",
"public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}",
"@Override\r\n\tpublic SitioParqueoEntidad registrarIngresoVehiculo(Vehiculo vehiculo) {\r\n\r\n\t\tboolean parquear = ReglaEstacionamiento.validarIngreso(vehiculo);\r\n\r\n\t\tif (!parquear) {\r\n\t\t\tthrow EstacionamientoExcepcion.INGRESO_NO_AUTORIZADO.toException();\r\n\t\t}\r\n\r\n\t\tVehiculoEntidad vehiculoEnt = vehiculoEntidadService.guardar(vehiculo);\r\n\r\n\t\tSitioParqueoEntidad sitParEnt = adminEstacionamiento.parquearVehiculo(vehiculoEnt);\r\n\r\n\t\treturn sitioParqueoEntidadService.parquearVehiculo(sitParEnt);\r\n\t}",
"public Vehicle(){}",
"List<Videogioco> retriveByNome(String nome);",
"List<Pacote> buscarPorTransporte(Transporte transporte);",
"private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }",
"public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }",
"public static void menuVehiculos() throws VehiculoException, PersistenciaException, DniException, BastidorException {\n boolean salir = false;\n int opcion;\n Vehiculo vehiculo;\n\n while (!salir) {\n System.out.println(\"\\n1. Insertar vehiculo nuevo\");\n System.out.println(\"2. Modificar vehiculo\");\n System.out.println(\"3. Elimininar vehiculo\");\n System.out.println(\"4. Listado de vehiculos\");\n System.out.println(\"5. Salir\\n\");\n vehiculo = null;\n String bastidor=null;\n\n try {\n System.out.print(\"Introduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n \n switch (opcion) {\n case 1:\n vehiculo = generarDatosVehiculo();\n vehiculoController.insertar(vehiculo);\n System.out.println(\"\\nVehiculo insertado\");\n break;\n case 2:\n System.out.println(\"Proceda a introducir los datos, el numero de bastidor debe mantenerse igual\");\n vehiculo = generarDatosVehiculo();\n vehiculoController.modificar(vehiculo);\n System.out.println(\"\\nVehiculo modificado\");\n break;\n case 3:\n System.out.print(\"Introduzca el numero de bastidor del vehiculo: \");\n bastidor = teclado.next();\n validarBastidor(bastidor);\n vehiculoController.eliminar(vehiculoController.buscar(bastidor));\n System.out.println(\"\\nVehiculo eliminado\");\n break;\n case 4:\n System.out.println(\"Lista de vehiculos: \");\n ArrayList<Vehiculo> vehiculos = vehiculoController.listadoVehiculos();\n for (Vehiculo vehiculo2 : vehiculos) {\n System.out.println(vehiculo2.toString());\n }\n break;\n case 5:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 5\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }",
"public void consultaDinero(){\r\n System.out.println(this.getMonto());\r\n }",
"List<Oficios> buscarActivas();",
"private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }",
"public Vehicle getVehicle() {\n\t\treturn new Vehicle(\"越野车\",\"LSW12333\",\"通用凯迪拉克\");\r\n\t}",
"public Espacio (int id, int capacidad, int ocupacion, TipoEspacio tipo, Localizacion localizacion){\n this.id = id;\n this.capacidad = capacidad;\n this.ocupacion = ocupacion;\n this.TIPO = tipo;\n this.localizacion = localizacion;\n }",
"public Arquero(){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }",
"public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }",
"public RendezVous() {\r\n this.no_rdv = 0;\r\n this.date_arr = \"\";\r\n this.date_dep = \"\";\r\n this.motif = \"\";\r\n\r\n }",
"public boolean actualizarVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n return modeloCarro.actualizarCarro((clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n return false;\n }",
"public static void main(String args[])\n {\n //instanciar (crear) el objeto empleados_comcel de la clase empleados\n //instanciar el objeto empleados_comcel de la clase empleados\n empleados empleados_comcel = new empleados();\n \n //acciones al objeto empleados_comcel asignando valores\n //empleados_comcel.cedula=5555;\n //empleados_comcel.nombre=\"felipe completo\";\n //empleados_comcel.sueldo=50000;\n //llamando las acciones\n /*int intTotalSueldo = empleados_comcel.calcularSueldo();\n System.out.println(\"total sueldo \"+intTotalSueldo);*/\n \n Scanner scanner = new Scanner(System.in);\n System.out.println(\"ingrese prestamos\");\n int prestamos = scanner.nextInt();\n\n \n int intTotalSueldo2 = empleados_comcel.calcularSueldo(prestamos, 5, 70000);\n System.out.println(\"total sueldo \"+intTotalSueldo2);\n\n \n //instanciar\n vehiculo transmilenio = new vehiculo();\n transmilenio.kmsActualmente=20000;\n transmilenio.modelo=2005;\n \n vehiculo sitp = new vehiculo();\n \n \n /*Scanner scanner = new Scanner(System.in);\n System.out.println(\"ingrese numero 1\");\n int numero_entero1 = scanner.nextInt();\n System.out.println(\"ingrese numero 2\");*/\n int numero_entero2 = scanner.nextInt();\n int suma = 0;\n \n System.out.println(\"resultado suma \"+suma);\n \n String nombre = \"\";\n System.out.println(\"Ingresar nombre \");\n nombre =scanner.next();\n System.out.println(\"Ingresó el nombre \"+nombre);\n \n float numero1float=233.44f;\n float numero2float=23.2f;\n float resultadofloat = numero1float + numero2float;\n System.out.println(\"resultado float \"+resultadofloat);\n \n }",
"private static Vehicle GetNewVehicle()\n {\n System.out.println(\"What type of vehicle is this?\");\n System.out.println(\" - Enter 1 for 'Car'\");\n System.out.println(\" - Enter 2 for 'Truck'\");\n System.out.println(\" - Enter 3 for 'Motorcycle'\");\n int vType = in.nextInt();\n in.nextLine(); //clear buffer or loop will break\n Vehicle v = null;\n switch (vType)\n {\n case 1:\n v = new Car();\n break;\n case 2:\n v = new Truck();\n System.out.println(\"Is this a four wheel drive?\");\n String s = in.nextLine();\n if (s.toUpperCase().indexOf(\"Y\") == 0)\n {\n Truck t = (Truck)v;\n t.toggleFourWheelDrive(true);\n }\n break;\n case 3:\n v = new Motorcycle();\n break;\n }\n System.out.println(\"What is the VIN?\");\n v.setVIN(in.nextLine());\n System.out.println(\"What is the Make?\");\n v.setMake(in.nextLine());\n System.out.println(\"What is the Model?\");\n v.setModel(in.nextLine());\n System.out.println(\"What is the Year\");\n v.setYear(in.nextInt());\n in.nextLine(); //clear buffer\n System.out.println(\"What is the Mileage\");\n v.setMileage(in.nextDouble());\n in.nextLine(); //clear buffer\n return v;\n }",
"public ControladorClientes(Vista vistaCliente) {\r\n\t\tthis.vistaCliente = vistaCliente;\r\n\t\tthis.clienteDao = new ClienteDAO();\r\n\t}",
"public List<ColunasMesesBody> getClientexIndustria(String periodo, String perfil, String cdVenda) {\n\t\tList<ClienteDetalhado> getCarteira = new ArrayList<>();\n\t\tgetCarteira = new PlanoDeCoberturaConsolidado().getClientesPlanCobConsolidado(perfil, cdVenda);\n\t\tSystem.err.println(getCarteira.size());\n\t\t\n\t\tList<ColunasMesesBody> planCobCliFat = new ArrayList<>();\n\t\t\n\t\tfor (ClienteDetalhado c : getCarteira) {\n\t\t\tColunasMesesBody registro = new ColunasMesesBody();\n\t\t\tregistro.setCd_cliente(c.getCd_cliente());\n\t\t\tregistro.setDesc_cliente(c.getDesc_cliente());\n\t\t\tregistro.setFantasia(c.getFantasia());\n\t\t\tregistro.setTp_Cli(c.getTp_Cli());\n\t\t\tregistro.setCgc_cpf(c.getCgc_cpf());\n\t\t\tregistro.setTelefone(c.getTelefone());\n\t\t\tregistro.setGrupoCli(c.getGrupoCli());\n\t\t\tregistro.setSegmento(c.getSegmento());\n\t\t\tregistro.setArea(c.getArea());\n\t\t\tregistro.setCep(c.getCep());\n\t\t\tregistro.setLogradouro(c.getLogradouro());\n\t\t\tregistro.setNumero(c.getNumero());\n\t\t\tregistro.setBairro(c.getBairro());\n\t\t\tregistro.setMunicipio(c.getMunicipio());\n\t\t\tregistro.setDistrito(c.getDistrito());\n\t\t\tregistro.setCdVendedor(c.getCdVendedor());\n\t\t\tregistro.setVendedor(c.getVendedor());\n\t\t\tregistro.setNomeGuerraVend(c.getNomeGuerraVend());\n\t\t\tregistro.setDescGerencia(c.getDescGerencia());\n\t\t\tregistro.setCdEquipe(c.getCdEquipe());\n\t\t\tregistro.setDescEquipe(c.getDescEquipe());\n\t\t\t\n\t\t\t\t\n\t\t\tregistro.setColuna01(\"R$ 0,00\");\n\t\t\tregistro.setColuna02(\"R$ 0,00\");\n\t\t\tregistro.setColuna03(\"R$ 0,00\");\n\t\t\tregistro.setColuna04(\"R$ 0,00\");\n\t\t\tregistro.setColuna05(\"R$ 0,00\");\n\t\t\tregistro.setColuna06(\"R$ 0,00\");\n\t\t\tregistro.setColuna07(\"R$ 0,00\");\n\t\t\tregistro.setColuna08(\"R$ 0,00\");\n\t\t\tregistro.setColuna09(\"R$ 0,00\");\n\t\t\tregistro.setColuna10(\"R$ 0,00\");\n\t\t\tregistro.setColuna11(\"R$ 0,00\");\n\t\t\tregistro.setColuna12(\"R$ 0,00\");\n\t\t\tregistro.setColuna13(\"R$ 0,00\");\n\t\t\tregistro.setColuna14(\"R$ 0,00\");\n\t\t\tregistro.setColuna15(\"R$ 0,00\");\n\n\t\t\t\n\t\t\tplanCobCliFat.add(registro);\n\t\t}\n\t\t/* CARREGANDO A LISTA DE CLIENTES*/\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\tString inClintes = \"\";\n\t\t\tint tamanhoLista = getCarteira.size();\n\t\t\tint i = 1;\n\t\n\t\t\tfor (Cliente c : getCarteira) {\n\t\t\t\tif (i < tamanhoLista) {\n\t\t\t\t\tinClintes += c.getCd_cliente() + \", \";\n\t\t\t\t} else {\n\t\t\t\t\tinClintes += c.getCd_cliente();\n\t\t\t\t}\n\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\n\t\tString sql = \"select * from(\\r\\n\" + \n\t\t\t\t\"SELECT\\r\\n\" + \n\t\t\t\t\" --DATEPART(mm, no.dt_emis) as MES_Emissao,\\r\\n\" + \n\t\t\t\t\" f.descricao as FABRICANTE,\\r\\n\" + \n\t\t\t\t\"\t\tno.cd_clien AS Cod_Cliente, \\r\\n\" + \n\t\t\t\t\"\t cast(SUM((itn.qtde* itn.preco_unit) ) as NUMERIC(12,2)) as Valor\\r\\n\" + \n\t\t\t\t\"\tFROM\\r\\n\" + \n\t\t\t\t\"\t\tdbo.it_nota AS itn\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.nota AS no\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.nota_tpped AS ntped\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.tp_ped AS tp\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON ntped.tp_ped = tp.tp_ped\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.nu_nf = ntped.nu_nf\\r\\n\" + \n\t\t\t\t\"\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.cliente AS cl \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.ram_ativ AS rm\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.ram_ativ = rm.ram_ativ \t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.end_cli AS edc\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_clien = edc.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND edc.tp_end = 'FA'\t\t\t\t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN dbo.area AS ar \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_area = ar.cd_area\\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_grupocli = grupocli.cd_grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.cd_clien = cl.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.vendedor AS vd\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.equipe AS eq \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.gerencia AS ge \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON eq.cd_gerencia = ge.cd_gerencia\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND eq.cd_emp = ge.cd_emp\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_emp = eq.cd_emp \\r\\n\" + \n\t\t\t\t\"\t\t\t\tAND vd.cd_equipe = eq.cd_equipe \\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN grp_faix gr\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_grupo = gr.cd_grupo\\r\\n\" + \n\t\t\t\t\"\t\t\tON no.cd_vend = vd.cd_vend\t\t\t\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\tON itn.nu_nf = no.nu_nf \\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN produto p\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_prod=itn.cd_prod\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN fabric f\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_fabric = f.cd_fabric\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"WHERE \\r\\n\" + \n\t\t\t\t\"\tno.situacao IN ('AB', 'DP')\\r\\n\" + \n\t\t\t\t\"\tAND\tno.tipo_nf = 'S' \\r\\n\" + \n\t\t\t\t\"\tAND\tno.cd_emp IN (13, 20)\\r\\n\" + \n\t\t\t\t\"\tAND\tntped.tp_ped IN ('BE', 'BF', 'BS', 'TR', 'VC', 'VE', 'VP', 'VS', 'BP', 'BI', 'VB', 'SR','AS','IP','SL')\\r\\n\" + \n\t\t\t\t\"\tAND no.dt_emis BETWEEN \"+periodo+\"\t\\r\\n\" + \n\t\t\t\t\"\tand no.cd_clien IN (\"+inClintes+\")\\r\\n\" + \n\t\t\t\t\"\tAND f.descricao IN ('ONTEX GLOBAL', 'BIC','CARTA FABRIL','KIMBERLY','BARUEL','PHISALIA','SKALA', 'ALFAPARF', 'EMBELLEZE', 'BEAUTY COLOR', 'HYPERA S/A', 'STEVITA', 'PAMPAM', 'YPE', 'APOLO')\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\tGROUP BY\\r\\n\" + \n\t\t\t\t\"\t--DATEPART(dd,no.dt_emis),no.dt_emis,\\r\\n\" + \n\t\t\t\t\"\tf.descricao,\\r\\n\" + \n\t\t\t\t\"\t\\r\\n\" + \n\t\t\t\t\"\t no.cd_clien,\\r\\n\" + \n\t\t\t\t\"\tno.cd_emp,\\r\\n\" + \n\t\t\t\t\"\t no.nu_ped, \\r\\n\" + \n\t\t\t\t\"\t no.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.nome_gue,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_vend,\\r\\n\" + \n\t\t\t\t\"\t vd.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_equipe\\r\\n\" + \n\t\t\t\t\"\t \\r\\n\" + \n\t\t\t\t\") em_linha\\r\\n\" + \n\t\t\t\t\"pivot (sum(Valor) for FABRICANTE IN ([ONTEX GLOBAL], [BIC],[CARTA FABRIL],[KIMBERLY],[BARUEL],[PHISALIA],[SKALA],[ALFAPARF],[EMBELLEZE],[BEAUTY COLOR],[HYPERA S/A],[STEVITA],[PAMPAM],[YPE],[APOLO])) em_colunas\\r\\n\" + \n\t\t\t\t\"order by 1\";\t\t\n\t\t\n\t\tSystem.out.println(\"Processando Script Clientes: \" + sql);\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement stmt = connectionSqlServer.prepareStatement(sql);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\tString coluna;\n\n\n\t\t\t\tfor (ColunasMesesBody p:planCobCliFat ) {\n\t\t\t\t\tif(rs.getInt(\"Cod_Cliente\") == p.getCd_cliente()) {\n\t\t\t\t\t\tp.setColuna01(\"teve vendas\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tp.setColuna01(Formata.moeda(rs.getDouble(2)));\n\t\t\t\t\t\tp.setColuna02(Formata.moeda(rs.getDouble(3)));\n\t\t\t\t\t\tp.setColuna03(Formata.moeda(rs.getDouble(4)));\n\t\t\t\t\t\tp.setColuna04(Formata.moeda(rs.getDouble(5)));\n\t\t\t\t\t\tp.setColuna05(Formata.moeda(rs.getDouble(6)));\n\t\t\t\t\t\tp.setColuna06(Formata.moeda(rs.getDouble(7)));\n\t\t\t\t\t\tp.setColuna07(Formata.moeda(rs.getDouble(8)));\n\t\t\t\t\t\tp.setColuna08(Formata.moeda(rs.getDouble(9)));\n\t\t\t\t\t\tp.setColuna09(Formata.moeda(rs.getDouble(10)));\n\t\t\t\t\t\tp.setColuna10(Formata.moeda(rs.getDouble(11)));\n\t\t\t\t\t\tp.setColuna11(Formata.moeda(rs.getDouble(12)));\n\t\t\t\t\t\tp.setColuna12(Formata.moeda(rs.getDouble(13)));\n\t\t\t\t\t\tp.setColuna13(Formata.moeda(rs.getDouble(14)));\n\t\t\t\t\t\tp.setColuna14(Formata.moeda(rs.getDouble(15)));\n\t\t\t\t\t\tp.setColuna15(Formata.moeda(rs.getDouble(16)));\n\n\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\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t\treturn planCobCliFat;\n\n\t\t\n\t\t\n\t}",
"public static void muestraDatos(ObjectInputStream ois) throws IOException, ClassNotFoundException {\n while(true){\n Vehiculo ref=(Vehiculo)ois.readObject();\n \n JOptionPane.showMessageDialog(null, \"El vehiculo tiene una matricula \"+ref.getMatricula()+\n \", su marca es \"+ref.getMarca()+\" y su modelo es \"+ref.getModelo());\n }\n }",
"public static void main(String[] args) {\n Perro perro = new Perro(1, \"Juanito\", \"Frespuder\", 'M');\n Gato gato = new Gato(2, \"Catya\", \"Egipcio\", 'F', true);\n Tortuga paquita = new Tortuga(3, \"Pquita\", \"Terracota\", 'F', 12345857);\n\n SetJuego equipo = new SetJuego(4, \"Gato equipo\", 199900, \"Variado\", \"16*16*60\", 15, \"Gatos\");\n PelotaMorder pelotita = new PelotaMorder(1, \"bola loca\", 15000, \"Azul\", \"60 diam\");\n\n System.out.println(perro.toString());//ToString original de \"mascotas\"\n System.out.println(gato.toString());//ToString sobrescrito\n System.out.println(paquita.toString());\n\n System.out.println(equipo);//ToString sobrescrito (tambien se ejecuta sin especificarlo)\n System.out.println(pelotita.toString());//Original de \"Juguetes\"\n\n //metodos clase mascota\n perro.darCredito();//aplicado de la interface darcredito\n paquita.darDeAlta(\"Terracota\",\"Paquita\");\n equipo.devolucion(4,\"Gato Equipo\");\n\n //vamos a crear un arraylist\n ArrayList<String> servicios = new ArrayList<String>();\n servicios.add(\"Inyectologia\");\n servicios.add(\"Peluqueria\");\n servicios.add(\"Baño\");\n servicios.add(\"Desparacitacion\");\n servicios.add(\"Castracion\");\n\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n servicios.remove(3);//removemos el indice 3 \"Desparacitacion\"\n\n System.out.println(\"Se ha removido un servicio..................\");\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n\n //creamos un vector\n Vector<String> promociones = new Vector<String>();\n\n promociones.addElement(\"Dia perruno\");\n promociones.addElement(\"Gatutodo\");\n promociones.addElement(\"10% Descuento disfraz de perro\");\n promociones.addElement(\"Jornada de vacunacion\");\n promociones.addElement(\"Serpiente-Promo\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n promociones.remove(4);//removemos 4 \"Serpiente-Promo\"\n System.out.println(\"Se ha removido una promocion..................\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n String[] dias_Semana = {\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\", \"Sabado\",\"Domingo\"};\n\n try{\n System.out.println(\"Elemento 6 de servicios: \" + dias_Semana[8]);\n } catch (ArrayIndexOutOfBoundsException e){\n System.out.println(\"Ey te pasaste del indice, solo hay 5 elementos\");\n } catch (Exception e){\n System.out.println(\"Algo paso, el problema es que no se que...\");\n System.out.println(\"La siguiente linea ayudara a ver el error\");\n e.printStackTrace();//solo para desarrolladores\n }finally {\n System.out.println(\"------------------------El curso termino! Pero sigue el de Intro a Android!!!!--------------------------\");\n }\n\n }",
"private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }",
"public void CrearArco(String Identificador, E Dato, Double peso, Vertice Verticei, Vertice Verticef){\r\n this.Vi = Verticei;\r\n this.Vf = Verticef;\r\n this.id = Identificador;\r\n this.Dato = Dato;\r\n this.p = peso;\r\n }",
"public void crearCompraComic(CompraComicDTO compraComicDTO);",
"public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }",
"public Electrodomestico() {\r\n this.color = Colores.BLANCO;\r\n this.consumoEnergetico = Letra.F;\r\n this.precioBase = precioDefecto;\r\n this.peso = pesoDefecto;\r\n }",
"public Vehicle() {\n }",
"public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}",
"public Fogon (String cocineroActual){\n Cocinero = cocineroActual;\n grados = 0; \n }",
"public void llenarVuelos()\n\t{\n\t\tResultSet resultado = null;\n\t\ttry\n\t\t{\n\t\t\tvuelos.removeAllItems();\n\t\t\tresultado = controladorBD.consultarVuelos();\n\n\t\t\twhile (resultado.next())\n\t\t\t{\n\t\t\t\tString id = resultado.getString(\"vuelo_id\");\n\t\t\t\tDate fecha = resultado.getDate(\"fecha\");\n\t\t\t\tint cupoMax = resultado.getInt(\"cupoMax\");\n\t\t\t\tString origen = resultado.getString(\"origen\");\n\t\t\t\tString destino = resultado.getString(\"destino\");\n\t\t\t\tint cupoActual = resultado.getInt(\"cupo_actual\");\n\t\t\t\tString hora = resultado.getString(\"hora\");\n\n\t\t\t\tVuelo v = new Vuelo(id, fecha, cupoMax, origen, destino, cupoActual, hora);\n\t\t\t\tvuelos.addItem(v);\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error obteniendo vuelos\");\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error obteniendo vuelos\");\n\t\t} finally\n\t\t{\n\t\t\tif (resultado != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tresultado.close();\n\t\t\t\t} catch (SQLException e)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(PanelPasabordoVendedor.this, \"Error cerrando la conexión\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.7563272",
"0.70447075",
"0.7005459",
"0.69862163",
"0.69184333",
"0.69135284",
"0.6836585",
"0.68347037",
"0.6803534",
"0.6777847",
"0.66615194",
"0.66316015",
"0.65957785",
"0.6412122",
"0.63990134",
"0.63848406",
"0.6334034",
"0.6319914",
"0.6286803",
"0.626788",
"0.62502426",
"0.62465227",
"0.6231976",
"0.62062705",
"0.6182554",
"0.6178771",
"0.6175492",
"0.6170839",
"0.6170839",
"0.61518776",
"0.6135719",
"0.6087833",
"0.6072146",
"0.607164",
"0.60679275",
"0.60677195",
"0.60668373",
"0.60657716",
"0.60629886",
"0.6059851",
"0.6051502",
"0.602692",
"0.6022802",
"0.60226375",
"0.60140574",
"0.60105807",
"0.6009715",
"0.60020405",
"0.5980208",
"0.59652257",
"0.595822",
"0.5953928",
"0.59497577",
"0.5943534",
"0.59176135",
"0.59026766",
"0.5888559",
"0.5887178",
"0.58846635",
"0.5883414",
"0.5883158",
"0.5867542",
"0.58665854",
"0.58608973",
"0.58585566",
"0.58409816",
"0.58336276",
"0.5821197",
"0.58147144",
"0.5808987",
"0.5796924",
"0.57783717",
"0.5773519",
"0.576884",
"0.5768824",
"0.57650024",
"0.5764002",
"0.57627314",
"0.57618916",
"0.5758113",
"0.57565415",
"0.57558024",
"0.5754769",
"0.5742142",
"0.5735245",
"0.5730851",
"0.572495",
"0.57190454",
"0.5717296",
"0.57171047",
"0.57150245",
"0.5713731",
"0.5700229",
"0.5698484",
"0.5692816",
"0.5688949",
"0.56876534",
"0.5685943",
"0.5684743",
"0.5684306",
"0.5679128"
]
| 0.0 | -1 |
generating the hidden outputs | public double[] predict(double[] input_array) {
Matrix_instance input = new Matrix_instance(input_array);
Matrix_instance hidden = Matrix.Product(this.weights_ih, input);
hidden.adder(this.bias_h);
// activation function
hidden.applyFunction(i -> sigmoid(i));
Matrix_instance output = Matrix.Product(this.weights_ho, hidden);
output.adder(this.bias_o);
output.applyFunction(i -> sigmoid(i));
return output.toArray();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double[] getOutputSumDerivsForHiddenOutput() {\n\t\t//dOutputSum/dHiddenOutput\n\t\tdouble[] outputSumDerivs = new double[synapses[1][0].length];\n\t\t\n\t\tfor (int i = 0 ; i < outputSumDerivs.length; i++) {\n\t\t\toutputSumDerivs[i] = synapses[1][0][i].getWeight();\n\t\t}\n\t\t\n\t\treturn outputSumDerivs;\n\t}",
"Output getOutputs();",
"private void createHiddenLayer() {\r\n\t\tint layers = 1;\r\n\t\t\r\n\t\tint hiddenLayerSize = 0; \r\n\t\tint prevLayerSize = numAttributes;\r\n\t\t\r\n\t\tfor (int layer = 0; layer < layers; layer++) {\r\n\t\t\thiddenLayerSize = (numAttributes + numClasses) / 2;\r\n\t\t\t\r\n\t\t\tfor (int nob = 0; nob < hiddenLayerSize; nob++) {\r\n\t\t\t\tInnerNode temp = new InnerNode(String.valueOf(nextId), random);\r\n\t\t\t\tnextId++;\r\n\t\t\t\taddNode(temp);\r\n\t\t\t\tif (layer > 0) {\r\n\t\t\t\t\t// then do connections\r\n\t\t\t\t\tfor (int noc = innerNodes.size() - nob - 1 - prevLayerSize; noc < innerNodes.size() - nob - 1; noc++) {\r\n\t\t\t\t\t\tNeuralNode.connect(innerNodes.get(noc), temp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprevLayerSize = hiddenLayerSize;\r\n\t\t}\r\n\r\n\t\tif (hiddenLayerSize == 0) {\r\n\t\t\tfor (InputNode input : inputs) {\r\n\t\t\t\tfor (NeuralNode node : innerNodes) {\r\n\t\t\t\t\tNeuralNode.connect(input, node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (NeuralNode input : inputs) {\r\n\t\t\t\tfor (int nob = numClasses; nob < numClasses + hiddenLayerSize; nob++) {\r\n\t\t\t\t\tNeuralNode.connect(input, innerNodes.get(nob));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int noa = innerNodes.size() - prevLayerSize; noa < innerNodes.size(); noa++) {\r\n\t\t\t\tfor (int nob = 0; nob < numClasses; nob++) {\r\n\t\t\t\t\tNeuralNode.connect(innerNodes.get(noa), innerNodes.get(nob));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private void hideComputation() {\r\n\t\tshiftLeftSc.hide();\r\n\t\tshiftRowSc.hide();\r\n\t\ttmpMatrix.hide();\r\n\t\ttmpText.hide();\r\n\t}",
"public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }",
"boolean isHiddenNeuron();",
"M generateNoise();",
"public double calculateOutputForInstance(Instance inst)\r\n\t{\r\n\t\tint k =0;\r\n\t\tfor(Node input_temp: inputNodes)\r\n\t\t{\r\n\t\t\tif(input_temp.getType()==0)\r\n\t\t\t{\r\n\t\t\t\tinput_temp.setInput(inst.attributes.get(k));\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// set output\r\n\t\tfor(Node hidden_temp: hiddenNodes)\r\n\t\t{\r\n\t\t\thidden_temp.calculateOutput();\r\n\t\t}\r\n\r\n\t\toutputNode.calculateOutput();\r\n\t\t\r\n\t\treturn outputNode.getOutput();\r\n\r\n\t}",
"private List<Double> computeAllUnitsProbabilitiesFromHiddenLayer(List<Double> sample) {\n return Stream.iterate(0, j -> j = j + 1)\n .limit(cfg.numhid)\n .map(j -> equation3.evaluate(j, sample))\n .collect(toList());\n }",
"public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}",
"public void calcOutput()\n\t{\n\t}",
"public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}",
"NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }",
"public void calculateOutput() {\n inputSum = 0.0;\n //for output (linear) neuron\n if (layer == 0) {\n for (int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getInput()[i];\n }\n }\n //for Sigmoidal neurons\n else {\n for(int i = 0; i < inputs; ++i) {\n inputSum += weights[i] * network.getNeurons()[layer - 1][i].output;\n }\n }\n if (enableConstAddend) {\n inputSum += weights[inputs];\n }\n output = activate(inputSum);\n }",
"boolean isOutputNeuron();",
"private void outputMe() {\n\t\tif (changeCount > 2) changeCount = 4 - (changeCount & 1);\n\t\tif (outputValue) {\n\t\t\tSystem.out.append( trueArray[ changeCount ] );\n\t\t} else {\n\t\t\tSystem.out.append( falseArray[ changeCount ] );\n\t\t}\n\t\tchangeCount = 0;\n\t}",
"public static LinkedList2 generateNeighbors(LocNode state) {\n\t \n\t \n\t\n\t LinkedList2 Neighbors = new LinkedList2();\n\t \n\n\t\n\tchar [][] Matrix = state.getData(); \n\t\n\t\n\t\n\tchar [][] Neighbor = copyMatrix(Matrix);\n\n\t\t\n\t\tfor(int i=0 ;i<size ;i++ ) {\n\t\tfor (int j=0 ;j<size ;j++) {\n\t\t\tif (Neighbor[i][j]=='-'||Neighbor[i][j]=='v') {\n\t\t\t\tNeighbor[i][j]='c';\n\t\t\t\t\n\t\t\t\t\n\t updateVisibility(i,j,Neighbor);\n\t \n\t Neighbors.insert(Neighbor, calculateOpjectiveFunction(Neighbor));\n\t \n\t \n\t \n\t\t\t\tNeighbor = copyMatrix(Matrix);\n\t\n\t\t\t\n\t\t\t}\n\t\t}\t\n\t\t}\n\t\t\n\tLinkedList2 ApplyingRemoveAction=removeOneCamera(state.data);\n\t\n\n\tif(!ApplyingRemoveAction.empty()){\n\t\t\n\t\tApplyingRemoveAction.findFirst();\n\t\twhile(!ApplyingRemoveAction.last()) {\n\t\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t\t\t ApplyingRemoveAction.findNext();\n\t\t}\n\t\t\n\t\t Neighbors.insert(ApplyingRemoveAction.retrieve_data(), ApplyingRemoveAction.retrieve_opjectiveFunctoin());\n\t}\n\t\t\n\t\t\n\t return Neighbors;\n\t \n\t \n}",
"private void calculateOutputs(Instance instance, Hashtable<NeuralNode, Double> nodeValues) {\r\n\t\tfor (OutputNode output : outputs) {\r\n\t\t\toutput.getValue(instance, nodeValues);\r\n\t\t}\r\n\t}",
"public boolean hasOutputs() {\n return fieldSetFlags()[5];\n }",
"OutputDeviations createOutputDeviations();",
"public void generateOutputData() {\n\t\tArrayList<String> inputDataArray = new ArrayList<String>();\n\t\tif (removeDuplicates) {\n\t\t\tinputDataArray = removeDuplicates();\n\t\t} else {\n\t\t\tinputDataArray = inputDataValues;\n\t\t}\n\t\t\n\t\toutputDataValues.clear();\n\t\tString outputDataValue = \"\";\n\t\tif (inputDataArray.isEmpty()) {\n\t\t\toutputDataValue = getOutputDataValue(\"\");\n\t\t\toutputDataValues.add(outputDataValue);\n\t\t} else {\n\t\t\tfor (String inputDataValue: inputDataArray) {\n\t\t\t\toutputDataValue = getOutputDataValue(inputDataValue);\n\t\t\t\toutputDataValues.add(outputDataValue);\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<Double> calculateOutput(){\n for(int i = 0; i < inputSize; i++){\n network.get(0).get(i).setInput(inputs.get(i));\n }\n //Make it go through each node in the network and calculate output for each of them top down\n for(int i = 0; i < numOutputs; i++){\n output.set(i, network.get(layers-1).get(i).calculateOutput());\n }\n return output;\n }",
"public void initLayers() {\n\t\t/* Initialise the weights */\n\t Random rng = new Random(1);\n double distributeRandom = 1.0 / SIZE_INPUT_LAYER;\n\t\tweightsOfHiddenLayer = new double[SIZE_HIDDEN_LAYER][SIZE_INPUT_LAYER]; \n\t\tweightsOfOutputLayer = new double[SIZE_OUTPUT_LAYER][SIZE_HIDDEN_LAYER]; \n\t\t/* Initialise the biases */\n\t\tbiasOfHiddenLayer = new double[SIZE_HIDDEN_LAYER];\n\t\tbiasOfOutputLayer = new double[SIZE_OUTPUT_LAYER];\t\t\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_INPUT_LAYER; j++) {\n\t\t\t\tweightsOfHiddenLayer[i][j] = rng.nextDouble() * (distributeRandom - (-distributeRandom)) + (-distributeRandom);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < SIZE_OUTPUT_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_HIDDEN_LAYER; j++) {\n\t\t\t\tweightsOfOutputLayer[i][j] = rng.nextDouble() * (distributeRandom - (-distributeRandom)) + (-distributeRandom);\n\t\t\t}\n\t\t}\n\t}",
"public Element[] getOutputs(){\r\n \treturn new Element[] {first, second};\r\n }",
"private void createOutputLayer(Instances instances) throws Exception {\r\n\t\toutputs.clear();\r\n\t\tfor (int classIndex = 0; classIndex < numClasses; classIndex++) {\r\n\t\t\tString name;\r\n\t\t\tif (configuration.isNumeric()) {\r\n\t\t\t\tname = instances.classAttribute().name();\r\n\t\t\t} else {\r\n\t\t\t\tname = instances.classAttribute().value(classIndex);\r\n\t\t\t}\r\n\t\t\tOutputNode output = new OutputNode(name, classIndex, configuration);\r\n\t\t\t\r\n\t\t\tInnerNode temp = new InnerNode(String.valueOf(nextId), random);\r\n\t\t\tnextId++;\r\n\t\t\taddNode(temp);\r\n\t\t\tNeuralNode.connect(temp, output);\r\n\t\t\t\r\n\t\t\toutputs.add(output);\r\n\t\t}\r\n\r\n\t}",
"public ArrayList<Double> getOutputs()\n {\n return outputs;\n }",
"@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }",
"public static void main(String[] args) {\n\t\tfinal int input1 = 1;\r\n\t\tfinal int input2 = 1;\r\n\t\t\r\n\t\t// One output in layer 3\r\n\t\tdouble targetOutput = 0;\r\n\t\t\r\n\t\t// Input to Hidden (IH) weights\r\n\t\tdouble IH1 = 0.8;\r\n\t\tdouble IH2 = 0.4;\r\n\t\tdouble IH3 = 0.3;\r\n\t\tdouble IH4 = 0.2;\r\n\t\tdouble IH5 = 0.9;\r\n\t\tdouble IH6 = 0.5;\r\n\t\t\r\n\t\t// second iteration of weights: Hidden to Output (HO) weights\r\n\t\tdouble HO1 = 0.3;\r\n\t\tdouble HO2 = 0.5;\r\n\t\tdouble HO3 = 0.9;\r\n\t\t\r\n\t\t// initialization\r\n\t\tdouble weightedSum1;\r\n\t\tdouble weightedSum2;\r\n\t\tdouble weightedSum3;\r\n\t\t\r\n\t\tdouble hiddenOutput1;\r\n\t\tdouble hiddenOutput2;\r\n\t\tdouble hiddenOutput3;\r\n\t\t\r\n\t\tdouble calculatedOutput;\r\n\t\t\r\n\t\tdouble secondWeightedSum;\r\n\t\t\r\n\t\tdouble outputSumError;\r\n\t\t\r\n\t\tdouble deltaSum;\r\n\t\t\r\n\t\tdouble deltaHO1;\r\n\t\tdouble deltaHO2;\r\n\t\tdouble deltaHO3;\r\n\t\t\r\n\t\tdouble deltaIH1;\r\n\t\tdouble deltaIH2;\r\n\t\tdouble deltaIH3;\r\n\t\tdouble deltaIH4;\r\n\t\tdouble deltaIH5;\r\n\t\tdouble deltaIH6;\r\n\t\t\r\n\t\tfor (int i=0;i<10000;i++){\r\n\t\t\t// Three inputs in layer 2 (hidden layer)\r\n\t\t\tweightedSum1 = input1*IH1+input2*IH4;\r\n\t\t\tweightedSum2 = input1*IH2+input2*IH5;\r\n\t\t\tweightedSum3 = input1*IH3+input2*IH6;\r\n\t\t\t\r\n\t\t\t// weighted sums converted into probabilities by sigmoid\r\n\t\t\thiddenOutput1 = sigmoid(weightedSum1);\r\n\t\t\thiddenOutput2 = sigmoid(weightedSum2);\r\n\t\t\thiddenOutput3 = sigmoid(weightedSum3);\r\n\t\t\t// second iteration of weighted sum\r\n\t\t\tsecondWeightedSum = hiddenOutput1*HO1+hiddenOutput2*HO2+hiddenOutput3*HO3;\r\n\t\t\t\r\n\t\t\t// applying sigmoid on secondWeightedSum to get calculatedOutput\r\n\t\t\tcalculatedOutput = sigmoid(secondWeightedSum);\r\n\t\t\tSystem.out.println(calculatedOutput);\r\n\t\t\t// Back Propagation \r\n\t\t\t\r\n\t\t\t//output sum error = target output - calculated output\r\n\t\t\toutputSumError = targetOutput - calculatedOutput;\r\n\t\t\t\r\n\t\t\t// delta sum = S'(sum)*outputSumError \r\n\t\t\tdeltaSum = sigmoidPrime(secondWeightedSum)*outputSumError;\r\n\t\t\t\t\r\n\t\t/* deltaIHWeights (1,2,3 are equal to 4,5,6 respectively \r\n\t\t because input1 and input2 are both 1) */\r\n\t\tdeltaIH1 = deltaSum / HO1 * sigmoidPrime(weightedSum1);\r\n\t\tdeltaIH2 = deltaSum / HO2 * sigmoidPrime(weightedSum2);\r\n\t\tdeltaIH3 = deltaSum / HO3 * sigmoidPrime(weightedSum3);\r\n\t\tdeltaIH4 = deltaSum / HO1 * sigmoidPrime(weightedSum1);\r\n\t\tdeltaIH5 = deltaSum / HO2 * sigmoidPrime(weightedSum2);\r\n\t\tdeltaIH6 = deltaSum / HO3 * sigmoidPrime(weightedSum3);\r\n\t\t\r\n\t\t// deltaHOWeights\r\n\t\tdeltaHO1 = deltaSum / hiddenOutput1;\r\n\t\tdeltaHO2 = deltaSum / hiddenOutput2;\r\n\t\tdeltaHO3 = deltaSum / hiddenOutput3;\r\n\t\t\r\n\t\t// Modifying Old Weights \r\n\t\t\r\n\t\t// modifying IH weights\r\n\t\tIH1 += deltaIH1;\r\n\t\tIH2 += deltaIH2;\r\n\t\tIH3 += deltaIH3;\r\n\t\tIH4 += deltaIH4;\r\n\t\tIH5 += deltaIH5;\r\n\t\tIH6 += deltaIH6;\r\n\t\t\r\n\t\t// modifying HO weights\r\n\t\tHO1 += deltaHO1;\r\n\t\tHO2 += deltaHO2;\r\n\t\tHO3 += deltaHO3;\r\n\t\t\r\n\t\t}\r\n\t}",
"public boolean[] getOutput() {\n // PROGRAM 1: Student must complete this method\n // return value is a placeholder, student should replace with correct return\n boolean[] outputCopy = new boolean[output.length]; //array to hold copy of output.\n for (int i = 0; i < outputCopy.length; i++) {\n outputCopy[i] = output[i]; //place output data into outputCopy\n }\n return outputCopy; //return copy of output\n }",
"public ImmutableList<ActionInput> getOutputs() {\n return outputs;\n }",
"protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}",
"public String getImage(){\n StringBuilder sb = new StringBuilder();\n for (char[] subArray : hidden) {\n sb.append(subArray);\n sb.append(\"\\n\");\n }\n return sb.toString();\n }",
"public void hide() {\n energy = 0;\n redBull = 1;\n gun = 0;\n target = 1;\n }",
"public IInputOutput getConstantOuput();",
"public static void testMultimensionalOutput() {\n\t\tint vectSize = 8;\n\t\tint outputsPerInput = 10;\n\t\tdouble repeatProb = 0.8;\n\t\tdouble inpRemovalPct = 0.8;\n\t\tCollection<DataPoint> data = createMultidimensionalCorrSamples(vectSize, outputsPerInput, inpRemovalPct);\n//\t\tCollection<DataPoint> data = createMultidimensionalSamples(vectSize, outputsPerInput, repeatProb);\n\n\t\tModelLearner modeler = createModelLearner(vectSize, data);\n\t\tint numRuns = 100;\n\t\tint jointAdjustments = 18;\n\t\tdouble skewFactor = 0;\n\t\tdouble cutoffProb = 0.1;\n\t\tDecisionProcess decisioner = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\t0, skewFactor, 0, cutoffProb);\n\t\tDecisionProcess decisionerJ = new DecisionProcess(modeler, null, 1, numRuns,\n\t\t\t\tjointAdjustments, skewFactor, 0, cutoffProb);\n\t\t\n\t\tSet<DiscreteState> inputs = getInputSetFromSamples(data);\n\t\tArrayList<Double> realV = new ArrayList<Double>();\n\t\tArrayList<Double> predV = new ArrayList<Double>();\n\t\tArrayList<Double> predJV = new ArrayList<Double>();\n\t\tfor (DiscreteState input : inputs) {\n\t\t\tSystem.out.println(\"S\" + input);\n\t\t\tMap<DiscreteState, Double> outProbs = getRealOutputProbsForInput(input, data);\n\t\t\tMap<DiscreteState,Double> preds = countToFreqMap(decisioner\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tMap<DiscreteState,Double> predsJ = countToFreqMap(decisionerJ\n\t\t\t\t\t.getImmediateStateGraphForActionGibbs(input.getRawState(), new double[] {}));\n\t\t\tSet<DiscreteState> outputs = new HashSet<DiscreteState>();\n\t\t\toutputs.addAll(outProbs.keySet());\n\t\t\toutputs.addAll(preds.keySet());\n\t\t\toutputs.addAll(predsJ.keySet());\n\t\t\tfor (DiscreteState output : outputs) {\n\t\t\t\tDouble realD = outProbs.get(output);\n\t\t\t\tDouble predD = preds.get(output);\n\t\t\t\tDouble predJD = predsJ.get(output);\n\t\t\t\tdouble real = (realD != null ? realD : 0);\n\t\t\t\tdouble pred = (predD != null ? predD : 0);\n\t\t\t\tdouble predJ = (predJD != null ? predJD : 0);\n\t\t\t\trealV.add(real);\n\t\t\t\tpredV.add(pred);\n\t\t\t\tpredJV.add(predJ);\n\t\t\t\tSystem.out.println(\"\tS'\" + output + \"\t\" + real + \"\t\" + pred + \"\t\" + predJ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"CORR:\t\" + Utils.correlation(realV, predV)\n\t\t\t\t+ \"\t\" + Utils.correlation(realV, predJV));\n\t}",
"public void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\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\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\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\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}",
"public int getNumberOfOutputs()\n {\n return numberOfOutputs;\n }",
"public abstract Object getOutput ();",
"public Integer getHidden() {\n return hidden;\n }",
"public Integer getHidden() {\n return hidden;\n }",
"public String[] getOutputsAttribute();",
"SModel getOutputModel();",
"public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }",
"public void setHidden(Integer hidden) {\n this.hidden = hidden;\n }",
"@Override\n public GeneratingResult generate(String condition) {\n StringBuilder text = new StringBuilder();\n String code = \"\";\n String instructions = \"\";\n try\n {\n JSONObject graph = new JSONObject();\n double[] inputNeuronsValues = new double[inputNeuronsAmount];\n\n int inputNeuronsAmount = Consts.inputNeuronsAmount;\n int outputNeuronsAmount = Consts.outputNeuronsAmount;\n\n int amountOfHiddenLayers = Consts.amountOfHiddenLayers;\n int amountOfNodesInHiddenLayer = Consts.amountOfNodesInHiddenLayer;\n int[] hiddenLayerNodesAmount = new int[amountOfHiddenLayers];\n\n final String[] activationFunctions = Consts.activationFunctions;\n int currentActivationFunctionIndex = generateRandomIntRange(0, activationFunctions.length - 1);\n String currentActivationFunction = activationFunctions[currentActivationFunctionIndex];\n JSONObject randomGraph = generateVariant(currentActivationFunction);\n\n double[][] edgeWeight = (double[][]) randomGraph.get(\"edgeWeight\");\n int[][] edges = (int[][]) randomGraph.get(\"edges\");\n int[] nodesLevel = (int[]) randomGraph.get(\"nodesLevel\");\n int[] nodes = (int[]) randomGraph.get(\"nodes\");\n double[] nodesValue = (double[]) randomGraph.get(\"nodesValue\");\n\n for (int i = 0; i < inputNeuronsAmount; i++)\n {\n text.append(\"input(X\").append(i).append(\") = \").append(nodesValue[i]).append(\". \");\n }\n\n graph.put(\"edgeWeight\", edgeWeight);\n graph.put(\"nodes\", nodes);\n graph.put(\"nodesLevel\", nodesLevel);\n graph.put(\"nodesValue\", nodesValue);\n graph.put(\"edges\", edges);\n graph.put(\"hiddenNodesLeft\", hiddenLayerNodesAmount);\n graph.put(\"inputNeuronsAmount\", inputNeuronsAmount);\n graph.put(\"outputNeuronsAmount\", outputNeuronsAmount);\n graph.put(\"amountOfHiddenLayers\", amountOfHiddenLayers);\n graph.put(\"amountOfNodesInHiddenLayer\", amountOfNodesInHiddenLayer);\n graph.put(\"inputNeuronsValues\", inputNeuronsValues);\n graph.put(\"currentActivationFunction\", currentActivationFunction);\n\n text.append(\"Фунция активации – \").append(currentActivationFunction).append(\".\");\n\n code = graph.toString();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n return new GeneratingResult(text.toString(), code, instructions);\n }",
"public double[] genEmptyUtilities() {\n\t\tdouble[] util = new double[states.size()];\n\t\tfor(int i = 0;i<util.length;i++)\n\t\t\tutil[i] = 0.0;\n\t\treturn util;\n\t}",
"public void calculateDesireHiddenLayerActivation(int dataIndex) {\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n double count = 0;\r\n for (int j = 0; j < outputLayer.length; j++) {\r\n count += -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[j].z))*sigmoidDeri(outputLayer[j].z)*outputLayer[j].dw[i];\r\n }\r\n desireHiddenLayerActivation[i] = hiddenLayer[i].a - count / outputLayer.length;\r\n }\r\n }",
"@Override\n public List<Feature> viterbi(HiddenMarkovModel<AminoAcid, Feature> model, List<AminoAcid> observedSequence) {\n List<Map<Feature, Double>> pathProbs = new ArrayList<>();\n //Stores: index of time step - current hidden state - the most probable previous hidden state\n List<Map<Feature, Feature>> helperVars = new ArrayList<>();\n\n Map<Feature, Map<Feature, Double>> transitions = model.getTransitionMatrix();\n Map<Feature, Map<AminoAcid, Double>> emissions = model.getEmissionMatrix();\n\n for (int i = 0; i < observedSequence.size(); i++) {\n Map<Feature, Double> newPathProb = new HashMap<>();\n Map<Feature, Feature> newHelpVar = new HashMap<>();\n AminoAcid currAcid = observedSequence.get(i);\n\n //Generate values for all possible current types\n for (Feature currFeature : Feature.values()) {\n //For first observation, there is no previous type, so the probability is only the emission prob\n if (i == 0) {\n newPathProb.put(currFeature, Math.log(emissions.get(currFeature).get(currAcid)));\n //Ensure that the time step corresponds with list index\n newHelpVar.put(currFeature, null);\n }\n else {\n //Deduce the previous state which outputs the greatest probability\n Feature maxPrevFeature = null;\n double maxProbability = Double.NEGATIVE_INFINITY;\n for (Feature prevFeature : Feature.values()) {\n double currentProb = pathProbs.get(i-1).get(prevFeature)\n + Math.log(transitions.get(prevFeature).get(currFeature))\n + Math.log(emissions.get(currFeature).get(currAcid));\n if (currentProb > maxProbability || maxPrevFeature == null) {\n maxPrevFeature = prevFeature;\n maxProbability = currentProb;\n }\n }\n newPathProb.put(currFeature, maxProbability);\n newHelpVar.put(currFeature, maxPrevFeature);\n }\n }\n pathProbs.add(newPathProb);\n helperVars.add(newHelpVar);\n }\n\n //Now backtrack to obtain ordering with maximum probability\n LinkedList<Feature> result = new LinkedList<>();\n Feature prevAddedType = Feature.END;\n result.add(prevAddedType);\n for (int i = helperVars.size() -1; i > 0; i--) {\n result.addFirst(helperVars.get(i).get(prevAddedType));\n prevAddedType = helperVars.get(i).get(prevAddedType);\n }\n return result;\n }",
"public void makeNoise() {\n\t\tSystem.out.println(toString() + \" grunted\");\n\t}",
"public void setOutputsAreSameVis(boolean v){\r\n OutputsAreSame.setVisible(v);\r\n }",
"static void moserDeBruijn(int n)\n{\n for (int i = 0; i < n; i++)\n System.out.print(gen(i)+\" \");\n}",
"@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}",
"@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"int getOutputsCount();",
"@Override\n\tpublic Value[] getOutputValues() {\n\t\treturn null;\n\t}",
"private void clearOutputs() {\n outputs_ = emptyProtobufList();\n }",
"public void run() {\n\t\tArrays.fill(label, NOT_AN_INDEX);\r\n\t\t\r\n\t\t// while there is a u in V with considered[u]=0 and mate[u]=0 do\r\n\t\tstage: for (int u = 0; u < gOrig.numVertices(); u++ ) {\r\n\t\t\t// if(mate[u] == NOT_AN_INDEX){\r\n\t\t\tif (gOrig.vertex(u) == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (matching.matches() == gOrig.numVertices() / 2) {\r\n\t\t\t\t// we are done\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tSystem.out.print(String.format(\"considering vertex u%d\\n\", u));\r\n\t\t\tif ( ! matching.isMatched(u)) {\r\n\t\t\t\t\r\n\t\t\t\t// considered[u]=1,A={empty}\r\n\t\t\t\t// A = new WeightedDigraph(gOrig.numVertices()/2);\r\n\t\t\t\tA.clear();\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do exposed[v]=0\r\n\t\t\t\tArrays.fill(exposed, NOT_AN_INDEX);\r\n\t\t\t\t\r\n\t\t\t\t// Construct the auxiliary digraph\r\n\t\t\t\t\r\n\t\t\t\t// for all (v,w) in E do\r\n\t\t\t\tfor (int v = 0; v < gOrig.numVertices(); v++ ) {\r\n\t\t\t\t\tfor (Edge e : gOrig.eOuts(v)) {\r\n\t\t\t\t\t\tint w = e.right;\r\n\t\t\t\t\t\tassert e.left == v : \"vertex correspondence is wrong\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// if mate[w]=0 and w!=u then exposed[v]=w else if mate[w] !=v,0 then A=union(A,{v,mate[w]})\r\n\t\t\t\t\t\t// if(mate[w] == NOT_AN_INDEX && w != u){\r\n\t\t\t\t\t\t// exposed[v] = w;\r\n\t\t\t\t\t\t// }else if(mate[w] != v && mate[w] != NOT_AN_INDEX){\r\n\t\t\t\t\t\t// A.addEdge(new Edge(v,mate[w]));\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( ! matching.isMatched(w) && w != u) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to exposed\\n\", v, w));\r\n\t\t\t\t\t\t\tif (exposed[v] == NOT_AN_INDEX) {\r\n\t\t\t\t\t\t\t\texposed[v] = w;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (matching.mate(w) != v && matching.isMatched(w)) {\r\n\t\t\t\t\t\t\t// DEBUG(String.format(\"adding (%d,%d) to A\\n\", v, matching.mate(w)));\r\n\t\t\t\t\t\t\tA.add(new Edge(v, matching.mate(w)));\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\tDEBUG(String.format(\"Exposed vertices={%s}\\n\", printExposed()));\r\n\t\t\t\tif (exposed().size() == 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// forall v in V do seen[v]=0\r\n\t\t\t\tArrays.fill(seen, false);\r\n\t\t\t\t\r\n\t\t\t\t// Q={u}; label[u]=0; if exposed[u]!=0 then augment(u), goto stage;\r\n\t\t\t\tQ.clear();\r\n\t\t\t\tQ.add(u);\r\n\t\t\t\tArrays.fill(label, NOT_AN_INDEX);// unsure whether it was meant to clear label or just unset label[u] OLD_CODE=label[u] = NOT_AN_INDEX;\r\n\t\t\t\tif (isExposed(u)) {\r\n\t\t\t\t\taugment(u);\r\n\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// need to figure out how to handle blossom()\r\n\t\t\t\t\r\n\t\t\t\t// while Q != {empty} do\r\n\t\t\t\twhile ( ! Q.isEmpty()) {\r\n\t\t\t\t\tint v = Q.pop();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// forall unlabeled nodes w in V such that (v,w) in A\r\n\t\t\t\t\tfor (Edge e : A) {\r\n\t\t\t\t\t\tint w = e.left;\r\n\t\t\t\t\t\tif (e.right == v && label[w] == NOT_AN_INDEX && label[v] != w) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Q=union(Q,w), label[w]=v\r\n\t\t\t\t\t\t\tif ( ! Q.contains(w)) {\r\n\t\t\t\t\t\t\t\tQ.offer(w);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tcontinue; ///THIS CONTINUE WAS ADDED LATE AT NIGHT\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlabel[w] = v;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// seen[mate[w]] = 1;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tint mate = findMate(w);\r\n\t\t\t\t\t\t\t\tseen[mate] = true;\r\n\t\t\t\t\t\t\t}catch(Exception err){\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"error marking mate of %d as seen, mate not found\\n\", w));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if exposed[w]!=0 then augment(w) goto stage;\r\n\t\t\t\t\t\t\tif (isExposed(w)) {\r\n\t\t\t\t\t\t\t\taugment(w);\r\n\t\t\t\t\t\t\t\tDEBUG(String.format(\"new matching %s\\n\", matching.toString()));\r\n\t\t\t\t\t\t\t\tcontinue stage;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if seen[w]=1 then blossom(w)\r\n\t\t\t\t\t\t\tif (seen[w]) {\r\n\t\t\t\t\t\t\t\tblossom(w);\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// remove loops created by the blossoms\r\n\t\t\t\t\tremoveSelfLoops(A);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"final public int getHidden() {\r\n \treturn this.width * this.height - this.squaresRevealed;\r\n }",
"private List<Matrix> buildSamplesFromActivatedHiddenLayers(final List<Matrix> sampleData, final int layer, RBMLayer[] rbmLayers) {\n final RBMLayer rbmLayer = rbmLayers[layer];\n\n if(layer == 0) {\n return sampleData;\n }\n else {\n final RBMLayer previousLayer = rbmLayers[layer - 1];\n Matrix[] previousLayerOutputs = new Matrix[previousLayer.size()];\n for(int r = 0; r < previousLayer.size(); r++) {\n final RBM rbm = previousLayer.getRBM(r);\n previousLayerOutputs[r] = this.contrastiveDivergence.runVisible(rbm, sampleData.get(r));\n }\n // combine all outputs off hidden layer, then re-split them to input into the next visual layer\n return DenseMatrix.make(Matrix.concatColumns(previousLayerOutputs)).splitColumns(rbmLayer.size());\n }\n }",
"public void outputWhyNot ()\n\t{\n\t\toutput (\"\\n> (why-not)\\n\");\n\t\tif (model!=null) model.outputWhyNot();\n\t}",
"OutputsType getOutputs();",
"public TwoLayerNN(int nodes) {\n\t\tnumHidden = nodes;\n\t\thiddenWeights = new ArrayList<ArrayList<Double>>();\n\t\tlayerTwoWeights = new ArrayList<Double>();\n\t\trandom = new Random();\n\t\thiddenOutputs = new ArrayList<ArrayList<Double>>();\n\n\t}",
"public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }",
"private void forwardPropagation(int[] trainingData, double[] activationsOfHiddenLayer, double[] outputActivations) {\n\t\tdouble[] hiddenActivations = new double[SIZE_HIDDEN_LAYER];\n\n\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden++) {\n\t\t\thiddenActivations[indexHidden] = 0;\n\t\t\tfor(int indexInput = 0; indexInput < SIZE_INPUT_LAYER; indexInput++) {\n\t\t\t\thiddenActivations[indexHidden] += weightsOfHiddenLayer[indexHidden][indexInput] * trainingData[indexInput];\n\t\t\t}\t\n\t\t\thiddenActivations[indexHidden] += biasOfHiddenLayer[indexHidden];\n//\t\t\t// We then call the activation function \n\t\t\thiddenActivations[indexHidden] = tanh(hiddenActivations[indexHidden]);\n\t\t\tactivationsOfHiddenLayer[indexHidden] = hiddenActivations[indexHidden];\n\n\t\t}\n\t\t\t\t\n\t\tfor(int indexOuput = 0; indexOuput < SIZE_OUTPUT_LAYER; indexOuput++) {\n\t\t\toutputActivations[indexOuput] = 0;\n\t\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden ++) {\n\t\t\t\toutputActivations[indexOuput] += weightsOfOutputLayer[indexOuput][indexHidden] * hiddenActivations[indexHidden];\n\t\t\t}\t\n\t\t\toutputActivations[indexOuput] += biasOfOutputLayer[indexOuput];\n\t\t}\n\t\tsoftmax(outputActivations);\t\n\t}",
"Output createOutput();",
"private void outDec(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"public void generate() {\n\t\tMirror m = new Mirror();\n\t\tpoints.addAll(m.fish());\n\t\twhile (remainingPoints > 0) {\n\t\t\titerate();\n\t\t\tremainingPoints--;\n\t\t}\n\n\t}",
"private DenseMatrix generateOutputWeights(DenseMatrix H, DenseMatrix classesMatrix, int numInstances) throws NotConvergedException {\n\n DenseMatrix HT = new DenseMatrix(numInstances,m_numHiddenNeurons);\n H.transpose(HT);\n Inverse inverseOfHT = new Inverse(HT, m_seed);\n DenseMatrix MoorePenroseInvHT = inverseOfHT.getMPInverse();\n if (m_debug == 1){\n printMX(\"MoorePenroseInvHT\", MoorePenroseInvHT);\n }\n DenseMatrix outputWeightsMX = new DenseMatrix(m_numHiddenNeurons, m_numOfOutputNeutrons);\n\n DenseMatrix TransposedClassesMX = new DenseMatrix(numInstances, m_numOfOutputNeutrons);\n\n classesMatrix.transpose(TransposedClassesMX);\n\n\n MoorePenroseInvHT.mult(TransposedClassesMX, outputWeightsMX);\n\n return outputWeightsMX;\n\n }",
"public Matrix runHidden(final DeepRBM deepRBM, final Matrix dataSet) {\n final RBMLayer[] rbmLayers = deepRBM.getRbmLayers();\n\n final List<Matrix> trainingData = dataSet.splitColumns(rbmLayers[rbmLayers.length - 1].size()); // split dataset across rbms\n\n List<Matrix> samplePieces = trainingData;\n Matrix[] visibleStatesArray = new Matrix[0];\n\n for(int layer = rbmLayers.length - 1; layer >= 0; layer--) {\n final RBMLayer rbmLayer = rbmLayers[layer];\n visibleStatesArray = new Matrix[rbmLayer.size()];\n\n samplePieces = buildSampleDataReverse(samplePieces, layer, rbmLayers);\n\n for(int r = 0; r < rbmLayer.size(); r++) {\n final RBM rbm = rbmLayer.getRBM(r);\n final Matrix splitDataSet = samplePieces.get(r);\n\n final Matrix visibleStates = this.contrastiveDivergence.runHidden(rbm, splitDataSet);\n visibleStatesArray[r] = visibleStates;\n }\n }\n return DenseMatrix.make(Matrix.concatColumns(visibleStatesArray));\n }",
"void show() {\n System.out.println(\"i and j : \" + i + \" \" + j);\n }",
"void show() {\n System.out.println(\"i and j : \" + i + \" \" + j);\n }",
"private void generateNether(World world, Random random, int i, int j) {\n\n\t}",
"private void _generate() {\n System.out.println(\"Started...\");\n try {\n log_ = new PrintStream(new FileOutputStream(System.getProperty(\"user.dir\") +\n \"\\\\\" + LOG_FILE));\n //writer_.start(); \n\t for (int i = 0; i < instances_[CS_C_UNIV].num; i++) {\n\t _generateUniv(i + startIndex_);\n\t }\n \n //writer_.end();\n log_.close();\n }\n catch (IOException e) {\n System.out.println(\"Failed to create log file!\");\n }\n System.out.println(\"Completed!\");\n }",
"String getOutput();",
"@Override\n public String toString()\n {\n return \"EfficientMarkovModel of order \" + myNum;\n }",
"public double[] debugOutput() {\n double out[] = new double[7];\n\n out[0] = bpFiltered;\n out[1] = squared;\n\n out[2] = ma1Filtered;\n out[3] = ma2Filtered;\n out[4] = ma3Filtered;\n\n out[5] = thr1;\n\n out[6] = counter;\n\n return out;\n }",
"public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint n=scn.nextInt();\r\n\t\tint[] arr=takeinput(n);\r\nint[] ans=Inverse(arr);\r\nfor(int val:ans)\r\n\tSystem.out.println(val);\r\n\t}",
"public void hide() {\n hidden = true;\n }",
"protected abstract void generate();",
"public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}",
"public void createMarkovModel (){\n int sum;\n //System.out.print(\"swag\\n\\n\");\n for (int b =0; b<3;b++){\n sum=0;\n for (int c= 0; c<9;c++){\n sum+=popSsquare.get(b).get(c);\n System.out.print(popSsquare.get(b).get(c)+\"\\t\");\n }\n System.out.println(sum+\"\\n\");\n for (int d=0; d<9;d++){\n markovSModel.get(b).set(d, (double) (popSsquare.get(b).get(d))/sum);\n System.out.print(markovSModel.get(b).get(d)+\"\\t\");\n }\n System.out.println(\"\\n\");\n }\n }",
"public String getOutputFlag();",
"public static void XOR() {\n System.out.println(\"---\");\n System.out.println(\"This section will create, and train a neural network with the topology of 2-2-1. That is\\n\" +\n \"there are 2 input neurons, 2 hidden neurons, and 1 output neuron. The XOR problem will be using the\\n\" +\n \"XOR_training_data.txt file to get the training data. In order to make training simpler, the 0's have\\n\" +\n \"been substituted with -1's.\");\n System.out.println(\"Training...\");\n NeuralNetwork xor = (NeuralNetwork)StochasticBackPropagation.SBP(2, 2, 1, \"XOR_training_data.txt\", 20000, 0.1, 0.05);\n System.out.println(\"Trained.\");\n\n double[] input = new double[2];\n System.out.println(\"Input: -1 -1\");\n input[0] = -1;\n input[1] = -1;\n double[] output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0])); //rounding to make output cleaner.\n\n System.out.println(\"Input: -1 1\");\n input[0] = -1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 -1\");\n input[0] = 1;\n input[1] = -1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 1\");\n input[0] = 1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n System.out.println(\"---\\n\");\n }",
"public static void printGeneratedCombination() {\n\t\t\n\t\tfinal int randomDistance = randomizer(LARGE_DISTANCE * 3);\n\t\tfinal int randomDuration = randomizer(LARGE_DURATION * 3);\n\t\tfinal int randomExhalation = randomizer(LARGE_EXHALATION_LEVEL * 3);\n\t\t\n\t\tfinal boolean isSafe = isInterpolatedSafe(randomDistance, randomDuration, randomExhalation);\n\t\t\n\t\tSystem.out.println(\"(\" + randomDistance + COMMA + randomDuration + COMMA + randomExhalation + COMMA + isSafe + \")\");\n\t\t\n\t}",
"public java.util.List<java.lang.String> getOutputs() {\n return outputs;\n }",
"public abstract boolean getOutput();",
"@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}",
"java.lang.String getOutput();",
"public static INeighbor explanationBased(IntVar... vars) {\n Model model = vars[0].getModel();\n// INeighbor neighbor1 = new ExplainingObjective(model, 5, 0);\n INeighbor neighbor2 = new ExplainingCut(model, 5, 0);\n INeighbor neighbor3 = new RandomNeighborhood(vars, 5, 0);\n return sequencer(/*neighbor1, */neighbor2, neighbor3);\n }",
"public java.util.List<java.lang.String> getOutputs() {\n return outputs;\n }",
"private void printNetworks() {\n// for (GeneticNeuralNetwork network : networks)\n// System.out.println(network);\n// System.out.println(\"----------***----------\");\n// ////\n }",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"@java.lang.Override\n public int getOutputsCount() {\n return outputs_.size();\n }",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}",
"public Trainer(double[][] data, double[] attribute, int hiddenLayerNodeCount, int outputLayerNodeCount){\r\n this.data = data;\r\n this.attribute = attribute;\r\n hiddenLayer = new Node[hiddenLayerNodeCount];\r\n outputLayer = new Node[outputLayerNodeCount];\r\n activation = new double[hiddenLayerNodeCount];\r\n desireHiddenLayerActivation = new double[hiddenLayerNodeCount];\r\n for (int i = 0; i < hiddenLayerNodeCount; i++) {\r\n hiddenLayer[i] = new Node(0.5, data[0].length - 1);\r\n }\r\n for (int i = 0; i < outputLayerNodeCount; i++) {\r\n outputLayer[i] = new Node(0.5, activation.length);\r\n }\r\n }"
]
| [
"0.6376007",
"0.61667395",
"0.60257876",
"0.58499295",
"0.5808121",
"0.57072425",
"0.5662223",
"0.5631895",
"0.5566668",
"0.5563862",
"0.5551572",
"0.5530542",
"0.54724514",
"0.5459957",
"0.54211456",
"0.53702503",
"0.53693074",
"0.5358001",
"0.5348081",
"0.53329694",
"0.532102",
"0.531988",
"0.5314582",
"0.53048617",
"0.5303179",
"0.5301653",
"0.5296464",
"0.52741414",
"0.52694714",
"0.52639794",
"0.5256577",
"0.5255112",
"0.5204398",
"0.5185323",
"0.5162642",
"0.5160897",
"0.514424",
"0.51363",
"0.51247025",
"0.51247025",
"0.511831",
"0.51040417",
"0.5099821",
"0.5099821",
"0.5095784",
"0.5063221",
"0.5053024",
"0.504483",
"0.50302064",
"0.5019556",
"0.4994267",
"0.4986657",
"0.49757615",
"0.4974711",
"0.4974711",
"0.4974711",
"0.4974711",
"0.4974711",
"0.49615717",
"0.49536848",
"0.495222",
"0.49486074",
"0.49447528",
"0.49421534",
"0.49392253",
"0.49387175",
"0.49358088",
"0.49254888",
"0.49176303",
"0.49139377",
"0.49130404",
"0.4906279",
"0.4904593",
"0.49024183",
"0.49024183",
"0.48985404",
"0.48974988",
"0.4895503",
"0.4893958",
"0.48938692",
"0.48864788",
"0.48861352",
"0.48850644",
"0.48762402",
"0.4873058",
"0.4872266",
"0.48721913",
"0.48711538",
"0.48606756",
"0.4859865",
"0.48597887",
"0.48541474",
"0.4853951",
"0.48495185",
"0.48478058",
"0.48472434",
"0.4841652",
"0.48397598",
"0.48379228",
"0.4834775",
"0.48311"
]
| 0.0 | -1 |
Checks if method arguments of matrix or vector types have the same size. | @Before("execution(@DimensionsEqual * *(..))")
public void method(final JoinPoint jpoint) {
this.constructor(jpoint);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default void checkLengthOfArrays(double[] a, double[] b) throws IllegalArgumentException {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"Dimensions are not the same.\");\n }\n }",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }",
"abstract public boolean argsNotFull();",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"private boolean isNxNShape() {\n return this.matrix.size() == this.n &&\n this.matrix.stream()\n .allMatch(row -> row.size() == this.n);\n }",
"private static void _assertSizeAlignment(boolean[] one, boolean[] other){\r\n assert one.length==other.length:\r\n String.format(\"Incompatible Arrays %s / %s\",one.length,other.length);\r\n }",
"static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }",
"boolean isVarargs();",
"boolean isVarargs();",
"boolean isVarargs();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n return numberOfParametersEntered == 3;\n }",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"public boolean isCorrectSize(int height, int width);",
"public boolean isExpectedNumberOfParameters(long numberOfParameters);",
"private void checkStateSizes()\n\t{\n\t\tif (variableNames.size() != domainSizes.size())\n\t\t{\n\t\t\tif (DEBUG)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Variable names length = \"\n\t\t\t\t\t\t+ variableNames.size());\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Domain size length = \" + domainSizes.size());\n\t\t\t}\n\t\t\tSystem.err.println(\"Numbers of state variables in inputs differ.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}",
"void assertSizeEquals(int expected);",
"private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}",
"@Test\n public void arraysEqualsWithEqualArraysReturnsTrue() {\n\n Class<?>[] arrayOne = { String.class, Integer.class };\n Class<?>[] arrayTwo = { String.class, Integer.class };\n\n assertThat(Arrays.equals(arrayOne, arrayTwo)).isTrue();\n }",
"private boolean methodEqueals(Method m1, Method m2) {\n\t\tif (m1.getName() == m2.getName()) {\n\t\t\tif (!m1.getReturnType().equals(m2.getReturnType()))\n\t\t\t\treturn false;\n\t\t\tClass<?>[] params1 = m1.getParameterTypes();\n\t\t\tClass<?>[] params2 = m2.getParameterTypes();\n\t\t\tif (params1.length == params2.length) {\n\t\t\t\tfor (int i = 0; i < params1.length; i++) {\n\t\t\t\t\tif (params1[i] != params2[i])\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"private void checkSizes() throws Exception{\n\t\tint width = images[0].getWidth();\n\t\tint height = images[0].getHeight();\n\t\t//i = 1 because first image is referenced.\n\t\tfor (int i = 1; i < images.length; i++){\n\t\t\tif ((images[i].getWidth() != width) || (images[i].getHeight() != height)){\n\t\t\t\tthrow new Exception(\"Textures sizes are imcompatible\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t}",
"public boolean check(Matrix matrix) {\n return this.getWidth() == matrix.getWidth() && this.getHeight() == matrix.getHeight();\n }",
"public abstract boolean isArrayParams();",
"@Override\n \tprotected boolean checkDelegateMethod(Method input) {\n \t\tif (!domain.checkElementType(target, input.getGenericReturnType())) {\n \t\t\treturn false;\n \t\t}\n \n \t\tClass<?>[] delegateParams = input.getParameterTypes();\n \n \t\t// must have first argument of type of the setter container\n \t\tif (!(delegateParams.length == 1 && domain.checkClassifierType(\n \t\t\t\ttarget.getEContainingClass(), delegateParams[0]))) {\n \t\t\treturn false;\n \t\t}\n \n \t\treturn true;\n \t}",
"public static boolean checkSize(int expected, int actual) {\n if (expected != actual) {\n System.out.println(\"size() returned \" + actual + \", but expected: \" + expected);\n return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}",
"public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }",
"protected static boolean ensureNumArgs( String param[], int n ) {\n\t\tif ( n >= 0 && param.length != n || n < 0 && param.length < -n ) {\n\t\t\tSystem.err.println( \"Wrong number (\" + param.length + \") of arguments.\" );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean parametersMatch(Method m, Class[] param) {\n boolean match = false;\n Class[] types = m.getParameterTypes();\n if (types.length!=param.length)\n return false;\n for (int i=0; i<types.length; i++) {\n match = types[i].equals(param[i]);\n }\n return match;\n }",
"protected void verify() {\n\t\tif (size(r) != n)\n\t\t\tthrow new IllegalArgumentException(\"size is incorrect\");\n\t\tverify(r);\n\t}",
"void verifyNumberOfDimensions(int ignoreMeNumDimensions) {\n // do nothing on purpose\n }",
"private void checkMatrixDimensions(Matrix B) throws JPARSECException {\n if (B.m != m || B.n != n) {\n throw new JPARSECException(\"Matrix dimensions must agree.\");\n }\n }",
"public boolean checkSize(int nx, int ny, int nz) {\n \tif( nx%2 != 0 ) return false;\n \tif( nz%2 != 0 ) return false;\n \treturn true;\n }",
"public boolean sameSignature(MethodType other) {\n return name.equals(name) &&\n Arrays.equals(typeParams, other.typeParams) &&\n Arrays.equals(paramTypes, other.paramTypes);\n }",
"public boolean isVector() {\n\t\treturn numeros.length == 1 || numeros[0].length == 1;\n\t}",
"private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }",
"@Test\n public void checkGetRInputSize()\n {\n int width = 5;\n int height = 10;\n\n QRDecomposition<DMatrixRMaj> alg = createQRDecomposition();\n\n SimpleMatrix A = new SimpleMatrix(height,width, DMatrixRMaj.class);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)A.getMatrix(),rand);\n\n alg.decompose((DMatrixRMaj)A.getMatrix());\n\n // check the case where it creates the matrix first\n assertEquals(width, alg.getR(null, true).numRows);\n assertEquals(height, alg.getR(null, false).numRows);\n\n // check the case where a matrix is provided\n alg.getR(new DMatrixRMaj(width,width),true);\n alg.getR(new DMatrixRMaj(height,width),false);\n\n // check some negative cases\n {\n DMatrixRMaj R = new DMatrixRMaj(height,width);\n alg.getR(R,true);\n assertEquals(width,R.numCols);\n assertEquals(width,R.numRows);\n }\n\n {\n DMatrixRMaj R = new DMatrixRMaj(width-1,width);\n alg.getR(R,false);\n assertEquals(width,R.numCols);\n assertEquals(height,R.numRows);\n }\n }",
"public static boolean Match(Vector a, Vector b){\n return a.axis.length == b.axis.length;\n }",
"public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }",
"private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !this.params.isEmpty()) {\n throw new OutmatchingParametersToMethodCall();\n }\n }",
"public void checkShape(AbstractMatrix3D B) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\" and \"+B.toStringShort());\n}",
"private static boolean\n\t\tdoParametersMatch(Class<?>[] types, Object[] parameters)\n\t{\n\t\tif (types.length != parameters.length) return false;\n\t\tfor (int i = 0; i < types.length; i++)\n\t\t\tif (parameters[i] != null) {\n\t\t\t\tClass<?> clazz = parameters[i].getClass();\n\t\t\t\tif (types[i].isPrimitive()) {\n\t\t\t\t\tif (types[i] != Long.TYPE && types[i] != Integer.TYPE &&\n\t\t\t\t\t\ttypes[i] != Boolean.TYPE) throw new RuntimeException(\n\t\t\t\t\t\t\"unsupported primitive type \" + clazz);\n\t\t\t\t\tif (types[i] == Long.TYPE && clazz != Long.class) return false;\n\t\t\t\t\telse if (types[i] == Integer.TYPE && clazz != Integer.class) return false;\n\t\t\t\t\telse if (types[i] == Boolean.TYPE && clazz != Boolean.class) return false;\n\t\t\t\t}\n\t\t\t\telse if (!types[i].isAssignableFrom(clazz)) return false;\n\t\t\t}\n\t\treturn true;\n\t}",
"public void checkShape(AbstractMatrix3D B, AbstractMatrix3D C) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns || slices != C.slices || rows != C.rows || columns != C.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\", \"+B.toStringShort()+\", \"+C.toStringShort());\n}",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"private static void validate(final Object object) {\n if (object instanceof Object[]) {\n final Object[] array = (Object[]) object;\n for (int idx = 1; idx < array.length; ++idx) {\n SameDimensionCheck.validate(array[0], array[idx]);\n }\n }\n }",
"default boolean isVarArgs() {\n\t\t// Check whether the MethodHandle refers to a Method or Contructor (not Field)\n\t\tif (getReferenceKind() >= REF_invokeVirtual) {\n\t\t\treturn ((getModifiers() & MethodHandles.Lookup.VARARGS) != 0);\n\t\t}\n\t\treturn false;\n\t}",
"private Boolean isValidMatrix(List<List<Double>> matrix) {\n\t\tInteger nrows = matrix.size();\n\n\t\tList<Integer> rowLengths = matrix.stream().map(List::size).toList();\n\t\tfloat ncols = (float) rowLengths.stream().mapToInt(Integer::intValue).sum() / rowLengths.size();\n\n\t\treturn (ncols == nrows) && (nrows == 3);\n\t}",
"public boolean matches(Constructor constructor) {\n Class<?>[] constructorParameterTypes = constructor.getParameterTypes();\n if (constructorParameterTypes.length == prototypeParameterTypes.length) {\n for (int i = 0; i < prototypeParameterTypes.length; i++) {\n if (!constructorParameterTypes[i].equals(prototypeParameterTypes[i])) {\n return false;\n }\n }\n return true;\n } else\n return false;\n }",
"public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }",
"@Override\n public boolean isDifferent(FastVector... predictions) {\n if (predictions != null && predictions.length == 2){\n return isDifferent(predictions[0],predictions[1]);\n }\n throw new IllegalArgumentException();\n }",
"boolean sameDimensions(List<Layer> layers);",
"public static boolean isVector(int[] v) { return v != null && v.length == 2; }",
"@Override\n protected boolean hasValidArgumentValues(@NotNull ImmutableList<Parameter> arguments) {\n boolean valid = true;\n Value rowIndex = arguments.get(0).value();\n Value columnIndex = arguments.get(1).value();\n\n Preconditions.checkValueType(rowIndex, ValueType.NUMBER);\n Preconditions.checkValueType(columnIndex, ValueType.NUMBER);\n\n checkArgument(!rowIndex.hasImaginaryValue(), \"Row index may not be imaginary\");\n checkArgument(!columnIndex.hasImaginaryValue(), \"Column index may not be imaginary\");\n\n // Check for value bounds on row index\n if (!NumberUtil.isInteger(rowIndex.realPart()) || rowIndex.realPart() < 0 || rowIndex.realPart() > getEnvironment().getHomeScreen().getMaxRows()) {\n valid = false;\n }\n\n // Check for value bounds on column index\n if (!NumberUtil.isInteger(columnIndex.realPart()) || columnIndex.realPart() < 0 || columnIndex.realPart() > getEnvironment().getHomeScreen().getMaxColumns()) {\n valid = false;\n }\n\n return valid;\n }",
"private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}",
"public void validateMethodCall(HashMap<String, ArrayList<String>> callElements) throws\r\n\t\t\tIllegalOperationException, IncompatibleTypeException {\r\n\t\tMap.Entry<String, ArrayList<String>> data = callElements.entrySet().iterator().next();\r\n\t\tString methodName = data.getKey();\r\n\t\tMethodScope curMethod = Sjavac.getGlobalScope().getMethod(methodName);\r\n\t\tArrayList<String> methodArgs = data.getValue();\r\n\t\tif (methodArgs == null) {\r\n\t\t\tif (curMethod.getNumberOfArguments() != 0) {\r\n\t\t\t\tthrow new IllegalOperationException();\r\n\t\t\t}\r\n\t\t} else if (Sjavac.getGlobalScope().containsMethod(callElements)) {\r\n\t\t\t if (methodArgs.size() == curMethod.getNumberOfArguments()) {\r\n\t\t\t\tfor (int i = 0; i < methodArgs.size(); i++) {\r\n\t\t\t\t\tif(!curMethod.getArgument(i).compatibleWith(methodArgs.get(i))){\r\n\t\t\t\t\t\tVariable reference = this.findVariable(methodArgs.get(i));\r\n\t\t\t\t\t\tif(reference==null||!reference.isInitialized()){\r\n\t\t\t\t\t\t\tthrow new IllegalOperationException();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcurMethod.getArgument(i).compatibleWith(reference);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new IllegalOperationException();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new IllegalOperationException();\r\n\t\t}\r\n\t}",
"@Test\r\n public void sizeSets() throws Exception {\r\n assertEquals(5, sInt.size());\r\n assertEquals(3, sStr.size());\r\n }",
"@Override public boolean accepts(Type other) {\n if(!(other instanceof FixArray)) return false;\n FixArray that = (FixArray) other;\n return this.length == that.length\n && this.indexType().equals(that.indexType())\n && this.elemType.accepts(that.elemType);\n }",
"public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }",
"public boolean accepts(int numberOfArguments) {\n\t\treturn this.minimumNumberOfParameters <= numberOfArguments &&\n\t\t\tnumberOfArguments <= this.maximumNumberOfParameters;\n\t}",
"@Test\n public void testGetSize() {\n assertEquals(r1.getSize(), new Dimension2D(7, 4));\n assertEquals(r2.getSize(), new Dimension2D(0, 4));\n assertEquals(r3.getSize(), new Dimension2D(7, 0));\n assertEquals(r4.getSize(), new Dimension2D(0, 0));\n }",
"public boolean checkSize(int size) {\r\n\t\tboolean sizeEmpty = size == 0;\r\n\t\treturn sizeEmpty;\r\n\t}",
"LengthEquals createLengthEquals();",
"@Property\n public boolean reverse_has_the_same_size_as_original(@ForAll List<?> original) {\n return Lists.reverse(original).size() == original.size();\n }",
"private static boolean isValidMultiplication(int[][] A, int[][] B) {\n if(A.length != A[0].length || B.length != B[0].length) {\n return false;\n }\n\n //check same size\n if(A.length != B.length) {\n return false;\n }\n\n //check size is power of 2\n if((A.length & (A.length - 1)) != 0) {\n return false;\n }\n\n return true;\n }",
"private static boolean validateMethod(Method method) {\n for (Class<?> param : method.getParameterTypes()) {\n if (null == OvsDbConverter.get(param))\n return false;\n }\n return true;\n }",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"private Object isValidColumnVector(List<List<Double>> vector) {\n\t\tInteger nrows = vector.size();\n\n\t\tList<Integer> rowLengths = vector.stream().map(List::size).toList();\n\t\tInteger ncols = rowLengths.stream().mapToInt(Integer::intValue).sum() / rowLengths.size();\n\n\t\treturn (nrows == 3) && (ncols == 1);\n\t}",
"@Override\n public boolean isSameType(Type t) {\n if (t instanceof FuncType) {\n final FuncType other = (FuncType) t;\n return ret.isSameType(other.ret)\n && Arrays.equals(params, other.params);\n }\n return false;\n }",
"private final void checkRowCount(final int size1, final int size2) {\n\t\tif (size1 == size2) {\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_PASSED,\n\t\t\t\t\tnull);\n\t\t\treturn;\n\t\t} else {\n\t\t\tLOGGER.error(\"Count of rows doesn't match.\");\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\t\tContextComparator.CONTEXT_1.getName() + \" : \" + size1 + \", \"\n\t\t\t\t\t\t\t+ ContextComparator.CONTEXT_2.getName() + \" : \" + size2);\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n public int getArgLength() {\n return 4;\n }",
"static void checkArgTypes(\r\n\t\tString funcName, Argument[] args, JParameter[] params) {\r\n\t\tif(args.length != params.length){\r\n\t\t\tthrow new IllegalArgumentsException(funcName, \"Wrong number of arguments\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<args.length;i++){\r\n\t\t\tJValue val = args[i].getValue();\r\n\t\t\tJParameter jp = params[i];\r\n\t\t\tif(jp.isUntyped()){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tJType typ = jp.getType();\r\n\t\t\tif(RefValue.isGenericNull(val)){\r\n\t\t\t\tJTypeKind kind = typ.getKind();\r\n\t\t\t\tif (kind == JTypeKind.CLASS || kind == JTypeKind.PLATFORM){\r\n\t\t\t\t\t// If it is a generic null, replace it with a typed null to comply with function declaration.\r\n\t\t\t\t\tRefValue rv = RefValue.makeNullRefValue(\r\n\t\t\t\t\t\tval.getMemoryArea(), kind == JTypeKind.CLASS ? (ICompoundType)typ : JObjectType.getInstance());\r\n\t\t\t\t\targs[i].setValue(rv);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcheckConvertibility(val, typ);\r\n\t\t}\r\n\t}",
"public static boolean isArray_length() {\n return false;\n }",
"private static void checkParameters(XYMultipleSeriesDataset dataset,\n XYMultipleSeriesRenderer renderer) {\n if (dataset == null || renderer == null\n || dataset.getSeriesCount() != renderer.getSeriesRendererCount()) {\n throw new IllegalArgumentException(\n \"Dataset and renderer should be not null and should have the same number of series\");\n }\n }",
"public void testSize() {\n assertEquals(10, maze1.size());\n }",
"public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }",
"public boolean appliesTo(ISignature signature) {\n\t\tif (NUMBER_EXPECTED_PARAMETERS != signature.getNumberParameters()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check that parameters are not null\r\n\t\tfor (int i = 0; i < NUMBER_EXPECTED_PARAMETERS; i++) {\r\n\t\t\tif (null == signature.get(i)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check types of parameters\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT\r\n\t\t\t\t.isSuperTypeOf(signature.get(NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT.isSuperTypeOf(signature\r\n\t\t\t\t.get(DMGR_NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean equals( Object rightSide ) {\n\tif (this.size() == ((Matrix)rightSide).size()){ //identical dimensions\n\t for (int r = 0; r < this.size(); r++){ \n\t for (int c = 0; c < this.size(); c++){ \n\t\t if (matrix[r][c] != ((Matrix)rightSide).get(r,c))\n\t\t\treturn false;\n\t\t}\n\t }\n\t return true;\n\t}\n\treturn false; \n }",
"public boolean hasMoreElements () {\r\n if (same_name_methods_index == 0) {\r\n if (!methods.hasMoreElements ()) return false;\r\n\r\n same_name_methods = (java.util.Vector) methods.nextElement ();\r\n same_name_methods_index = same_name_methods.size ();\r\n }\r\n\r\n return true;\r\n }",
"private boolean isOverloaded(){\n\t\tif(((double) this.contains) / this.table.length > .6){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean equal_types( TypeInterface t ) {\n\t\tif( t instanceof TyArray ) {\r\n\t\t TyArray ta = (TyArray) t ;\r\n\t\t return ta.elementCount == elementCount\r\n\t\t && getElementType().equal_types( ta.getElementType() ) ; }\r\n\t\telse return false ; }",
"public boolean isParameterized() {\n\t\treturn this.typeSignatures != null && this.typeArguments != null;\n\t}",
"private boolean checkAddShipParams(int row, int col, int shipSize, char orientation) {\n /* check if the coordinates initially make sense */\n if(row < 1 || row > this.boardHeight) {\n System.err.println(String.format(\"Error: The row must be between 1 and %d\", this.boardHeight-1));\n return false;\n }\n else if(col < 1 || col > this.boardWidth) {\n System.err.println(String.format(\"Error: The column must be between 1 and %d\", this.boardWidth-1));\n return false;\n }\n /* is the orientation one we know? */\n else if(orientation != 'h' && orientation != 'H' && orientation != 'v' && orientation != 'V') {\n System.err.println(String.format(\"Error: Unrecognized orientation '%c'\", orientation));\n return false;\n }\n /* will the ship fit on the board with that size and orientation? */\n else if((orientation == 'h' || orientation == 'H') && (col + (shipSize-1) > this.boardWidth)) {\n System.err.println(\"Error: The ship does not fit on the board there\");\n return false;\n }\n else if((orientation == 'v' || orientation == 'V') && (row + (shipSize-1) > this.boardHeight)) {\n System.err.println(\"Error: The ship does not fit on the board there\");\n return false;\n }\n \n /* Everything looks good! */\n return true;\n }",
"public static boolean isArray_estLength() {\n return false;\n }",
"private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n\n // make a stream with a data structure containing both states\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"public int checkAndGetTypeLength() {\n return checkAndGetTypeLength(this.byteArr);\n }",
"public long IsEqual( Units_Dimensions adimensions) {\n return OCCwrapJavaJNI.Units_Dimensions_IsEqual(swigCPtr, this, Units_Dimensions.getCPtr(adimensions) , adimensions);\n }",
"private Boolean isValidColumnMatrix(SimpleMatrix matrix) {\n\t\tInteger nrows = matrix.numRows();\n\t\tInteger ncols = matrix.numCols();\n\n\t\treturn (ncols == 1) && (nrows == 3);\n\t}",
"private void thenInControllerSizeMustBe(int setSize) {\n log.info(\"Checking how many recipe items are in the set\");\n ArgumentCaptor<Set<Recipe>> argumentCaptor = ArgumentCaptor.forClass(Set.class);\n Mockito.verify(model, times(1)).addAttribute(eq(\"recipes\"), argumentCaptor.capture());\n\n Set setIncontroller = argumentCaptor.getValue();\n assertEquals(setSize, setIncontroller.size());\n }",
"private static boolean isMoreSpecific(AccessibleObject more, Class<?>[] moreParams, boolean moreVarArgs, AccessibleObject less, Class<?>[] lessParams, boolean lessVarArgs) { // TODO clumsy arguments pending Executable in Java 8\n if (lessVarArgs && !moreVarArgs) {\n return true; // main() vs. main(String...) on []\n } else if (!lessVarArgs && moreVarArgs) {\n return false;\n }\n // TODO what about passing [arg] to log(String...) vs. log(String, String...)?\n if (moreParams.length != lessParams.length) {\n throw new IllegalStateException(\"cannot compare \" + more + \" to \" + less);\n }\n for (int i = 0; i < moreParams.length; i++) {\n Class<?> moreParam = Primitives.wrap(moreParams[i]);\n Class<?> lessParam = Primitives.wrap(lessParams[i]);\n if (moreParam.isAssignableFrom(lessParam)) {\n return false;\n } else if (lessParam.isAssignableFrom(moreParam)) {\n return true;\n }\n if (moreParam == Long.class && lessParam == Integer.class) {\n return false;\n } else if (moreParam == Integer.class && lessParam == Long.class) {\n return true;\n }\n }\n // Incomparable. Arbitrarily pick one of them.\n return more.toString().compareTo(less.toString()) > 0;\n }",
"private boolean allVolumeSizesMatch(List<Long> currentVolumeSizes) {\n // If the storage systems match then check all current sizes of the volumes too, any mismatch\n // will lead to a calculation check\n List<Long> currentVolumeSizesCopy = new ArrayList<Long>();\n currentVolumeSizesCopy.addAll(currentVolumeSizes);\n for (Long currentSize : currentVolumeSizes) {\n for (Long compareSize : currentVolumeSizesCopy) {\n if (currentSize.longValue() != compareSize.longValue()) {\n return false;\n }\n }\n }\n\n _log.info(\"All volumes are of the same size. No need for capacity calculations.\");\n return true;\n }",
"private static void checkCmdArgs(int numberOfArgs, String[] args) {\n\t\tif (args.length != numberOfArgs) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}",
"@Test//test equal\n public void testEqual() {\n MyVector vD1 = new MyVector(ORIGINALDOUBLEARRAY);\n MyVector vD2 = new MyVector(ORIGINALDOUBLEARRAY);\n double[] doubleArray = new double[]{3.0, 2.3, 1.0, 0.0, -1.1};\n MyVector diffVD3 = new MyVector(doubleArray);\n assertEquals(true, vD1.equal(vD2));\n assertEquals(false, vD1.equal(diffVD3));\n MyVector vI1 = new MyVector(ORIGINALINTARRAY);\n MyVector vI2 = new MyVector(ORIGINALINTARRAY);\n int[] intArray = new int[]{1, 2, 3, 4};\n MyVector vI3 = new MyVector(intArray);\n assertEquals(true, vI1.equal(vI2));\n assertEquals(false, vI1.equal(vI3));\n }",
"@Test\n public void equals() {\n float[] a = new float[] {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f, 6.0f}; \n assertTrue(Vec4f.equals(a, 2, b, 3));\n assertTrue(! Vec4f.equals(a, 0, b, 0));\n \n float[] a4 = new float[] {1.0f, 2.0f, 3.0f, 4.0f}; \n \n float[] b4 = new float[] {1.0f, 2.0f, 3.0f, 4.0f};\n float[] c4 = new float[] {2.0f, 2.0f, 3.0f, 4.0f};\n float[] d4 = new float[] {1.0f, 4.0f, 3.0f, 4.0f};\n float[] e4 = new float[] {1.0f, 2.0f, 6.0f, 4.0f};\n float[] f4 = new float[] {1.0f, 2.0f, 3.0f, 5.0f};\n assertTrue(Vec4f.equals(a4,b4));\n assertTrue(!Vec4f.equals(a4,c4));\n assertTrue(!Vec4f.equals(a4,d4));\n assertTrue(!Vec4f.equals(a4,e4));\n assertTrue(!Vec4f.equals(a4,f4)); \n }"
]
| [
"0.6117276",
"0.5955556",
"0.5904147",
"0.58281994",
"0.5823109",
"0.5793523",
"0.5739606",
"0.57221097",
"0.5718577",
"0.571609",
"0.571609",
"0.571609",
"0.5647594",
"0.5647594",
"0.5647594",
"0.5647594",
"0.55866945",
"0.55847716",
"0.5550128",
"0.5536812",
"0.5527555",
"0.5525682",
"0.5520923",
"0.5516273",
"0.54819775",
"0.54330605",
"0.5425481",
"0.5404014",
"0.54002404",
"0.53713334",
"0.53427315",
"0.534214",
"0.53389645",
"0.5329363",
"0.53215045",
"0.5317589",
"0.5312291",
"0.52875084",
"0.5269636",
"0.52394116",
"0.5229079",
"0.52257055",
"0.5222711",
"0.5212802",
"0.5173199",
"0.51697236",
"0.5169037",
"0.5147748",
"0.51353353",
"0.51285064",
"0.5124665",
"0.51122737",
"0.51043254",
"0.51014584",
"0.5098347",
"0.50956756",
"0.5083586",
"0.5074585",
"0.50729716",
"0.5064991",
"0.50639445",
"0.5063494",
"0.5060619",
"0.50494313",
"0.5037779",
"0.50257754",
"0.50110614",
"0.49961227",
"0.4994274",
"0.49859855",
"0.49857485",
"0.49852332",
"0.49524277",
"0.49470598",
"0.49392608",
"0.4936974",
"0.49359468",
"0.49336937",
"0.49253485",
"0.49247178",
"0.49169204",
"0.49061865",
"0.490468",
"0.48989892",
"0.48882732",
"0.48867133",
"0.4878553",
"0.48694003",
"0.4864998",
"0.48629084",
"0.48616886",
"0.48569405",
"0.48528957",
"0.4850355",
"0.4848631",
"0.48402843",
"0.48314232",
"0.4828189",
"0.4826557",
"0.48145026",
"0.48134223"
]
| 0.0 | -1 |
Checks if constructor arguments of matrix or vector types have the same size. | @Before("execution(@DimensionsEqual *.new(..))")
public void constructor(final JoinPoint jpoint) {
final Object[] args = jpoint.getArgs();
final Map<Class<?>, Object> ref = new HashMap<>();
for (int arg = 0; arg < args.length; ++arg) {
for (int idx = 0; idx < this.clazz.length; ++idx) {
final Class<?> type = args[arg].getClass().getComponentType();
if (type != null && this.clazz[idx].isAssignableFrom(type)) {
SameDimensionCheck.validate(args[arg]);
}
if (!this.clazz[idx].isAssignableFrom(args[arg].getClass())) {
continue;
}
final Object reference = ref.get(this.clazz[idx]);
if (reference == null) {
ref.put(this.clazz[idx], args[arg]);
continue;
}
SameDimensionCheck.validate(reference, args[arg]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"default void checkLengthOfArrays(double[] a, double[] b) throws IllegalArgumentException {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"Dimensions are not the same.\");\n }\n }",
"private void checkStateSizes()\n\t{\n\t\tif (variableNames.size() != domainSizes.size())\n\t\t{\n\t\t\tif (DEBUG)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Variable names length = \"\n\t\t\t\t\t\t+ variableNames.size());\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Domain size length = \" + domainSizes.size());\n\t\t\t}\n\t\t\tSystem.err.println(\"Numbers of state variables in inputs differ.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}",
"private boolean isNxNShape() {\n return this.matrix.size() == this.n &&\n this.matrix.stream()\n .allMatch(row -> row.size() == this.n);\n }",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"private static void _assertSizeAlignment(boolean[] one, boolean[] other){\r\n assert one.length==other.length:\r\n String.format(\"Incompatible Arrays %s / %s\",one.length,other.length);\r\n }",
"public boolean matches(Constructor constructor) {\n Class<?>[] constructorParameterTypes = constructor.getParameterTypes();\n if (constructorParameterTypes.length == prototypeParameterTypes.length) {\n for (int i = 0; i < prototypeParameterTypes.length; i++) {\n if (!constructorParameterTypes[i].equals(prototypeParameterTypes[i])) {\n return false;\n }\n }\n return true;\n } else\n return false;\n }",
"public void checkShape(AbstractMatrix3D B, AbstractMatrix3D C) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns || slices != C.slices || rows != C.rows || columns != C.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\", \"+B.toStringShort()+\", \"+C.toStringShort());\n}",
"@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n return numberOfParametersEntered == 3;\n }",
"public void checkShape(AbstractMatrix3D B) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\" and \"+B.toStringShort());\n}",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"private void checkSizes() throws Exception{\n\t\tint width = images[0].getWidth();\n\t\tint height = images[0].getHeight();\n\t\t//i = 1 because first image is referenced.\n\t\tfor (int i = 1; i < images.length; i++){\n\t\t\tif ((images[i].getWidth() != width) || (images[i].getHeight() != height)){\n\t\t\t\tthrow new Exception(\"Textures sizes are imcompatible\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t}",
"private void checkMatrixDimensions(Matrix B) throws JPARSECException {\n if (B.m != m || B.n != n) {\n throw new JPARSECException(\"Matrix dimensions must agree.\");\n }\n }",
"private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}",
"LengthEquals createLengthEquals();",
"@Test\r\n public void sizeSets() throws Exception {\r\n assertEquals(5, sInt.size());\r\n assertEquals(3, sStr.size());\r\n }",
"@Test\n public void arraysEqualsWithEqualArraysReturnsTrue() {\n\n Class<?>[] arrayOne = { String.class, Integer.class };\n Class<?>[] arrayTwo = { String.class, Integer.class };\n\n assertThat(Arrays.equals(arrayOne, arrayTwo)).isTrue();\n }",
"public boolean isCorrectSize(int height, int width);",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }",
"public boolean checkSize(int nx, int ny, int nz) {\n \tif( nx%2 != 0 ) return false;\n \tif( nz%2 != 0 ) return false;\n \treturn true;\n }",
"public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }",
"private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }",
"public boolean isExpectedNumberOfParameters(long numberOfParameters);",
"@Test\n public void checkGetRInputSize()\n {\n int width = 5;\n int height = 10;\n\n QRDecomposition<DMatrixRMaj> alg = createQRDecomposition();\n\n SimpleMatrix A = new SimpleMatrix(height,width, DMatrixRMaj.class);\n RandomMatrices_DDRM.fillUniform((DMatrixRMaj)A.getMatrix(),rand);\n\n alg.decompose((DMatrixRMaj)A.getMatrix());\n\n // check the case where it creates the matrix first\n assertEquals(width, alg.getR(null, true).numRows);\n assertEquals(height, alg.getR(null, false).numRows);\n\n // check the case where a matrix is provided\n alg.getR(new DMatrixRMaj(width,width),true);\n alg.getR(new DMatrixRMaj(height,width),false);\n\n // check some negative cases\n {\n DMatrixRMaj R = new DMatrixRMaj(height,width);\n alg.getR(R,true);\n assertEquals(width,R.numCols);\n assertEquals(width,R.numRows);\n }\n\n {\n DMatrixRMaj R = new DMatrixRMaj(width-1,width);\n alg.getR(R,false);\n assertEquals(width,R.numCols);\n assertEquals(height,R.numRows);\n }\n }",
"void assertSizeEquals(int expected);",
"static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }",
"public boolean isVector() {\n\t\treturn numeros.length == 1 || numeros[0].length == 1;\n\t}",
"void verifyNumberOfDimensions(int ignoreMeNumDimensions) {\n // do nothing on purpose\n }",
"public boolean check(Matrix matrix) {\n return this.getWidth() == matrix.getWidth() && this.getHeight() == matrix.getHeight();\n }",
"boolean isVarargs();",
"boolean isVarargs();",
"boolean isVarargs();",
"@Test\n public void testSizeOnEmpty() {\n assertEquals(\"The size of integer PQ is: \",\n 0, this.iPQ.size());\n assertEquals(\"The size of string PQ is: \",\n 0, this.sPQ.size());\n }",
"@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}",
"boolean sameDimensions(List<Layer> layers);",
"@Test\n public void testGetSize() {\n assertEquals(r1.getSize(), new Dimension2D(7, 4));\n assertEquals(r2.getSize(), new Dimension2D(0, 4));\n assertEquals(r3.getSize(), new Dimension2D(7, 0));\n assertEquals(r4.getSize(), new Dimension2D(0, 0));\n }",
"abstract public boolean argsNotFull();",
"private Boolean isValidMatrix(List<List<Double>> matrix) {\n\t\tInteger nrows = matrix.size();\n\n\t\tList<Integer> rowLengths = matrix.stream().map(List::size).toList();\n\t\tfloat ncols = (float) rowLengths.stream().mapToInt(Integer::intValue).sum() / rowLengths.size();\n\n\t\treturn (ncols == nrows) && (nrows == 3);\n\t}",
"public boolean isEmtpyBySize(){\n\t\treturn size == 0;\n\t}",
"private final void checkRowCount(final int size1, final int size2) {\n\t\tif (size1 == size2) {\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_PASSED,\n\t\t\t\t\tnull);\n\t\t\treturn;\n\t\t} else {\n\t\t\tLOGGER.error(\"Count of rows doesn't match.\");\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\t\tContextComparator.CONTEXT_1.getName() + \" : \" + size1 + \", \"\n\t\t\t\t\t\t\t+ ContextComparator.CONTEXT_2.getName() + \" : \" + size2);\n\t\t\treturn;\n\t\t}\n\t}",
"public void testSize() {\n assertEquals(10, maze1.size());\n }",
"public static boolean checkSize(int expected, int actual) {\n if (expected != actual) {\n System.out.println(\"size() returned \" + actual + \", but expected: \" + expected);\n return false;\n }\n return true;\n }",
"public boolean checkSize(int size) {\r\n\t\tboolean sizeEmpty = size == 0;\r\n\t\treturn sizeEmpty;\r\n\t}",
"private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}",
"public boolean accepts(int numberOfArguments) {\n\t\treturn this.minimumNumberOfParameters <= numberOfArguments &&\n\t\t\tnumberOfArguments <= this.maximumNumberOfParameters;\n\t}",
"public static boolean Match(Vector a, Vector b){\n return a.axis.length == b.axis.length;\n }",
"@Test//test equal\n public void testEqual() {\n MyVector vD1 = new MyVector(ORIGINALDOUBLEARRAY);\n MyVector vD2 = new MyVector(ORIGINALDOUBLEARRAY);\n double[] doubleArray = new double[]{3.0, 2.3, 1.0, 0.0, -1.1};\n MyVector diffVD3 = new MyVector(doubleArray);\n assertEquals(true, vD1.equal(vD2));\n assertEquals(false, vD1.equal(diffVD3));\n MyVector vI1 = new MyVector(ORIGINALINTARRAY);\n MyVector vI2 = new MyVector(ORIGINALINTARRAY);\n int[] intArray = new int[]{1, 2, 3, 4};\n MyVector vI3 = new MyVector(intArray);\n assertEquals(true, vI1.equal(vI2));\n assertEquals(false, vI1.equal(vI3));\n }",
"private void testSize() {\n init();\n assertTrue(\"FListInteger.size(l0)\", FListInteger.size(l0) == 0);\n assertTrue(\"FListInteger.size(l1)\", FListInteger.size(l1) == 1);\n assertTrue(\"FListInteger.size(l2)\", FListInteger.size(l2) == 2);\n assertTrue(\"FListInteger.size(l3)\", FListInteger.size(l3) == 3);\n }",
"public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }",
"public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }",
"private static void validate(final Object object) {\n if (object instanceof Object[]) {\n final Object[] array = (Object[]) object;\n for (int idx = 1; idx < array.length; ++idx) {\n SameDimensionCheck.validate(array[0], array[idx]);\n }\n }\n }",
"@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}",
"private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n\n // make a stream with a data structure containing both states\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes\n }",
"@Test\n public final void testConstructorNonEmpty() {\n Set<String> s = this.createFromArgsTest(\"a\", \"b\", \"c\");\n Set<String> sExpected = this.createFromArgsRef(\"a\", \"b\", \"c\");\n /*\n * Assert that values of variables match expectations\n */\n assertEquals(sExpected, s);\n }",
"private void thenInControllerSizeMustBe(int setSize) {\n log.info(\"Checking how many recipe items are in the set\");\n ArgumentCaptor<Set<Recipe>> argumentCaptor = ArgumentCaptor.forClass(Set.class);\n Mockito.verify(model, times(1)).addAttribute(eq(\"recipes\"), argumentCaptor.capture());\n\n Set setIncontroller = argumentCaptor.getValue();\n assertEquals(setSize, setIncontroller.size());\n }",
"@Test\r\n\tpublic void equalsTest() throws Exception {\r\n\t\t\r\n\t\tUMLMessageArgument msgArg1 = new UMLMessageArgument(\"name1\",\"datatype1\",\"initVal\",false);\r\n\t\tUMLMessageArgument msgArg2 = new UMLMessageArgument(\"name1\",\"datatype1\",\"initVal\",false);\r\n\t\tUMLMessageArgument msgArg3 = new UMLMessageArgument(\"name1\",\"datatype1\",\"initVal\",false);\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\t// vary the datatype\r\n\t\tmsgArg2.setDataType(\"datatype2\");\r\n\t\tassertFalse(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\tmsgArg2.setDataType(\"datatype1\");\r\n\t\tassertTrue(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\t// vary the name\r\n\t\tmsgArg2.setName(\"name2\");\r\n\t\tassertFalse(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\tmsgArg2.setName(\"name1\");\r\n\t\tassertTrue(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\t// vary the initial value\r\n\t\tmsgArg2.setInitializedTo(\"initVal2\");\r\n\t\tassertFalse(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\tmsgArg2.setInitializedTo(\"initVal\");\r\n\t\tassertTrue(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\t// vary the variable arguments flag\r\n\t\tmsgArg2.setHasVarArgs(true);\r\n\t\tassertFalse(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\tmsgArg2.setHasVarArgs(false);\r\n\t\tassertTrue(msgArg1.equals(msgArg2));\r\n\t\tassertEqualsTest(msgArg1,msgArg2,msgArg3);\r\n\t\t\r\n\t\t// verify that IllegalArgumentException is detected\r\n\t\tObject o = new Object();\r\n\t\tException ee = null; \r\n\t\ttry {\r\n\t\t\tassertFalse(msgArg1.equals(o));\r\n\t\t}catch(Exception e) {\r\n\t\t\tee = e;\r\n\t\t}\r\n\t\tassertNull(ee);\r\n\t\t\r\n\t\t// verify that IllegalArgumentException is detected\r\n\t\tException ee2 = null;\r\n\t\tUMLSymbol umlSymbol = new UMLActor(\"1\",\"2\", new UMLSequenceDiagram());\r\n\t\ttry {\r\n\t\t\tassertFalse(msgArg1.equals(umlSymbol));\r\n\t\t}catch(Exception e) {\r\n\t\t\tee2 = e;\r\n\t\t}\r\n\t\tassertNull(ee2);\r\n\t}",
"private Object isValidColumnVector(List<List<Double>> vector) {\n\t\tInteger nrows = vector.size();\n\n\t\tList<Integer> rowLengths = vector.stream().map(List::size).toList();\n\t\tInteger ncols = rowLengths.stream().mapToInt(Integer::intValue).sum() / rowLengths.size();\n\n\t\treturn (nrows == 3) && (ncols == 1);\n\t}",
"public void ensureMessageArraySizes(Message message){\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouse().size() <= 10000);\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouses().size() <= 10000);\n }",
"@Override\n protected boolean checkConstructorInvocation(AnnotatedDeclaredType dt,\n AnnotatedExecutableType constructor, NewClassTree src) {\n return true;\n }",
"public boolean hasConstructor(Class<?>... parmTypes) {\n boolean result = false;\n\n try {\n cut.getConstructor(parmTypes);\n result = true;\n } catch (Exception e) {\n }\n\n return result;\n }",
"public boolean isScalar() {\n return size == 1;\n }",
"public final void hasSize(int expectedSize) {\n checkArgument(expectedSize >= 0, \"expectedSize(%s) must be >= 0\", expectedSize);\n int actualSize = Iterables.size(getSubject());\n if (actualSize != expectedSize) {\n failWithBadResults(\"has a size of\", expectedSize, \"is\", actualSize);\n }\n }",
"protected static boolean ensureNumArgs( String param[], int n ) {\n\t\tif ( n >= 0 && param.length != n || n < 0 && param.length < -n ) {\n\t\t\tSystem.err.println( \"Wrong number (\" + param.length + \") of arguments.\" );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasMaxSize();",
"@Test\r\n public void testSize1() {\r\n Assert.assertEquals(5, set1.size());\r\n }",
"private static void checkParameters(XYMultipleSeriesDataset dataset,\n XYMultipleSeriesRenderer renderer) {\n if (dataset == null || renderer == null\n || dataset.getSeriesCount() != renderer.getSeriesRendererCount()) {\n throw new IllegalArgumentException(\n \"Dataset and renderer should be not null and should have the same number of series\");\n }\n }",
"private boolean argumentsEquals(Command other) {\n return Arrays.equals(this.arguments, other.arguments);\n }",
"@Test\n\tpublic void testLength()throws Exception {\n\n\t\t\t SET setarray= new SET( new int[]{6,7,8,10});\n\t\t\t int returnedValue =setarray.Size(); \n\t\t\t int expectedValue = 4;\n\t\t\t Assert.assertEquals( expectedValue, returnedValue );\n\t}",
"public static boolean isVector(int[] v) { return v != null && v.length == 2; }",
"public boolean equals(JavaMethodSignature sig) {\n\t\t//if their signatures aren't the same length, we've got problems\n\t\tif (this.sig.size() != sig.sig.size())\n\t\t\treturn false;\n\t\t\n\t\t//signatures are the same length, let's run through the parameters\n\t\tfor (int i = 0; i < this.sig.size(); i++) {\n\t\t\tif (this.sig.get(i).type != sig.sig.get(i).type)\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}",
"private static void checkCmdArgs(int numberOfArgs, String[] args) {\n\t\tif (args.length != numberOfArgs) {\n\t\t\tSystem.out.println(\"Wrong number of command line arguments!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}",
"@Test\n public void decompositionShape() {\n checkDecomposition(5, 5 ,false);\n checkDecomposition(10, 5,false);\n checkDecomposition(5, 10,false);\n checkDecomposition(5, 5 ,true);\n checkDecomposition(10, 5,true);\n checkDecomposition(5, 10,true);\n }",
"@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }",
"public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }",
"public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }",
"boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }",
"private void testSize(ArrayGenerator generator) {\n assertEquals(generator.getSize(), generator.getArray().length);\n }",
"private Boolean isValidColumnMatrix(SimpleMatrix matrix) {\n\t\tInteger nrows = matrix.numRows();\n\t\tInteger ncols = matrix.numCols();\n\n\t\treturn (ncols == 1) && (nrows == 3);\n\t}",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"protected void verify() {\n\t\tif (size(r) != n)\n\t\t\tthrow new IllegalArgumentException(\"size is incorrect\");\n\t\tverify(r);\n\t}",
"@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }",
"private void assertValidity() {\n if (latitudes.size() != longitudes.size()) {\n throw new IllegalStateException(\"GIS location needs equal number of lat/lon points.\");\n }\n if (!(latitudes.size() == 1 || latitudes.size() >= 3)) {\n throw new IllegalStateException(\"GIS location needs either one point or more than two.\");\n }\n }",
"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 }",
"@Property\n public boolean reverse_has_the_same_size_as_original(@ForAll List<?> original) {\n return Lists.reverse(original).size() == original.size();\n }",
"public void sizeHasBeenSet() {\n isSizeSet = true;\n }",
"private static boolean isValidMultiplication(int[][] A, int[][] B) {\n if(A.length != A[0].length || B.length != B[0].length) {\n return false;\n }\n\n //check same size\n if(A.length != B.length) {\n return false;\n }\n\n //check size is power of 2\n if((A.length & (A.length - 1)) != 0) {\n return false;\n }\n\n return true;\n }",
"private static boolean\n\t\tdoParametersMatch(Class<?>[] types, Object[] parameters)\n\t{\n\t\tif (types.length != parameters.length) return false;\n\t\tfor (int i = 0; i < types.length; i++)\n\t\t\tif (parameters[i] != null) {\n\t\t\t\tClass<?> clazz = parameters[i].getClass();\n\t\t\t\tif (types[i].isPrimitive()) {\n\t\t\t\t\tif (types[i] != Long.TYPE && types[i] != Integer.TYPE &&\n\t\t\t\t\t\ttypes[i] != Boolean.TYPE) throw new RuntimeException(\n\t\t\t\t\t\t\"unsupported primitive type \" + clazz);\n\t\t\t\t\tif (types[i] == Long.TYPE && clazz != Long.class) return false;\n\t\t\t\t\telse if (types[i] == Integer.TYPE && clazz != Integer.class) return false;\n\t\t\t\t\telse if (types[i] == Boolean.TYPE && clazz != Boolean.class) return false;\n\t\t\t\t}\n\t\t\t\telse if (!types[i].isAssignableFrom(clazz)) return false;\n\t\t\t}\n\t\treturn true;\n\t}",
"@Test\n public void equals() {\n float[] a = new float[] {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f, 6.0f}; \n assertTrue(Vec4f.equals(a, 2, b, 3));\n assertTrue(! Vec4f.equals(a, 0, b, 0));\n \n float[] a4 = new float[] {1.0f, 2.0f, 3.0f, 4.0f}; \n \n float[] b4 = new float[] {1.0f, 2.0f, 3.0f, 4.0f};\n float[] c4 = new float[] {2.0f, 2.0f, 3.0f, 4.0f};\n float[] d4 = new float[] {1.0f, 4.0f, 3.0f, 4.0f};\n float[] e4 = new float[] {1.0f, 2.0f, 6.0f, 4.0f};\n float[] f4 = new float[] {1.0f, 2.0f, 3.0f, 5.0f};\n assertTrue(Vec4f.equals(a4,b4));\n assertTrue(!Vec4f.equals(a4,c4));\n assertTrue(!Vec4f.equals(a4,d4));\n assertTrue(!Vec4f.equals(a4,e4));\n assertTrue(!Vec4f.equals(a4,f4)); \n }",
"@Override public boolean accepts(Type other) {\n if(!(other instanceof FixArray)) return false;\n FixArray that = (FixArray) other;\n return this.length == that.length\n && this.indexType().equals(that.indexType())\n && this.elemType.accepts(that.elemType);\n }",
"private int checkConstructor(ASTVariableDeclaratorId node, Object data) {\n Node parent = node.getParent();\n if (parent.getNumChildren() >= 2) {\n ASTAllocationExpression allocationExpression = parent.getChild(1)\n .getFirstDescendantOfType(ASTAllocationExpression.class);\n ASTArgumentList list = null;\n if (allocationExpression != null) {\n list = allocationExpression.getFirstDescendantOfType(ASTArgumentList.class);\n }\n\n if (list != null) {\n ASTLiteral literal = list.getFirstDescendantOfType(ASTLiteral.class);\n if (!isAdditive(list) && literal != null && literal.isStringLiteral()) {\n return 1;\n }\n return processAdditive(data, 0, list, node);\n }\n }\n return 0;\n }",
"@Test\n public void shouldHaveANoArgsConstructor() {\n assertThat(AssignForceBatch.class, hasValidBeanConstructor());\n }",
"@Override\n protected boolean hasValidArgumentValues(@NotNull ImmutableList<Parameter> arguments) {\n boolean valid = true;\n Value rowIndex = arguments.get(0).value();\n Value columnIndex = arguments.get(1).value();\n\n Preconditions.checkValueType(rowIndex, ValueType.NUMBER);\n Preconditions.checkValueType(columnIndex, ValueType.NUMBER);\n\n checkArgument(!rowIndex.hasImaginaryValue(), \"Row index may not be imaginary\");\n checkArgument(!columnIndex.hasImaginaryValue(), \"Column index may not be imaginary\");\n\n // Check for value bounds on row index\n if (!NumberUtil.isInteger(rowIndex.realPart()) || rowIndex.realPart() < 0 || rowIndex.realPart() > getEnvironment().getHomeScreen().getMaxRows()) {\n valid = false;\n }\n\n // Check for value bounds on column index\n if (!NumberUtil.isInteger(columnIndex.realPart()) || columnIndex.realPart() < 0 || columnIndex.realPart() > getEnvironment().getHomeScreen().getMaxColumns()) {\n valid = false;\n }\n\n return valid;\n }",
"private void checkFormat() {\n if (y.pixelStride != 1) {\n throw new IllegalArgumentException(String.format(\n \"Pixel stride for Y plane must be 1 but got %d instead\",\n y.pixelStride\n ));\n }\n if (u.pixelStride != v.pixelStride || u.rowStride != v.rowStride) {\n throw new IllegalArgumentException(String.format(\n \"U and V planes must have the same pixel and row strides \" +\n \"but got pixel=%d row=%d for U \" +\n \"and pixel=%d and row=%d for V\",\n u.pixelStride, u.rowStride,\n v.pixelStride, v.rowStride\n ));\n }\n if (u.pixelStride != 1 && u.pixelStride != 2) {\n throw new IllegalArgumentException(\n \"Supported pixel strides for U and V planes are 1 and 2\"\n );\n }\n }",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"@Test\n public void getSize() {\n // Testing for Shape Rectangle that mutates its Size and see the size matches.\n assertEquals(defaultSize1, defaultShape1.getSize());\n Size newRectangleSize = new Size(50, 50);\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, newRectangleSize);\n assertEquals(newRectangleSize, defaultShape1.getSize());\n assertNotEquals(defaultSize1, defaultShape1.getSize());\n // Testing for OvalShape that mutates and see it matches.\n assertEquals(defaultSize2, defaultShape2.getSize());\n Size newOvalSize = new Size(15, 15);\n defaultShape2 = new Oval(defaultColor2, defaultPosition2, newOvalSize);\n assertEquals(newOvalSize, defaultShape2.getSize());\n assertNotEquals(defaultSize2, defaultShape2.getSize());\n }"
]
| [
"0.60371774",
"0.5881246",
"0.58297104",
"0.58271843",
"0.5781029",
"0.5768713",
"0.57124025",
"0.5646671",
"0.56022316",
"0.559897",
"0.5586396",
"0.5586396",
"0.5586396",
"0.5586396",
"0.5537277",
"0.55210155",
"0.5433735",
"0.5425021",
"0.5400972",
"0.5359744",
"0.5352844",
"0.5352586",
"0.53486437",
"0.5342714",
"0.5338879",
"0.53303486",
"0.53260094",
"0.53013575",
"0.5288108",
"0.52843165",
"0.5267152",
"0.5261677",
"0.5246439",
"0.52207536",
"0.52207536",
"0.52207536",
"0.5215579",
"0.52033794",
"0.51887906",
"0.5172013",
"0.5165513",
"0.5155999",
"0.5154342",
"0.5151337",
"0.51112264",
"0.5098378",
"0.50909585",
"0.50664836",
"0.5045562",
"0.5044897",
"0.50418615",
"0.50384486",
"0.5018685",
"0.4998183",
"0.49933052",
"0.49892938",
"0.49774003",
"0.4960299",
"0.49551535",
"0.49534565",
"0.49528748",
"0.49488288",
"0.493467",
"0.49325877",
"0.49321008",
"0.49312922",
"0.49278262",
"0.49270502",
"0.4920807",
"0.49156812",
"0.49065265",
"0.49057034",
"0.48909023",
"0.48773926",
"0.48655227",
"0.48641968",
"0.48628476",
"0.486156",
"0.48540574",
"0.48540574",
"0.4852849",
"0.48487172",
"0.4845923",
"0.48316312",
"0.4827474",
"0.48037413",
"0.4800657",
"0.47915116",
"0.47909468",
"0.47847733",
"0.4775587",
"0.47745895",
"0.47710258",
"0.47689232",
"0.4768899",
"0.47571632",
"0.47565424",
"0.47516546",
"0.4749211",
"0.47439706"
]
| 0.5508785 | 16 |
Validates an array argument. | private static void validate(final Object object) {
if (object instanceof Object[]) {
final Object[] array = (Object[]) object;
for (int idx = 1; idx < array.length; ++idx) {
SameDimensionCheck.validate(array[0], array[idx]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String validate(Data[] data);",
"public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }",
"public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"public void testCheckArray_NullArg() {\n try {\n Util.checkArray(null, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }",
"protected void validateAttenuator(int[] param) {\n }",
"protected boolean validateData(String [] data) {\n return true;\n }",
"protected void validatePreamp(int[] param) {\n }",
"protected void validateItem(Item[] param) {\r\n }",
"@Test\n public void validateArrayIndexIsNull(){\n String[] a = new String[2];\n Validate.validIndex(a,20);\n }",
"@Test\n public void testValidateParams() {\n String[] params;\n\n // valid params - just the application name\n params = new String[]{\"Application\"};\n instance.validateParams(params);\n\n // valid params - extra junk\n params = new String[]{\"Application\", \"Other\", \"Other\"};\n instance.validateParams(params);\n\n // invalid params - empty\n params = new String[0];\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - null first param\n params = new String[]{null};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - empty string\n params = new String[]{\"\"};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n }",
"public abstract boolean isArrayParams();",
"protected void validateFact(Fact[] param) {\r\n\r\n }",
"public static boolean isArray_min() {\n return false;\n }",
"protected void validateAnimalModel(AnimalModel[] param) {\n }",
"static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }",
"protected void validateAttribute(FactAttribute[] param) {\r\n\r\n }",
"@Override\r\n public boolean isArray() throws Exception\r\n {\n return false;\r\n }",
"public static boolean isArray_estLength() {\n return false;\n }",
"static boolean checkSplitsArray (double[][] splitsArray) { throw new RuntimeException(); }",
"public static void isValid(ArrayList al) throws IllegalArgumentException {\n\t\n\t//null check\n\tif(al != null) {\n\t //validate that it is not empty\n\t if(al.isEmpty()) throw new IllegalArgumentException();\n\t //validate that it has a size greater than 0\n\t if(al.size() < 1) throw new IllegalArgumentException();\n\t} else throw new IllegalArgumentException();\n }",
"@Test\n public void testGenericArrayType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String[].class);\n typeList.addAll(getBothParameters(ArrayToListArray.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"private boolean isValidQuestionsArgument(ArrayList<String> argArray) {\n boolean isValid = true;\n if (argArray.size() != ADD_NOTE_ARGUMENTS) {\n TerminusLogger.warning(String.format(\"Failed to find %d arguments: %d arguments found\",\n ADD_NOTE_ARGUMENTS, argArray.size()));\n isValid = false;\n } else if (CommonUtils.hasEmptyString(argArray)) {\n TerminusLogger.warning(\"Failed to parse arguments: some arguments found is empty\");\n isValid = false;\n }\n return isValid;\n }",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"private void improperArgumentCheck(Point[] points) {\n int N = points.length;\n for (int i = 0; i < N; i++) {\n if (null == points[i])\n throw new NullPointerException();\n }\n\n Arrays.sort(points);\n for (int i = 1; i < N; i++) {\n if (points[i-1].equals(points[i]))\n throw new IllegalArgumentException();\n }\n }",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"public static void checkMinimumLength(String[] value, String argName, int minLength) {\n\t\t//Arguments.notNullOrEmpty(value, argName);\n\t\tif(value.length < minLength) {\n\t\t\tthrow new IllegalArgumentException (\"The string '\" + argName + \"' does not have minimum length of '\" + minLength + \"'\");\n\t\t}\n\t}",
"private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}",
"public ArgumentChecker(String[] words) {\n\n if (words.length < 1 || words == null) {\n throw new IllegalArgumentException();\n }\n for (String word : words) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n }",
"public void assertNotEmpty(Object[] objArr) {\n if (objArr == null || objArr.length == 0) {\n throw new IllegalArgumentException(\"Arguments is null or its length is empty\");\n }\n }",
"public static boolean isArray_length() {\n return false;\n }",
"public static boolean check(String[] i) {\r\n\t\tboolean result = false;\r\n\t\tif (i != null && i.length != 0) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n public void validateArgs(String[] args, ArgsValidation check) throws ArgsException\n {\n try\n {\n check.validateTwoArgs(args);\n }\n catch(ArgsException exception)\n {\n throw exception;\n }\n }",
"protected void checkArrays(String[] propertyNames, Object[] values)\n throws ModelException {\n if (propertyNames == null || values == null\n || propertyNames.length != values.length)\n throw new ModelException(ModelException.REASON_MULTI_PROPERTY_MISMATCH);\n }",
"@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}",
"public static boolean isArray_sum_e() {\n return false;\n }",
"@Test\n public void validMountainArray() {\n ValidMountainArray_941 validMountainArray = new ValidMountainArray_941();\n boolean test1 = validMountainArray.validMountainArray(new int[] {2, 1});\n Assert.assertEquals(test1,false);\n\n boolean test2 = validMountainArray.validMountainArray(new int[] {3, 5, 5});\n Assert.assertEquals(test2,false);\n\n boolean test3 = validMountainArray.validMountainArray(new int[] {0, 3, 2, 1});\n Assert.assertEquals(test3,true);\n }",
"private void validate(int[] seam) {\n if (width <= 1) throw new IllegalArgumentException(\"the width or height of the picture is <= 1\");\n if (seam == null) throw new IllegalArgumentException(\"argument can not be null\");\n if (seam.length != height) throw new IllegalArgumentException(\"argument array is of length\" + width);\n for (int i = 0; i < seam.length; i++) {\n validate(seam[i], width);\n if (i > 0 && Math.abs(seam[i] - seam[i - 1]) > 1) {\n throw new IllegalArgumentException(\"Two adjacent entries differ by more than 1\");\n }\n }\n }",
"public boolean validate(Text[] texts);",
"private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}",
"private static boolean validateInput1(String[] input) {\n\t\tif (input.length != 1) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasArray()\r\n/* 122: */ {\r\n/* 123:151 */ return true;\r\n/* 124: */ }",
"boolean hasArray();",
"@Override\n public boolean isArray() {\n return false;\n }",
"protected void validatePetModel(PetModel[] param) {\n }",
"public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}",
"public boolean isArray();",
"default void checkLengthOfArrays(double[] a, double[] b) throws IllegalArgumentException {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"Dimensions are not the same.\");\n }\n }",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"private static void checkPassedInArguments(String[] args, EquationManipulator manipulator) {\n // Convert arguments to a String\n StringBuilder builder = new StringBuilder();\n for (String argument: args) {\n builder.append(argument + \" \");\n }\n \n // check if equation is valid\n String[] equation = manipulator.getEquation(builder.toString());\n if (equation.length == 0) {\n // unable to parse passed in arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else {\n // arguments were passed in correctly\n System.out.println(\"Wohoo! It looks like everything was passed in correctly!\"\n + \"\\nYour equation is: \" + builder.toString() + \"\\n\");\n handleArguments(equation, manipulator);\n }\n }",
"public static boolean isExpressionValid(String[] input) {\n\t\ttry {\n\t\t\tif (isFirstArgumentValid(input[0].toUpperCase()) && isSecondArgumentValid(input[1])\n\t\t\t\t\t&& isThirdArgumentValid(input[2].toUpperCase()) && isFourthArgumentValid(input[3].toUpperCase())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something wrong with the input parameters\");\n\t\t}\n\t\treturn false;\n\t}",
"protected void validateRxRangeList(cwterm.service.rigctl.xsd.FreqRange[] param) {\n }",
"public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }",
"public void testConstructorWithMalformedArrayValuesProperty1() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"ArrayTypeRule createArrayTypeRule();",
"private void validateInputParameters(){\n\n }",
"public static boolean isArray_cost() {\n return false;\n }",
"protected void validateLogModel(LogModel[] param) {\n }",
"public ArgumentChecker(String[] titles, String[] words) {\n for (String word : words) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n for (String title: titles) {\n if (title.length() < 1 || title == null) {\n throw new IllegalArgumentException();\n }\n }\n }",
"public static boolean isArray_amtype() {\n return false;\n }",
"public static boolean isArray_quality() {\n return false;\n }",
"private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"protected static boolean ensureNumArgs( String param[], int n ) {\n\t\tif ( n >= 0 && param.length != n || n < 0 && param.length < -n ) {\n\t\t\tSystem.err.println( \"Wrong number (\" + param.length + \") of arguments.\" );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isArray_sum_a() {\n return false;\n }",
"public static boolean isArray_dataType() {\n return false;\n }",
"protected void validateFilters(cwterm.service.rigctl.xsd.Filter[] param) {\n }",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"public static UnaryExpression arrayLength(Expression array) { throw Extensions.todo(); }",
"public static boolean isValid(String args[]){\n \n if(args.length < 2){\n System.out.println(\"Not enough arguments detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n \n Scanner scanin = new Scanner(args[0]);\n Scanner scanin2 = new Scanner(args[1]);\n\t \n if(!scanin.hasNextInt() || !scanin2.hasNextInt()){\n System.out.println(\"Invalid argument type detected. Please enter two\"\n + \" integer arguments.\");\n return false;\n }\n\t else\n return true;\n }",
"public static boolean isArray_data() {\n return true;\n }",
"private boolean validatePacket(String[] packet)throws NullPointerException\n\t{\n\n\t\tif(packet == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Packet was null\");\n\t\t}\n\n\t\tfor(int i = 2 ; i< packet.length ; i++)\n\t\t{\n\t\t\tif(packet.length > MAX_SIZE)\n\t\t\t{\n\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Message \" + (i-1)+\": \" + \"'\" + packet[i] + \"'\" + \"is to long\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isArray() {\n return false;\n }",
"public boolean isArray() {\n return false;\n }",
"public void verifyValidityOfArray(ArrayList<String> commandArrayList) throws Exception {\n int start_i = 0;\n int curr_i;\n if (!commandArrayList.get(0).equals(FILTER_LINE)) {\n throw new MissingFilterSubSectionException();\n }\n if (!commandArrayList.get(2).equals(ORDER_LINE)) {\n throw new MissingOrderSubSectionException();\n }\n for (int i = 1; i < commandArrayList.size(); i++) {\n if (FILTER_LINE.equals(commandArrayList.get(i))) {\n curr_i = i;\n int MAX_SECTION_LENGTH = 4;\n if ((curr_i - start_i) > MAX_SECTION_LENGTH) {\n throw new MissingFilterSubSectionException();\n }\n int FILTER_TO_ORDER_DISTANCE = 2;\n if (!ORDER_LINE.equals(commandArrayList.get(curr_i + FILTER_TO_ORDER_DISTANCE))) {\n throw new MissingOrderSubSectionException();\n }\n start_i = curr_i;\n }\n }\n }",
"public ArgumentChecker(String[] titles, String[] wordsRequired, String[] wordsExcluded) {\n for (String word : wordsRequired) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n for (String word : wordsExcluded) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n for (String title: titles) {\n if (title.length() < 1 || title == null) {\n throw new IllegalArgumentException();\n }\n }\n }",
"static boolean attribute_arg_value_array(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"attribute_arg_value_array\")) return false;\n if (!nextTokenIs(b, L_BRACKET)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, L_BRACKET);\n r = r && attribute_arg_value_array_1(b, l + 1);\n r = r && consumeToken(b, R_BRACKET);\n exit_section_(b, m, null, r);\n return r;\n }",
"protected void validateTxRangeList(cwterm.service.rigctl.xsd.FreqRange[] param) {\n }",
"public static boolean isArray_source() {\n return false;\n }",
"private void validateData() {\n }",
"@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }",
"public void testConstructorWithMalformedArrayValuesProperty2() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"1,2}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"static private boolean isArray(Object[] ids) \n { \n boolean result = true; \n for (Object id : ids) \n { \n if (id instanceof Integer == false) \n { \n result = false; \n break; \n } \n } \n return result; \n }",
"private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }",
"private static boolean argsAreValid(String[] args) {\n try {\n if (args.length != NUM_OF_ARGS) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n File sourceDirectory = new File(args[0]);\n File commandFile = new File(args[1]);\n if ((!sourceDirectory.isDirectory()) || (!commandFile.isFile())) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n BAD_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n } catch (Exception e) {\n System.err.println(TypeTwoErrorException.TYPE_II_GENERAL_MSG +\n UNKNOWN_ERROR_COMMAND_LINE_ARGUMENTS);\n return false;\n }\n return true;\n }",
"@Test\n\t/**\n\t * Testing the arrays.\n\t * Testing:\n\t * - A correct sample program.\n\t * - A sample program containing spelling and context free errors.\n\t * - A sample program containing context errors.\n\t * - A sample program containing runtime errors.\n\t * \n\t * @throws ParseException\n\t * @throws IOException\n\t */\n\tpublic void arrayTest() throws ParseException, IOException{\n\t\tint[] input = {};\n\t\tint[] output = {0, -1, -1, -1, -1};\n\t\tcheckRuntime(\"arrayCorrect\", input, output);\n\t\t\n\t\t/** Check whether a program contains syntax errors. */\n\t\tcheckFail(\"arraySpellingContextFreeSyntaxError\");\n\t\t\n\t\t/** Check whether a program contains the given errors. */\n\t\tSet<String> errors = new HashSet<String>();\n\t\terrors.add(\"Line 8:16 - Expected type 'Array [0..4] of Integer' but found 'Integer'\");\n\t\terrors.add(\"Line 11:26 - Expected type 'Integer' but found 'Boolean'\");\n\t\terrors.add(\"Line 14:36 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 16:10 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 16:34 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 21:7 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 21:38 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 22:7 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\t\n\t\terrors.add(\"Line 22:38 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\t\t\n\t\terrors.add(\"Line 23:7 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 23:31 - Expected type 'Integer' but found 'Array [0..4] of Integer'\");\n\t\terrors.add(\"Line 25:19 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 26:19 - Expected type 'Integer' but found 'Boolean'\");\n\t\tcheckContextFail(\"arrayContextError\", errors);\n\t\t\n\t\t/** Check whether a program gives a runtime error. */\n\t\tcheckRuntimeFail(\"arrayRuntimeError\");\n\t}",
"public static void main(String[] args) throws MiExcepcion {\n\t\tint []arr={2,-4,-1,5,7};\n\t\tTestExcepcion.validar(arr);\n\n\t}",
"@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }",
"public boolean isArray(){\n\t\treturn false;\n\t}",
"static boolean AnyArrayTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyArrayTest\")) return false;\n if (!nextTokenIs(b, K_ARRAY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 3, K_ARRAY, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"private boolean arrayrefOfArrayType(Instruction o, Type arrayref){\n\t\tif (! ((arrayref instanceof ArrayType) || arrayref.equals(Type.NULL)) )\n\t\t\t\tconstraintViolated(o, \"The 'arrayref' does not refer to an array but is of type \"+arrayref+\".\");\n\t\treturn (arrayref instanceof ArrayType);\n\t}",
"public void testConstructorWithMalformedArrayValuesProperty7() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"2\", \"{{1,2},,{3,5}}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"public static <T> void checkNull(T[] obj, final int length){\n if(length<0){\n throw new IllegalArgumentException(String.format(\"Invalid length specified %d\", length));\n }\n if(obj == null || obj.length != length){\n throw new IllegalArgumentException(String.format(\"Either Array is\" +\n \" null or lenght of array is not %d\", length));\n }\n for(T val:obj){\n checkNull(val);\n }\n }",
"public static boolean ArrayTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ArrayTest\")) return false;\n if (!nextTokenIs(b, K_ARRAY)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = AnyArrayTest(b, l + 1);\n if (!r) r = TypedArrayTest(b, l + 1);\n exit_section_(b, m, ARRAY_TEST, r);\n return r;\n }",
"private static boolean validateInput2(String[] input) {\n\t\tif (input.length != 2) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void testConstructorWithMalformedArrayValuesProperty6() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2,3,,5}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"static boolean array(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"array\")) return false;\n if (!nextTokenIs(b, L_BRACKET)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeToken(b, L_BRACKET);\n p = r; // pin = 1\n r = r && report_error_(b, array_1(b, l + 1));\n r = p && consumeToken(b, R_BRACKET) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public void testConstructorWithSingleDimensionSimpleTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'int'.\", TYPE_INT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] params = array.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, params.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", param1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'int'.\", param1.getType().equals(TYPE_INT)\r\n && param2.getType().equals(TYPE_INT));\r\n assertEquals(\"Element should be 1.\", \"1\", param1.getValue());\r\n assertEquals(\"Element should be 2.\", \"2\", param2.getValue());\r\n }",
"public void testConstructorWithMalformedArrayValuesProperty3() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_SIMPLE_STRING, \"1\", \"{\\\"1\\\",\\\"2}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"private void validateSortedData() {\n Preconditions.checkArgument(\n indices.length == values.length,\n \"Indices size and values size should be the same.\");\n if (this.indices.length > 0) {\n Preconditions.checkArgument(\n this.indices[0] >= 0 && this.indices[this.indices.length - 1] < this.n,\n \"Index out of bound.\");\n }\n for (int i = 1; i < this.indices.length; i++) {\n Preconditions.checkArgument(\n this.indices[i] > this.indices[i - 1], \"Indices duplicated.\");\n }\n }",
"protected void validate_return(User[] param){\r\n \r\n }"
]
| [
"0.7084623",
"0.68651766",
"0.6825255",
"0.681486",
"0.6783325",
"0.6762495",
"0.6539758",
"0.6527997",
"0.6505754",
"0.64115053",
"0.6274265",
"0.6177412",
"0.6150035",
"0.6139719",
"0.6112873",
"0.60458267",
"0.60140705",
"0.5967015",
"0.59663033",
"0.5945878",
"0.5933867",
"0.59311235",
"0.59261584",
"0.5910488",
"0.58918625",
"0.58783627",
"0.58623445",
"0.58442354",
"0.58383626",
"0.5823138",
"0.5818047",
"0.5806882",
"0.5780648",
"0.57781875",
"0.5769458",
"0.5766",
"0.5749998",
"0.57452184",
"0.5739522",
"0.5729544",
"0.5728504",
"0.5718093",
"0.5706177",
"0.5704479",
"0.5700642",
"0.5685764",
"0.5685051",
"0.56806767",
"0.5677394",
"0.56761587",
"0.5673582",
"0.56734896",
"0.5668902",
"0.56639504",
"0.5653879",
"0.5644875",
"0.56330615",
"0.5612566",
"0.5592672",
"0.5584159",
"0.5580256",
"0.5569576",
"0.556563",
"0.55655056",
"0.5555654",
"0.5547501",
"0.5545816",
"0.5512001",
"0.5509302",
"0.5498154",
"0.547184",
"0.5456213",
"0.5456213",
"0.54502153",
"0.5446901",
"0.5445824",
"0.542394",
"0.5408578",
"0.5406251",
"0.5406138",
"0.54049695",
"0.5402405",
"0.5382814",
"0.53815335",
"0.5380707",
"0.5379579",
"0.53783196",
"0.5370901",
"0.5368087",
"0.53656584",
"0.5364081",
"0.53603965",
"0.53559786",
"0.5355265",
"0.53485346",
"0.53386664",
"0.53245395",
"0.531874",
"0.5316654",
"0.5316572"
]
| 0.6086284 | 15 |
ServletConfig methods Returns the value of the specified init parameter, or null if no such init parameter is defined. | public String getInitParameter( String name ) {
return (String) _initParameters.get( name );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void init() throws ServletException {\n super.init();\n\n dbConfigResource = getServletContext().getInitParameter(\"dbConfigResource\");\n jspPath = getServletContext().getInitParameter(\"jspPath\");\n }",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\t\n\t\tString good = config.getInitParameter(\"good\");\n\t\t\n\t\tSystem.out.println(\"good = \" + good);\n\t\t\n\t\tEnumeration<String> enu = this.getInitParameterNames();\n\t\t\n\n\t\twhile (enu.hasMoreElements()) {\n\n\t\t\tString val = enu.nextElement();\n\t\t\tSystem.out.println(\"val = \" + val);\n\n\t\t}\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tServletConfig config=getServletConfig();\n\t\t\n\t\tString paramX=getInitParameter(\"param1\"); //@WebInitParam'da ki (name=\"param1\") aynı olmak zorunda yoksa null değer dönmektedir.\n\t\tString paramY=getInitParameter(\"param2\");\n\t\tString servletName=config.getServletName();\n\t\t\n\t\tSystem.out.println(\"param1:\"+paramX);\n\t\tSystem.out.println(\"param2:\"+paramY);\n\t\tSystem.out.println(servletName);\n\t\t\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tServletConfig\tservletConfig = this.getServletConfig();\n\t\tString mychinaname = servletConfig.getInitParameter(\"mychinaname\");\n\t\tString myenglishname = servletConfig.getInitParameter(\"myenglishname\");\n\t\tSystem.out.println(\"mychinaname :\" + mychinaname);\n\t\tSystem.out.println(\"myenglishname :\" + myenglishname);\n\t\tServletContext servletContext = this.getServletContext();\n\t\tString string = (String) servletContext.getAttribute(\"myname\");\n\t\tSystem.out.println(\"myname is : \" + string);\n\t}",
"public ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tSystem.out.println(\"BServlet ServletConfig=\"+config.toString());\n\t\tthis.config=config;\n\t}",
"void init(ServletConfig config) throws ServletException;",
"public String getInitParameter(java.lang.String name)\n {\n \treturn config.getInitParameter(name);\n }",
"public ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\tmConfig = config;\n\t}",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\t\r\n\t}",
"@Override\n public void init(ServletConfig servletConfig) throws ServletException {\n }",
"@Override\r\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}",
"public void init(ServletConfig arg0) throws ServletException {\n\t\t\r\n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\t\n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\trutaJsp=config.getInitParameter(\"rutaJsp\");\n\t\tSystem.out.println(rutaJsp);\n\t\ttry {\n\t\t\tInitialContext initContext =new InitialContext();\n\t\t\tContext env=(Context)initContext.lookup(\"java:comp/env\");\n\t\t\tds=(DataSource) env.lookup(\"jdbc/DB1LS221\");\n\t\t} catch (NamingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\tpublic void init() throws ServletException {\n\t\tpassord = getServletConfig().getInitParameter(\"passord\");\r\n\t\t//Henter timeout parameteren i web.xml\r\n\t\ttimeout = Integer.parseInt(getServletContext().getInitParameter(\"timeout\"));\r\n\t}",
"@Override\n\tpublic void init(ServletConfig arg0) throws ServletException {\n\t\t\n\t}",
"@Override\n\tpublic void init(ServletConfig arg0) throws ServletException {\n\t\t\n\t}",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"public void init(ServletConfig config) throws ServletException {\n\t\t \n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n//\t\tdriver = config.getInitParameter(\"driver\");\n//\t\tSystem.out.print(driver);\n//\t\turl = config.getInitParameter(\"url\");\n//\t\tuser = config.getInitParameter(\"user\");\n//\t\tpassword = config.getInitParameter(\"password\");\n\t\tgetConnection();\n\t}",
"public void init(ServletConfig config) throws ServletException {\r\n\t}",
"public void init(ApplicationConfig config) throws ServletException;",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn config;\n\t}",
"protected void processInit(ServletConfig cfg) throws ServletException\n {\n }",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t}",
"@Override\r\n public ServletConfig getServletConfig() {\n return null;\r\n }",
"public void init(ServletConfig config) throws ServletException {\n\n\t}",
"@Override\n public void init() throws ServletException {\n loginTime = Integer.parseInt(getServletConfig().getInitParameter(\"LoginTime\"));\n }",
"@Override\n public ServletConfig getServletConfig() {\n return null;\n }",
"@Override\r\n\tpublic void init() throws ServletException {\n\t\tBufferedReader in = new BufferedReader(\r\n new InputStreamReader(getClass().getResourceAsStream(\"/config.ini\")));\r\n String inputLine;\r\n String response = \"\";\r\n try {\r\n while((inputLine=in.readLine())!=null){\r\n response += inputLine;\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(ParameterServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }finally{\r\n \ttry {\r\n\t\t\t\tin.close();\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 }\r\n model = new ParameterModel();\r\n model.setAddress(response.split(\" \")[0]);\r\n model.setPort( Integer.parseInt(response.split(\" \")[1]));\r\n model.setAddressIp(response.split(\" \")[2]);\r\n\t}",
"@Override\n\tfinal public ServletConfig getServletConfig() {\n\n\t\treturn config;\n\n\t}",
"protected void getInitParameters(ServletConfig cfg) throws ServletException\n {\n alp_install_path_ = cfg.getInitParameter(COUGAAR_INSTALL_PATH_P);\n if (alp_install_path_ == null) {\n throw new ServletException(\"argument 'org.cougaar.install.path' undefined\");\n }\n if (! alp_install_path_.endsWith(File.separator))\n alp_install_path_ = alp_install_path_ + File.separator;\n\n System.setProperty(COUGAAR_INSTALL_PATH_P, alp_install_path_);\n\n String parameters_file = cfg.getInitParameter(SERVLET_PARAMETER_FILE_P);\n if (parameters_file == null)\n throw new ServletException(\"argument '\"+SERVLET_PARAMETER_FILE_P+\"' undefined\");\n\n\n \tparameters_ = ParameterFileReader.getInstance(parameters_file);\n template_tag_prefix_ = parameters_.getParameter(CLASS_NAME, TEMPLATE_TAG_PREFIX_P, \"DELTA_\");\n use_applet_tag_ = parameters_.getParameter(CLASS_NAME, USE_APPLET_TAG_P, false);\n enableTimestamps = parameters_.getParameter(CLASS_NAME, ENABLE_TIMESTAMPS_P, false);\n\n String fs = File.separator;\n template_path_ = alp_install_path_ + ParameterFileReader.concatenate(parameters_.getParameterValues(CLASS_NAME, TEMPLATE_PATH_P), fs, \"\") + fs;\n\n if (template_path_.length() == 0)\n throw new ServletException(\"argument '\"+TEMPLATE_PATH_P+\"' undefined\");\n\n if (! template_path_.endsWith(File.separator))\n template_path_ = template_path_ + File.separator;\n\n }",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n\t\tseasonList=config.getInitParameter(\"season-list\");\n\t\tseasonArr=seasonList.split(\",\");\n\t\t\n\n\t\t\n\n\t}",
"public void init(FilterConfig filterConfig) throws ServletException {\n\t\tString site = filterConfig.getInitParameter(\"Site\");\n\t\tSystem.out.println(\"site: \" + site);\n\t}",
"@Override\r\n public void init(ServletConfig arg0) throws ServletException {\n\r\n }",
"@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\tthis.config = filterConfig;\n\t}",
"public void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n \tthis.pageName = getInitParameter(\"pageName\");\r\n \tthis.template = service.templates(pageName); \r\n\r\n\t\t\r\n\t}",
"public void init(ServletConfig config) throws ServletException {\n super.init(config);\n }",
"@Override\n public void init( ServletConfig servletConfig )\n throws ServletException {\n super.init( servletConfig );\n }",
"@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tSystem.out.println(\"Passage dans init\");\n\t}",
"public void init(FilterConfig paramFilterConfig) throws ServletException {\n\t\tthis.config = paramFilterConfig;\r\n\t}",
"public void init(ServletConfig config) throws ServletException {\n \tsuper.init(config);\n \ttry {\n \t\tprops = new Properties();\n \t\tprops.load(new FileInputStream(config.getServletContext().getRealPath(\"/\") + config.getInitParameter(\"propPath\")));\n \t} catch (IOException e) {\n\t\t\te.getMessage();\n\t\t}\t\t\n\t}",
"@Override\r\n public void init(ServletConfig config) throws ServletException {\n \tsuper.init(config);\r\n \tconn = DBConnection.getDBConnection(config);\r\n }",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn super.getServletConfig();\n\t}",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn super.getServletConfig();\n\t}",
"public void init() {\n ServletContext context = getServletContext();\r\n host = context.getInitParameter(\"host\");\r\n port = context.getInitParameter(\"port\");\r\n user = context.getInitParameter(\"user\");\r\n pass = context.getInitParameter(\"pass\");\r\n }",
"public void init() {\n ServletContext context = getServletContext();\n host = context.getInitParameter(\"host\");\n port = context.getInitParameter(\"port\");\n user = context.getInitParameter(\"user\");\n pass = context.getInitParameter(\"pass\");\n }",
"public void init()\n {\n context = getServletContext();\n parameters = (Siu_ContainerLabel)context.getAttribute(\"parameters\");\n }",
"public void init( ServletConfig cfg ) throws ServletException {\r\n\tm_config = cfg;\r\n\tm_ctx = cfg.getServletContext();\r\n\tconfigure();\r\n }",
"public void init(FilterConfig fConfig) throws ServletException {\n\t\tservletCtxt = fConfig.getServletContext();\r\n\t}",
"public final void init(ServletConfig cfg) throws ServletException\n {\n super.init(cfg);\n String fs = File.separator;\n\n /* retrieve init arguments */\n getInitParameters(cfg);\n\n Factory.setParameters(parameters_);\n\n processInit(cfg);\n }",
"@Override\r\npublic void init(ServletConfig config) throws ServletException {\r\n super.init(config);\r\n}",
"@Override\r\n public void init(ServletConfig conf) throws ServletException {\r\n super.init(conf);\r\n }",
"public void init(ServletConfig config) throws ServletException {\n\t\tcontext = config.getServletContext();\n\t}",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tcontext = config.getServletContext();\r\n\t\tputDataSource(config.getServletContext(), \"jdbc/gdaDB\");\r\n//\t\tpublisher = new Publisher();\r\n\r\n\t}",
"public void init(FilterConfig config) throws ServletException {\n }",
"public void init() {\n\t\tServletContext context = getServletContext();\n\t\thost = context.getInitParameter(\"host\");\n\t\tport = context.getInitParameter(\"port\");\n\t\tuser = context.getInitParameter(\"user\");\n\t\tpass = context.getInitParameter(\"pass\");\n\t}",
"public void init() {\n\t\tServletContext context = getServletContext();\n\t\thost = context.getInitParameter(\"host\");\n\t\tport = context.getInitParameter(\"port\");\n\t\tuser = context.getInitParameter(\"user\");\n\t\tpass = context.getInitParameter(\"pass\");\n\t}",
"@Override\n\tpublic void init(FilterConfig config) throws ServletException {\n\t\tthis.filterConfig=config;\n\t}",
"@Override\n\tpublic void init(FilterConfig config) throws ServletException {\n\n\t}",
"@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tString realPath = config.getServletContext().getRealPath(\"/\");\r\n\t\tString path = realPath + \"WEB-INF\"+ System.getProperty(\"file.separator\") +\"logs\"+ System.getProperty(\"file.separator\")+\"payments\"+ System.getProperty(\"file.separator\");\r\n\r\n\t\tthis.filePath = path;// this.getInitParameter(\"TMP_PATH\");\r\n\t\tlog.debug(\"Initializing payment log file at loc: \"+ this.filePath);\r\n\t}",
"@Override\n public ServletConfig getServletConfig() {\n logger.log(Level.INFO, \"getServletConfig() Invoked\");\n return super.getServletConfig();\n }",
"public void init() throws ServletException {\n\t\t\r\n\t\tString file = this.getServletContext().getRealPath( this.getInitParameter( \"config1\" ) );\r\n\t\tSystem.out.println( \"actionServlet..file:\"+file );\r\n\t\r\n\t\tIParseXML parser = new ParseXML();\r\n\t\tIActionConfig config = parser.parser(file);\r\n\t\tSystem.out.println( \"config:\"+config );\r\n\t\t\r\n\t\t//获取tomcat中的数据源\r\n\t\ttry {\r\n\t\t\tClass.forName( \"com.commons.ConnTools\" );\r\n\t\t} catch (ClassNotFoundException 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\r\n\t\t//实例化业务派发控制器,\r\n\t\tprocessor = new RequestProcessor( config );\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t}",
"public void init(ServletConfig config) throws ServletException {\n\t\ttry {\n\t\t\tcon=JdbcUtility.getConnection();\n\t\t\tps=con.prepareStatement(QueryConstants.select_query);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"init Method\");\n\t}",
"public void init() throws ServletException {\n }",
"@Override\n\tpublic void init(FilterConfig fConfig) throws ServletException {\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\t// Put your code here\n\t}",
"public void init(FilterConfig filterConfig) throws ServletException {\n this.platform = filterConfig.getInitParameter(INIT_PARAM_PLATFORM);\n this.version = filterConfig.getInitParameter(INIT_PARAM_VERSION);\n String debug = filterConfig.getInitParameter(INIT_PARAM_DEBUG);\n\n if (debug != null) {\n this.bDebug = debug.equalsIgnoreCase(\"true\");\n } else {\n this.bDebug = false;\n }\n \n String language = filterConfig.getInitParameter(INIT_PARAM_LANGUAGE);\n String country = filterConfig.getInitParameter(INIT_PARAM_COUNTRY);\n String variant = filterConfig.getInitParameter(INIT_PARAM_VARIANT);\n initLocale(language, country, variant);\n\n\n // save a handle for later, standard practice\n this.filterConfig = filterConfig;\n }",
"@Override\n\tpublic void init() throws ServletException {\n\t\t\n\t}",
"public void init(ServletConfig config) throws ServletException {\r\n\t\tServletContext servletContext = config.getServletContext();\r\n\t\tthis.wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);\r\n\t\tthis.bdgInfoMgmFacade = (BdgInfoMgmFacade) this.wac.getBean(\"bdgInfoMgm\");\r\n\t\tthis.baseMgm = (BaseMgmFacade) Constant.wact.getBean(\"baseMgm\");\r\n\t\tthis.conclaMgm = (ConClaMgmFacade) Constant.wact.getBean(\"conclaMgm\");\r\n\t\tthis.conchaMgm=(ConChaMgmFacade)Constant.wact.getBean(\"conchaMgm\");\r\n\t\tthis.conbreMgm=(ConBreMgmFacade)Constant.wact.getBean(\"conbreMgm\");\r\n\t\tthis.conpayMgm=(ConPayMgmFacade)Constant.wact.getBean(\"conpayMgm\");\r\n\t\tthis.bdgProjectMgm=(BdgProjectMgmFacade)Constant.wact.getBean(\"bdgProjectMgm\");\r\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t}",
"@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\r\n\t}",
"public void init(FilterConfig arg0) throws ServletException {\n\r\n\t}",
"public void testMergingServletWithInitParamsThatIsAlreadyDefined() throws Exception\n {\n String srcXml = \"<web-app>\".trim()\n + \" <servlet>\".trim()\n + \" <servlet-name>s1</servlet-name>\".trim()\n + \" <servlet-class>sclass1</servlet-class>\".trim()\n + \" <load-on-startup>1</load-on-startup>\".trim()\n + \" </servlet>\".trim()\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\".trim()\n + \" <servlet-name>s1</servlet-name>\".trim()\n + \" <servlet-class>sclass1</servlet-class>\".trim()\n + \" <init-param>\".trim()\n + \" <param-name>s1param1</param-name>\".trim()\n + \" <param-value>s1param1value</param-value>\".trim()\n + \" </init-param>\".trim()\n + \" </servlet>\".trim()\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n Element servletElement = WebXmlUtils.getServlet(srcWebXml, \"s1\");\n assertEquals(\"load-on-startup\",\n ((Element) servletElement.getChildren().get(servletElement.getChildren().size() - 1))\n .getName());\n }",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}",
"public void init(FilterConfig fConfig) throws ServletException {\n\t}"
]
| [
"0.717315",
"0.7095312",
"0.6841315",
"0.67016584",
"0.6592007",
"0.6583916",
"0.65568984",
"0.65432346",
"0.65432227",
"0.65381163",
"0.6530753",
"0.6502694",
"0.64934725",
"0.6489981",
"0.64674956",
"0.6458875",
"0.64120024",
"0.6406974",
"0.6406974",
"0.6397701",
"0.6397701",
"0.6397701",
"0.63718593",
"0.6347631",
"0.6306492",
"0.6287202",
"0.627574",
"0.62729615",
"0.62685287",
"0.62626815",
"0.6258467",
"0.62433535",
"0.6239381",
"0.62382406",
"0.616722",
"0.61653036",
"0.61541396",
"0.60714585",
"0.60646635",
"0.6053715",
"0.6003818",
"0.59937066",
"0.59754163",
"0.59735894",
"0.5954646",
"0.59428185",
"0.59336746",
"0.5930225",
"0.587775",
"0.587775",
"0.58767426",
"0.58723617",
"0.58707446",
"0.58654875",
"0.5843194",
"0.5803271",
"0.5802546",
"0.5790499",
"0.576711",
"0.5743697",
"0.5741755",
"0.5732325",
"0.5700822",
"0.5697249",
"0.5683805",
"0.56831163",
"0.56822646",
"0.56782436",
"0.5661585",
"0.5661585",
"0.5661585",
"0.5656014",
"0.5630089",
"0.5614598",
"0.56110096",
"0.56039715",
"0.55961317",
"0.55819505",
"0.5571819",
"0.5571819",
"0.5571819",
"0.5571819",
"0.5571819",
"0.5561809",
"0.5561809",
"0.5561809",
"0.55517733",
"0.5551435",
"0.5551435",
"0.5543334",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491",
"0.5540491"
]
| 0.60772437 | 37 |
Returns an enumeration over the names of the init parameters. | public Enumeration getInitParameterNames() {
return _initParameters.keys();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.Enumeration getInitParameterNames()\n {\n \treturn config.getInitParameterNames();\n }",
"Enumeration getParameterNames();",
"@Override\n\t\tpublic Enumeration getParameterNames() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic Enumeration<String> getParameterNames() {\n\t\treturn null;\n\t}",
"@TestMethod(value=\"testGetParameterNames\")\n public String[] getParameterNames() {\n \tString[] params = new String[3];\n params[0] = \"maxIterations\";\n params[1] = \"lpeChecker\";\n params[2] = \"maxResonStruc\";\n return params;\n }",
"@TestMethod(value=\"testGetParameterNames\")\n public String[] getParameterNames() {\n String[] params = new String[1];\n params[0] = \"maxIterations\";\n return params;\n }",
"public String[] getParameterNames() {\r\n return parameterNames;\r\n }",
"public final Iterator<String> parameterNames() {\n return m_parameters.keySet().iterator();\n }",
"public Collection<String> getParamNames();",
"public Enumeration<String> getParaNames() {\n\t\treturn request.getParameterNames();\n\t}",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"public Set<String> getParameterNames() {\n\t\treturn Collections.unmodifiableSet(parameters.keySet());\n\t}",
"public static Set<String> getRegisteredParameterNames() {\n\n return REGISTERED_PARAMETER_NAMES;\n }",
"public static Set<String> getRegisteredParameterNames() {\n\n\t\treturn REGISTERED_PARAMETER_NAMES;\n\t}",
"public String[] getParamTypeNames()\n/* */ {\n/* 353 */ return this.parameterTypeNames;\n/* */ }",
"public String[] getInitiators() { return this.initiators; }",
"@Deprecated\n @SuppressWarnings(\"unchecked\")\n protected static Map<String, String> getInitParameterMap(Object context) {\n Map<String, String> initParameters = new HashMap<String, String>();\n Class<?> contextClass = context.getClass();\n Method method = ClassUtil.getForcedAccessibleMethod(contextClass,\n \"getInitParameterNames\");\n Enumeration<String> e = (Enumeration<String>) ClassUtil\n .invokeMethod(context, method);\n\n method = ClassUtil.getForcedAccessibleMethod(contextClass,\n \"getInitParameter\", String.class);\n while (e.hasMoreElements()) {\n String key = e.nextElement();\n initParameters.put(key, (String) ClassUtil.invokeMethod(\n context, method, key));\n }\n\n return initParameters;\n }",
"public String getInitParameter( String name ) {\n\t\treturn (String) _initParameters.get( name );\n\t}",
"java.util.Enumeration getPropertyNames();",
"public String getParamDefs() {\n return super.getParamDefs() + \", \" + PlainValueFunction.paramNameTypes;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.LoadParameter[] getParameterNameValuePairs();",
"@Override\n\t@SystemSetupParameterMethod\n\tpublic List<SystemSetupParameter> getInitializationOptions()\n\t{\n\t\tfinal List<SystemSetupParameter> params = new ArrayList<SystemSetupParameter>();\n\t\tparams.add(createBooleanSystemSetupParameter(IMPORT_SBD_SAMPLE_PRODUCT_DATA, \"Import SBD Sample Product Data\", true));\n\t\tparams.add(createBooleanSystemSetupParameter(IMPORT_PROJECT_DATA, \"Import Project Data\", true));\n\t\tparams.add(createBooleanSystemSetupParameter(CoreSystemSetup.ACTIVATE_SOLR_CRON_JOBS, \"Activate Solr Cron Jobs\", true));\n\t\t\n\t\t// Add more Parameters here as your require\n\n\t\treturn params;\n\t}",
"public Enumeration<String> getParameterNames() {\n if ( isMultipart() ) {\n return this.multipart.getParameterNames();\n }\n else {\n return super.getParameterNames();\n }\n }",
"String [] getParameters();",
"public ParameterClassList(){\n if(!initialized){\n paramList=new Hashtable(35,.6f);\n String jarName=jarName();\n if(jarName!=null && jarName.length()>0)\n processJar(jarName);\n else\n processDir();\n }\n\n initialized = true;\n\n if(DEBUG) System.out.println(\"Found \"+paramList.size()+\" parameters\");\n }",
"char[][] getTypeParameterNames();",
"@Parameters\n public static Collection<Object[]> testParameters() {\n Collection<Object[]> params = new ArrayList<Object[]>();\n\n for (OPT opt: OPT.values()) {\n Object[] par = new Object[2];\n par[0] = opt;\n par[1] = opt.name();\n\n params.add( par );\n }\n\n return params;\n }",
"private static final List<ParameterImpl> createParameters() {\n\t\tParameterImpl initialize = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Initialize\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"INITIALIZE\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl run = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Run\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RUN\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl duration = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Duration (minutes)\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"DURATION\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"number\")\n\t\t\t\t.setDefaultValue(\"0\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl retrieveData = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Retrieve Data\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RETRIEVE_DATA\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cleanup = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cleanup\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CLEANUP\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cancel = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cancel\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CANCEL\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"false\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\treturn Arrays.asList(initialize, run, duration, retrieveData, cleanup, cancel);\n\t}",
"public List<String> getParametersLabel() {\n\t\treturn PARAMETERS;\n\t}",
"public Enumeration getPropertyNames()\n {\n Hashtable props = getProperties();\n return (props != null) ? props.keys() : new Vector().elements();\n }",
"protected Set<String> getEnablementParameterNames() {\n return _enablementParameters.keySet();\n }",
"public String getInitParameter(java.lang.String name)\n {\n \treturn config.getInitParameter(name);\n }",
"public Collection<String> getParameterIds();",
"public java.lang.Object[] getNamedParams() {\n return namedParams;\n }",
"public String[] getParameters() {\r\n return parameters;\r\n }",
"public Set<String> getTemporaryParameterNames() {\n\t\treturn Collections.unmodifiableSet(temporaryParameters.keySet());\n\t}",
"private void listParameters(JavaSamplerContext context)\n {\n if (getLogger().isDebugEnabled())\n {\n Iterator argsIt = context.getParameterNamesIterator();\n while (argsIt.hasNext())\n {\n String name = (String) argsIt.next();\n getLogger().debug(name + \"=\" + context.getParameter(name));\n }\n }\n }",
"ParameterList getParameters();",
"public abstract List<String> getPreFacesRequestAttrNames();",
"public Map getParameters();",
"public String[] getParameters() {\n return parameters;\n }",
"public Set<String> getTemporaryParameterNames() {\r\n\t\treturn getNames(temporaryParameters);\r\n\t}",
"List<List<Class<?>>> getConstructorParametersTypes();",
"private void initParameters() {\n Annotation[][] paramsAnnotations = method.getParameterAnnotations();\n for (int i = 0; i < paramsAnnotations.length; i++) {\n if (paramsAnnotations[i].length == 0) {\n contentBuilder.addUnnamedParam(i);\n } else {\n for (Annotation annotation : paramsAnnotations[i]) {\n Class<?> annotationType = annotation.annotationType();\n if (annotationType.equals(PathParam.class)\n && pathBuilder != null) {\n PathParam param = (PathParam) annotation;\n pathBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(QueryParam.class)) {\n QueryParam param = (QueryParam) annotation;\n queryBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(HeaderParam.class)) {\n HeaderParam param = (HeaderParam) annotation;\n headerBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(NamedParam.class)) {\n NamedParam param = (NamedParam) annotation;\n contentBuilder.addNamedParam(param.value(), i);\n } else {\n contentBuilder.addUnnamedParam(i);\n }\n }\n }\n }\n }",
"public List initializers() {\n return initializers; }",
"public List<IGeneratorParameter> getParameters() {\n return null;\n }",
"public Set<String> getPersistentParameterNames() {\r\n\t\treturn getNames(persistentParameters);\r\n\t}",
"public String[] getParameters() {\n\t\treturn parameters;\n\t}",
"public Set<String> getPersistentParameterNames() {\n\t\treturn Collections.unmodifiableSet(persistentParameters.keySet());\n\t}",
"@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[3];\n params[0] = maxIterations;\n params[1] = lpeChecker;\n params[2] = maxResonStruc;\n return params;\n }",
"IParameterCollection getParameters();",
"public interface InitConstant {\n /**\n * 配置参数的key\n */\n String INITIALIZER_MODULE_NAME = \"INITIALIZER_MODULE_NAME\";\n /**\n * 支持注解的全类名\n */\n String SUPPORT_ANNOTATION_QUALIFIED_NAME = \"rocketzly.componentinitializer.annotation.Init\";\n /**\n * 生成类名前缀\n */\n String GENERATE_CLASS_NAME_PREFIX = \"InitializerContainer_\";\n /**\n * 生成类的包名\n */\n String GENERATE_PACKAGE_NAME = \"rocketzly.componentinitializer.generate\";\n /**\n * 生成同步list名\n */\n String GENERATE_FIELD_SYNC_LIST = \"syncList\";\n /**\n * 生成异步list名\n */\n String GENERATE_FIELD_ASYNC_LIST = \"asyncList\";\n /**\n * 获取同步初始化方法的方法名\n */\n String GENERATE_METHOD_GET_SYNC_NAME = \"getSyncInitMethodList\";\n /**\n * 获取异步初始化方法的方法名\n */\n String GENERATE_METHOD_GET_ASYNC_NAME = \"getAsyncInitMethodList\";\n /**\n * log\n */\n String NO_MODULE_NAME_TIPS = \"These no module name, at 'build.gradle', like :\\n\" +\n \"android {\\n\" +\n \" defaultConfig {\\n\" +\n \" ...\\n\" +\n \" javaCompileOptions {\\n\" +\n \" annotationProcessorOptions {\\n\" +\n \" arguments = [INITIALIZER_MODULE_NAME: project.name]\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\\n\";\n\n}",
"public static Class<?>[] getConstructorParamTypes() {\n\t\tfinal Class<?>[] out = { RabbitMQService.class, String.class, RentMovementDAO.class, RPCClient.class, RPCClient.class, IRentConfiguration.class };\n\t\treturn out;\n\t}",
"public Enumeration<String> getFileParameterNames() {\n return this.multipart.getFileNames();\n }",
"@LabeledParameterized.Parameters\n public static List<Object[]> parameters() {\n List<Object[]> modes = Lists.newArrayList();\n for (TypeOfEventStore typeOfEventStore : TypeOfEventStore.values()) {\n modes.add(Objects.o(typeOfEventStore));\n }\n return modes;\n }",
"@Override\n public Serializable[] getParameterArray() {\n return new Serializable[]{ name, ownerName, defaultNamespaceName };\n }",
"public static Iterator paramKeyIterator() {\n return getCurrentConfig().keyIterator();\n }",
"int getParametersCount();",
"int getParametersCount();",
"Map<String, String> getParameters();",
"public String[] getPropertyNames();",
"public interface Params\n{\n\tpublic static final String DEFAULT_PATH=\"default_path\";\n\tpublic static final String DEFAULT_NAME=\"default_name\";\n\tpublic static final String MODE=\"mode\";\n\tpublic static final String FILE_TYPE=\"file_type\";\n}",
"public ArrayList<String> getParameterValues() { return this.params; }",
"public ArrayList<String> getAllVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values()){\n\t\t\tString root = n.name();\n\t\t\tfor (int i=0;i<=n.cpt;i++)\n\t\t\t\tnames.add(root+\"_\"+i);\n\t\t}\n\t\treturn names;\n\t}",
"public final String getKeys() {\n StringBuilder sb = new StringBuilder();\n boolean append = false;\n for (Key key : this.parameters.keySet()) {\n if (append)\n sb.append(\",\");\n sb.append(key);\n append = true;\n }\n return sb.toString();\n }",
"List<Type> getTypeParameters();",
"public Map<String, Object> getNamedParameterValues() {\r\n \treturn namedParameterValues;\r\n }",
"java.util.List<gen.grpc.hospital.examinations.Parameter> \n getParameterList();",
"public static OptionValues getInitialOptions() {\n return Graal.getRequiredCapability(OptionValues.class);\n }",
"public synchronized Enumeration<String> getPropertyNames() {\n return PropertyArray.enumerate(props);\n }",
"public Object[] getConstructorArgs ();",
"@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[1];\n params[0] = maxIterations;\n return params;\n }",
"public final Enumeration getKeys() {\n/* 130 */ return getBundle().getKeys();\n/* */ }",
"public Enumeration getPropertyNames() {\r\n return properties.keys();\r\n }",
"String[] getPropertyKeys();",
"String getInitCond();",
"public ITypeInfo[] getParameters();",
"@Override\n\tpublic Enumeration<String> getKeys() {\n\t\treturn _resourceBundle.getKeys();\n\t}",
"public int getNumberParameters() { return parameters.length; }",
"private LocalParameters() {\n\n\t}",
"java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();",
"private void listParameters(String methodName, JavaSamplerContext context) {\n\t\tIterator<String> iter = context.getParameterNamesIterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tString name = iter.next();\n\t\t\tlog.debug(\"inside {}, name {} = {}\",\n\t\t\t\t\tnew Object[] { methodName, name, context.getParameter(name) });\n\t\t}\n\t}",
"public List<Parameter> getParamters() {\r\n return this.lstParameters;\r\n }",
"public static Enumeration<String> getKeys() {\n\t\tif (rb == null) {\n\t\t\treinit();\n\t\t}\n\n\t\treturn rb.getKeys();\n\t}",
"int getParamsCount();",
"public SortedSet<String> getAvailableParameters() {\n if (allAvailableParameters == null) {\n allAvailableParameters = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n Set<String> parameters = DataDeliveryHandlers\n .getParameterHandler()\n .getNamesByDataTypes(dataTypeList);\n if (parameters != null) {\n allAvailableParameters.addAll(parameters);\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the parameter list.\", e);\n }\n }\n return allAvailableParameters;\n }",
"public String[] getParameters() {\r\n return scope != null? scope.getParameters() : null;\r\n }",
"public String[] missingParameterNames() {\n List<String> errorMessages = new ArrayList<>();\n if (referenceStations == null) {\n errorMessages.add(\"referencesStations\");\n }\n String[] nodeGeneratorMissingParams = nodeStationGenerator.missingParameterNames();\n if (nodeGeneratorMissingParams.length > 0) {\n errorMessages.addAll(Arrays.asList(nodeGeneratorMissingParams));\n }\n return errorMessages.toArray(new String[errorMessages.size()]);\n }",
"public Enumeration enumeratePropertyNames() {\n return this.attributes.keys();\n }",
"@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}",
"public String[] getValidatorNames();",
"public LinkedHashMap<String, FunctionParameter> inputParameters(){\n return new LinkedHashMap<String, FunctionParameter>();\n }",
"public String[] getStatusVariableNames();",
"public Iterable<String> getPropertyKeys();",
"List constructors();",
"int getParameterCount();",
"public static String[] getRuntimeParNames() {\r\n\t\tObject[] ks = runtimePars.keySet().toArray();\r\n\t\tString[] pn = new String[ks.length];\r\n\t\tfor (int i = 0; i < ks.length; i++)\r\n\t\t\tpn[i] = (String) ks[i];\r\n\t\treturn StringExt.sort(pn);\r\n\t}",
"int getNumParameters();",
"Map<String, Object> getParameters();",
"Map<String, Object> getParameters();"
]
| [
"0.8615758",
"0.74331856",
"0.68604314",
"0.67537546",
"0.6706144",
"0.66356677",
"0.6599712",
"0.65611684",
"0.65444666",
"0.644455",
"0.6333226",
"0.63205063",
"0.6319621",
"0.6263749",
"0.6211141",
"0.61530715",
"0.6112205",
"0.6095843",
"0.609017",
"0.60428524",
"0.6016872",
"0.6016796",
"0.5987528",
"0.5982891",
"0.59652305",
"0.59596515",
"0.58932394",
"0.5769924",
"0.5757387",
"0.5750699",
"0.5701604",
"0.5650907",
"0.56178904",
"0.5598345",
"0.55557233",
"0.5548949",
"0.55476815",
"0.55352217",
"0.5488322",
"0.54821455",
"0.54775524",
"0.54681003",
"0.546726",
"0.545246",
"0.54418695",
"0.54386",
"0.5428447",
"0.5428409",
"0.5408019",
"0.5406849",
"0.54041964",
"0.53882325",
"0.53868824",
"0.5371186",
"0.53691906",
"0.5368635",
"0.5362661",
"0.53495604",
"0.53495604",
"0.53464246",
"0.5345176",
"0.5343199",
"0.53314364",
"0.5329206",
"0.53253514",
"0.53246444",
"0.5304184",
"0.5303851",
"0.5298315",
"0.5297846",
"0.5292796",
"0.52905697",
"0.5256404",
"0.52490413",
"0.52489674",
"0.5237005",
"0.52272856",
"0.5225845",
"0.52234775",
"0.520442",
"0.52026176",
"0.5195043",
"0.51872605",
"0.5183726",
"0.51803374",
"0.5180211",
"0.51751935",
"0.5168355",
"0.51635003",
"0.516037",
"0.51566017",
"0.51513606",
"0.5147937",
"0.51428276",
"0.5138162",
"0.5132464",
"0.51320904",
"0.51252455",
"0.5120316",
"0.5120316"
]
| 0.9072401 | 0 |
Returns the current servlet context. | public ServletContext getServletContext() {
return _context;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServletContext getApplication() {\n return servletRequest.getServletContext();\n }",
"public ServletContext getContext() {\r\n\t\treturn new ContextWrapper(getEvent().getServletContext());\r\n\t}",
"public ServletContext getServletContext() {\n return this.context;\n }",
"public static ServletContext getServletContext() {\n assert context != null;\n if (context == null)\n throw new IllegalStateException();\n \n return context;\n }",
"protected ServletContext getServletContext(String context) {\n\t\treturn ((ApplicationInfo)Server.getInstance().getApplication(context).getApplicationInfo()).getServletContext();\n\t}",
"public ServletContext getServletContext() {\n/* 92 */ return (ServletContext)getSource();\n/* */ }",
"public ContextRequest getContext() {\n\t\treturn context;\n\t}",
"public static String getContext(HttpServletRequest request) {\n\t\tString context = request.getParameter(CONTEXT_KEY);\n\t\tif (context == null && Server.getInstance().getAllKnownInternalContexts().size() == 1) {\n\t\t\tcontext = (String) Server.getInstance().getAllKnownInternalContexts().toArray()[0];//req.getContextPath();\n\t\t}\n\t\t// If no or invalid context, display a list of available WebApps\n\t\tif (context == null || Server.getInstance().getApplication(context) == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn context;\n\t\t}\n\t}",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"final protected ServletBeanContext getServletBeanContext()\n {\n if (_beanContext == null)\n {\n ControlContainerContext ccc = ControlThreadContext.getContext();\n if (! (ccc instanceof ServletBeanContext))\n throw new IllegalStateException(\"No ServletBeanContext available\");\n\n _beanContext = (ServletBeanContext)ccc;\n }\n return _beanContext;\n }",
"public Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext(){\n return appContext;\n }",
"public @NotNull ExtServletContext getServletContext(HttpContext context)\n {\n if (context == null)\n {\n context = createDefaultHttpContext();\n }\n\n return this.contextManager.getServletContext(context);\n }",
"public Context getContext() {\r\n\t\treturn context;\r\n\t}",
"public static Context getContext() {\n if (sContext == null) {\n throw new RuntimeException(APPLICATION_CONTEXT_IS_NULL);\n }\n return sContext;\n }",
"public Context getContext() {\n\t\treturn ctx;\n\t}",
"public ServletContext getServletContext() {\n if (parent!=this)\n return parent.getServletContext();\n else\n return super.getServletContext();\n }",
"public Context getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public URI getCurrentContext();",
"public String getContext() {\n\t\treturn context;\n\t}",
"public Context getContext() {\n if (context == null) {\n context = Model.getSingleton().getSession().getContext(this.contextId);\n }\n return context;\n }",
"public String getContext() {\r\n\t\treturn context;\r\n\t}",
"Context getContext();",
"Context getContext() {\n Context context = mContextRef.get();\n return context != null ? context : AppUtil.getAppContext();\n }",
"public static HttpServletRequest getHttpServletRequest() {\n try {\n HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();\n return request;\n } catch (Exception e) {\n // ignore if servlet request is not available, e.g. when triggered from a deadline\n return null;\n }\n }",
"public Context getContext() {\n return contextMain;\n }",
"HttpServletRequest getCurrentRequest();",
"@Override\n\tpublic ServletContext getServletContext() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ServletContext getServletContext() {\n\t\treturn null;\n\t}",
"public String getContext() { return context; }",
"public Context getContext() {\n\t\treturn null;\n\t}",
"public ExecutionContext getContext();",
"public Context getContext() {\n\t\treturn mContext;\n\t}",
"public static Context getContext() {\n\t\treturn instance;\n\t}",
"public Context getContext() {\n return this.mService.mContext;\n }",
"public Context getContext() {\n if (context == null) {\n try {\n context = new InitialContext();\n } catch (NamingException exception) {\n }\n }\n return context;\n }",
"public static Context getContext() {\r\n\t\tif (mContext == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn mContext;\r\n\r\n\t}",
"public static RhinoServlet getServlet(Context cx) {\r\n Object o = cx.getThreadLocal(\"rhinoServer\");\r\n if (o==null || !(o instanceof RhinoServlet)) return null;\r\n return (RhinoServlet)o;\r\n }",
"ApplicationContext getAppCtx();",
"public ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"public ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}",
"public static ApplicationContext getApplicationContext() {\r\n\t\treturn applicationContext;\r\n\t}",
"long getCurrentContext();",
"public static ApplicationContext getContext() {\n if (context == null) {\n CompilerExtensionRegistry.setActiveExtension( OTA2CompilerExtensionProvider.OTA2_COMPILER_EXTENSION_ID );\n }\n return context;\n }",
"public static WebContext getInstance() {\n return webContext;\n }",
"public static FHIRRequestContext get() {\n FHIRRequestContext result = contexts.get();\n if (log.isLoggable(Level.FINEST)) {\n log.finest(\"FHIRRequestContext.get: \" + result.toString());\n }\n return result;\n }",
"static synchronized Context getContext() {\n checkState();\n return sInstance.mContext;\n }",
"public Context getApplicationContext();",
"protected RestContext getContext() {\n\t\tif (context.get() == null)\n\t\t\tthrow new InternalServerError(\"RestContext object not set on resource.\");\n\t\treturn context.get();\n\t}",
"public String getServletURL ()\n\t{\n\t\treturn servletURL;\n\t}",
"public String getServletPath() {\n return servletPath;\n }",
"public static Context getAppContext() {\n return _BaseApplication.context;\n }",
"public static Context getResourceContext() {\n return context;\n }",
"public Context getContext() {\n return (Context)this;\n }",
"public Context getContext() {\n return this.mContext;\n }",
"public Context getContext() {\n return this.mContext;\n }",
"public String getServletPath() {\n return servletPath;\n }",
"@Override\n\tfinal public ServletConfig getServletConfig() {\n\n\t\treturn config;\n\n\t}",
"public HttpServletRequest getHttpServletRequest()\n {\n return request;\n }",
"public static ApplicationContext getApplicationContext() {\n return appContext;\n }",
"static Application getContext() {\n if (ctx == null)\n // TODO: 2019/6/18\n// throw new RuntimeException(\"please init LogXixi\");\n return null;\n else\n return ctx;\n }",
"public Object getContextObject() {\n return context;\n }",
"@Nullable\n default String getContext() {\n String contextName =\n String.valueOf(execute(DriverCommand.GET_CURRENT_CONTEXT_HANDLE).getValue());\n return \"null\".equalsIgnoreCase(contextName) ? null : contextName;\n }",
"public static String getFrameworkContext() {\r\n if (frameworkContext == null) {\r\n frameworkContext = PropertiesProvider.getInstance().getProperty(\"server.context\", \"/escidoc\");\r\n if (!frameworkContext.startsWith(\"/\")) {\r\n frameworkContext = \"/\" + frameworkContext;\r\n }\r\n }\r\n return frameworkContext;\r\n }",
"public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }",
"public String getSessionContext() {\n return this.SessionContext;\n }",
"public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }",
"public Context getContext() {\n return this;\n }",
"public IRuntimeContext getContext() {\n return fContext;\n }",
"public static HttpServletRequest getRequest() {\r\n\t\treturn (HttpServletRequest) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getRequest();\r\n\t}",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public Context getContext() {\n return mContext;\n }",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public cl_context getContext() {\r\n return context;\r\n }",
"public final Context getContext() {\n return mContext;\n }",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"public PortletContext getPortletContext ()\n {\n \treturn config.getPortletContext();\n }",
"String getServletInfo();",
"Map<String, Object> getContext();",
"public ComponentContext getContext()\n\t{\n\t\treturn context;\n\t}",
"public ModuleContext getContext() {\r\n return context;\r\n }",
"static public RenderingContext getCurrentInstance()\r\n {\r\n return _CURRENT_CONTEXT.get();\r\n }",
"public StaticContext getUnderlyingStaticContext() {\n return env;\n }",
"@Override\n\tpublic ServletConfig getServletConfig() {\n\t\treturn config;\n\t}",
"CTX_Context getContext();",
"public RuntimeContext getRuntimeContext() {\n return runtimeContext;\n }",
"public String getServletInfo() {\n\t\treturn null; \n\t}",
"public ApplicationContext getApplicationContext()\n {\n return this.applicationContext;\n }",
"RenderingContext getContext();",
"public ApplicationContext getApplicationContext() {\n return applicationContext;\n }",
"public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\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 context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static HttpServletResponse getHttpServletResponse() {\n try {\n HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getResponse();\n return response;\n } catch (NoClassDefFoundError e) {\n // ignore if servlet request class is not available\n return null;\n } catch (IllegalStateException e) {\n // ignore if servlet request is not available, e.g. when triggered from a deadline\n return null;\n }\n }",
"public ServletContextEvent getEvent() {\r\n\t\treturn (ServletContextEvent) eventHolder.get();\r\n\t}",
"public ActionBeanContext getContext() {\r\n return context;\r\n }",
"public String getServletInfo() {\n\t\treturn null;\r\n\t}",
"public ContextInstance getContextInstance() {\n\t\treturn token.getProcessInstance().getContextInstance();\r\n\t}"
]
| [
"0.81022716",
"0.80518115",
"0.8050978",
"0.7329037",
"0.72533053",
"0.71820766",
"0.7151938",
"0.7151933",
"0.71325165",
"0.71325165",
"0.70115894",
"0.6981985",
"0.6959954",
"0.69435257",
"0.69372654",
"0.6931081",
"0.6904253",
"0.6901998",
"0.6856392",
"0.67838764",
"0.67838764",
"0.67838764",
"0.67574805",
"0.67549276",
"0.67432743",
"0.67061585",
"0.6675995",
"0.66518086",
"0.66424674",
"0.6632151",
"0.6592081",
"0.6569941",
"0.6569941",
"0.6550383",
"0.6537533",
"0.64782333",
"0.64743567",
"0.64457417",
"0.64339316",
"0.6432624",
"0.6406571",
"0.6392911",
"0.6376763",
"0.6371007",
"0.6354321",
"0.6351226",
"0.6344238",
"0.6342437",
"0.63355947",
"0.63345736",
"0.6332835",
"0.6330807",
"0.6315508",
"0.63088757",
"0.6308626",
"0.6302869",
"0.6297745",
"0.6291772",
"0.6290912",
"0.6290912",
"0.6275087",
"0.6266011",
"0.625801",
"0.62562126",
"0.6244305",
"0.6241349",
"0.6238691",
"0.62329334",
"0.6229787",
"0.6227657",
"0.62147695",
"0.62030613",
"0.620293",
"0.61793447",
"0.6158438",
"0.6154875",
"0.61362004",
"0.612329",
"0.61096",
"0.60850513",
"0.60737085",
"0.6072744",
"0.6054128",
"0.6050929",
"0.60429823",
"0.60416186",
"0.60184807",
"0.6017672",
"0.6008186",
"0.59934187",
"0.59853685",
"0.59773016",
"0.5968991",
"0.59686744",
"0.5963406",
"0.59583104",
"0.59551895",
"0.5940708",
"0.5939703",
"0.5938637"
]
| 0.81531227 | 0 |
Returns the registered name of the servlet, or its class name if it is not registered. | public java.lang.String getServletName() {
return _name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getServletInfo();",
"@Override\n public String getServletInfo() {\n return PAGE_NAME;\n }",
"private String getBaseName(final String servletPath) {\n\t\treturn FilenameUtils.removeExtension(servletPath);\n\t}",
"public String getServletInfo() {\n\t\treturn null; \n\t}",
"public String getServletInfo() {\n\t\treturn null;\r\n\t}",
"@Override\n public ServletRegistration getServletRegistration(String servletName) {\n return null;\n }",
"public String getServletInfo() { return \"ServletExercice20\";}",
"public static String getDefaultServletName() {\n return RefDataServlet.DEFAULT_REFERENCE_DATA_SERVLET_NAME;\n }",
"@Override\n public String getServletInfo() {\n return \"Register\";\n }",
"@Override\n public Dynamic addServlet(String servletName, String className) {\n return null;\n }",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"@Override\n public Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {\n return null;\n }",
"@Override\n public String getServletInfo()\n {\n return \"The servlet responsible for handling requests to the PALS system.\";\n }",
"@Override\r\n\tpublic String getServletInfo() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn null;\n\t}",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"@Override\n\tpublic final String getName() {\n\t\treturn getClass().getSimpleName().replaceAll(\"Application$\", \"\").toLowerCase();\n\t}",
"public String getServletInfo()\r\n\t{\r\n\t\treturn \"Adempiere Web Invoice Servlet\";\r\n\t}",
"java.lang.String getClassName();",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn super.getServletInfo();\n\t}",
"public String getServletURL ()\n\t{\n\t\treturn servletURL;\n\t}",
"public static RhinoServlet getServlet(Context cx) {\r\n Object o = cx.getThreadLocal(\"rhinoServer\");\r\n if (o==null || !(o instanceof RhinoServlet)) return null;\r\n return (RhinoServlet)o;\r\n }",
"private String getBaseName(final ServletRequest request) {\n\t\tfinal var servletPath = ((HttpServletRequest) request).getServletPath();\n\t\tfinal var base = StringUtils.removeStart(servletPath, \"/\");\n\t\treturn getBaseName(base.isEmpty() ? \"index.html\" : base);\n\t}",
"@Override\n public Dynamic addServlet(String servletName, Servlet servlet) {\n return null;\n }",
"public static String getNetServerHandlerName() {\n \t\treturn getNetServerHandlerClass().getSimpleName();\n \t}",
"@Override\r\n public String getServletInfo() {\n return null;\r\n }",
"@Override\n public String getServletInfo() {\n return null;\n }",
"public static String getWebServicename(Class c) {\n\t\tAnnotation[] annotations = c.getAnnotations();\n\t\tif (annotations.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tfor (Annotation a : annotations) {\n\t\t\tif (a instanceof WebService) {\n\t\t\t\treturn ((WebService) a).serviceName();\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\n public String getServletInfo() {\n return super.getServletInfo();\n }",
"@Override\n\tpublic String getName() {\n\t\treturn MySimpleFirewall.class.getSimpleName();\n\t}",
"String getSingletonName();",
"@Override\n public String getServletInfo() {\n return \"Hello World Servlet\";\n }",
"@Override\r\n\tpublic Class getServletClass() {\n\t\treturn ShowSelectServlet.class;\r\n\t}",
"public String getServletInfo() {\n return \"Servlet CreateCashFlowStatement\";\n }",
"private boolean isServletType (Class c)\n { \n boolean isServlet = false;\n if (javax.servlet.Servlet.class.isAssignableFrom(c) ||\n javax.servlet.Filter.class.isAssignableFrom(c) || \n javax.servlet.ServletContextListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletContextAttributeListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletRequestListener.class.isAssignableFrom(c) ||\n javax.servlet.ServletRequestAttributeListener.class.isAssignableFrom(c) ||\n javax.servlet.http.HttpSessionListener.class.isAssignableFrom(c) ||\n javax.servlet.http.HttpSessionAttributeListener.class.isAssignableFrom(c) || \n (_pojoInstances.get(c) != null))\n \n isServlet=true;\n \n return isServlet; \n }",
"public String getName ()\n {\n if (__name == null)\n {\n __name = getName (getClass ());\n }\n return __name;\n }",
"java.lang.String getInstanceName();",
"public static String getServletMapping(FileObject servletFO, Document deploymentDescriptorDocument) {\n JavaProfilerSource src = JavaProfilerSource.createFrom(servletFO);\n if (src == null) {\n return null;\n }\n String servletClassName = src.getTopLevelClass().getVMName();\n\n if ((servletClassName == null) || (deploymentDescriptorDocument == null)) {\n return null;\n }\n\n NodeList servletsList = getServlets(deploymentDescriptorDocument);\n\n for (int i = 0; i < servletsList.getLength(); i++) {\n String servletName = getElementContent((Element) servletsList.item(i), \"servlet-name\"); // NOI18N\n String className = getElementContent((Element) servletsList.item(i), \"servlet-class\"); // NOI18N\n\n if ((servletName != null) && (className != null) && servletClassName.equals(className)) {\n NodeList servletMappingsList = getServletMappings(deploymentDescriptorDocument);\n\n for (int j = 0; j < servletMappingsList.getLength(); j++) {\n if (servletName.equals(getElementContent((Element) servletMappingsList.item(j), \"servlet-name\"))) {\n // NOI18N\n return getElementContent((Element) servletMappingsList.item(j), \"url-pattern\"); // NOI18N\n }\n }\n\n return null;\n }\n }\n\n return null;\n }",
"public String getTypeName() {\n Class type = getType();\n if (type == null)\n return null;\n return type.getName();\n }",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"public static String getAppJarName() {\n try {\n String r = (String)Class.forName(\"hr.restart.util.IntParam\")\n .getMethod(\"getTag\", new Class[] {String.class})\n .invoke(null, new Object[] {\"appjarname\"});\n System.out.println(\"appjarname = \"+r);\n return r.equals(\"\")?\"ra-spa.jar\":r;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"ra-spa.jar\";\n }",
"protected synchronized ServletHolder getServlet(String servletPath) {\n ServletHolder jerseyServlet =\n super.getServlet(org.glassfish.jersey.servlet.ServletContainer.class, servletPath);\n jerseyServlet.setInitOrder(0);\n return jerseyServlet;\n }",
"protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}",
"public String getName_Class() {\n\t\treturn name;\n\t}",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"public String getJarName() {\r\n\t\tURL clsUrl = getClass().getResource(getClass().getSimpleName() + \".class\");\r\n\t\tif (clsUrl != null) {\r\n\t\t\ttry {\r\n\t\t\t\tjava.net.URLConnection conn = clsUrl.openConnection();\r\n\t\t\t\tif (conn instanceof java.net.JarURLConnection) {\r\n\t\t\t\t\tjava.net.JarURLConnection connection = (java.net.JarURLConnection) conn;\r\n\t\t\t\t\tString path = connection.getJarFileURL().getPath();\r\n\t\t\t\t\t// System.out.println (\"Path = \"+path);\r\n\t\t\t\t\tint index = path.lastIndexOf('/');\r\n\t\t\t\t\tif (index >= 0)\r\n\t\t\t\t\t\tpath = path.substring(index + 1);\r\n\t\t\t\t\treturn path;\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static String getNetLoginHandlerName() {\n \t\treturn getNetLoginHandlerClass().getSimpleName();\n \t}",
"public String getName() {\r\n \treturn this.getClass().getName();\r\n }",
"protected String getRequestedResourceName(HttpServletRequest req) throws ServletException {\n\t\tString name = req.getPathInfo();\n\n\t\tif (StringUtils.isEmpty(name))\n\t\t\tthrow new ServletException(\"No filename specified.\");\n\n\t\twhile (name.startsWith(\"/\"))\n\t\t\tname = name.substring(1);\n\n\t\tif (name!=null && name.startsWith(\"../\"))\n\t\t\tthrow new ServletException(\"Not allowed!\");\n\n\t\treturn name;\n\t}",
"@Override\n public String getServletInfo() {\n return \"Louie Info Home\";\n }",
"public static String getClassName() {\n return CLASS_NAME;\n }",
"public String getName() {\n\t\treturn className;\n\t}",
"public String getClassname()\r\n {\r\n return m_classname;\r\n }",
"public String getServletUrl() throws UnsupportedOperationException;",
"@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}",
"private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}",
"@Override\n public Map<String, ? extends ServletRegistration> getServletRegistrations() {\n return null;\n }",
"public String getClassname() {\n return classname;\n }",
"public String getCurrentClassName () {\n String currentClass = getCurrentElement(ElementKind.CLASS);\n if (currentClass == null) return \"\";\n else return currentClass;\n }",
"@Override\r\n public String getServletInfo() {\r\n return TITLE;\r\n }",
"private ClassName getClassName(String rClass, String resourceType) {\n ClassName className = rClassNameMap.get(rClass);\n\n if (className == null) {\n Element rClassElement = getElementByName(rClass, elementUtils, typeUtils);\n\n String rClassPackageName =\n elementUtils.getPackageOf(rClassElement).getQualifiedName().toString();\n className = ClassName.get(rClassPackageName, \"R\", resourceType);\n\n rClassNameMap.put(rClass, className);\n }\n\n return className;\n }",
"public String getName()\n {\n return underlyingClass.getName();\n }",
"public ServletConfig getServletConfig() {\n\t\treturn null;\n\t}",
"public ServletConfig getServletConfig() {\n\t\treturn null;\r\n\t}",
"@Override\n\t\tpublic String getServletPath() {\n\t\t\treturn null;\n\t\t}",
"public String getName() {\n return className;\n }",
"public HttpServlet createServlet(String servletname, Context con){\n\t\t\n\t\tHttpServlet servlet = null;\n\t\tConfig config = new Config(servletname,con);\n\t\tHashMap<String,String> servletClassMap = handler.getServletClass();\n\t\t\n\t//get servlet class name through servletClass map\n\t\t\n\t\tString classname = servletClassMap.get(servletname);\n\t\t\n\t//get the exact servlet when we know servlet name\n\t\tClass servletEmptyClass = null;\n\t\ttry{\n\t\t\tlog.info(\"ServletContainer: classname is \"+classname);\n\t\t\t\n\t\t\tservletEmptyClass = Class.forName(\"edu.upenn.cis.cis455.webserver.\"+classname); // must contain the path in class\n\t\t\t\n\t\t\tservlet = (HttpServlet) servletEmptyClass.newInstance();\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tlog.info(\"ServletContainer: cannot create a servlet\");\n\t\t}\n\t\n\t//set init data in config\n\t\tHashMap<String, String> initParamsConfigMap = handler.getInitParams();\n\t\tSet<String> set = initParamsConfigMap.keySet();\n\t\tfor(String key : set){\n\t\t\tString value = initParamsConfigMap.get(key);\n\t\t\tconfig.setInitParameter(key, value);\t\t\t\n\t\t}\n\t\t\n\t// init servlet\t\n\t\ttry{\n\t\t\tservlet.init(config);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tlog.info(\"ServletContainer: cannot init servlet\");\n\t\t}\n\t\t\n\t\treturn servlet;\n\t\t\t\n\t}",
"public static String getServletPath(HttpServletRequest request) {\n String servletPath = request.getServletPath();\n String requestUri = request.getRequestURI();\n\n // Detecting other characters that the servlet container cut off (like anything after ';')\n if (requestUri != null && servletPath != null && !requestUri.endsWith(servletPath)) {\n int pos = requestUri.indexOf(servletPath);\n if (pos > -1) {\n servletPath = requestUri.substring(requestUri.indexOf(servletPath));\n }\n }\n\n if (null != servletPath && !\"\".equals(servletPath)) {\n return servletPath;\n }\n\n int startIndex = \"\".equals(request.getContextPath()) ? 0 : request.getContextPath().length();\n int endIndex = request.getPathInfo() == null ? requestUri.length() : requestUri.lastIndexOf(request.getPathInfo());\n\n if (startIndex > endIndex) { // this should not happen\n endIndex = startIndex;\n }\n\n return requestUri.substring(startIndex, endIndex);\n }",
"public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}",
"public String getClassname() {\n\t\treturn classname;\n\t}",
"public String getRuntimeClass();",
"public String getName(){\n\t\tif(name==null) return webserviceUrl;\n\t\treturn name;\n\t}",
"public String getClassName();",
"protected String getEntryName( HttpServletRequest request )\n {\n return (String) request.getParameter( ENTRY_NAME_HTTP_PARAM );\n }",
"String getServletUrlPattern();",
"@Override\n public <T extends Servlet> T createServlet(Class<T> clazz) throws ServletException {\n return null;\n }",
"public boolean isServletBased ()\n\t{\n\t\treturn servletBased;\n\t}",
"default String socket() {\n return WebServer.DEFAULT_SOCKET_NAME;\n }",
"@Override\n public String getServletInfo() {\n return \"Servlet is serving eBooksStoreAdminUsersPage.jsp\";\n }",
"public String getServletPath() {\n return servletPath;\n }",
"public String getServletPath() {\n return servletPath;\n }",
"@Override\n public String getServletInfo() {\n return \"Servlet for asking a question.\";\n }",
"public String getName()\n\t{\n\t\treturn getName( getSession().getSessionContext() );\n\t}",
"public static synchronized String getOrDefault(Class<?> key){\n\t\tif (ClassRegistry.primitives.containsKey(key))\n\t\t\treturn ClassRegistry.primitives.get(key).getXML();\n\t\telse if (ClassRegistry.dictionary.containsKey(key))\n\t\t\treturn ClassRegistry.dictionary.get(key);\n\t\telse\n\t\t\treturn key.getName();\n\t}",
"@Override\r\n public String getServletInfo() {\r\n return \"TC65 Localizer Server\";\r\n }",
"protected static String getSimpleName(Class<?> c) {\n String name = c.getName();\n return name.substring(name.lastIndexOf(\".\") + 1);\n }",
"public String getMainClassName() throws IOException {\n URL u = new URL(\"jar\", \"\", url + \"!/\");\n JarURLConnection uc = (JarURLConnection)u.openConnection();\n Attributes attr = uc.getMainAttributes();\n return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;\n }",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"@Override\n\tpublic String getServletPath() {\n\t\treturn null;\n\t}",
"public HashMap<String, HttpServlet> createServletMaps(){\n\t\tHashMap<String,String> servletClass = handler.getServletClass();\n\t\tSet<String> allServletName = servletClass.keySet();\n\t\tContext con = createContext();\n\t\t\n\t\tfor(String servletname: allServletName){\n\t\t\tlog.info(\"ServletContainer: servletname is \"+servletname);\n\t\t\tHttpServlet servlet = createServlet(servletname,con);\n\t\t\t\n\t\t\tservletsmap.put(servletname, servlet);\t\t\t\n\t\t}\n\t\t\n\t\treturn servletsmap;\t\t\n\t\t\n\t}",
"public String getServletString(String message) {\n \t\treturn getString(new StringBuffer(\"servlet.\").append(message).toString());\n \t}",
"java.lang.String getFormName();",
"protected String getKeymapName() {\n String nm = getClass().getName();\n int index = nm.lastIndexOf('.');\n if (index >= 0) {\n nm = nm.substring(index+1);\n }\n return nm;\n }",
"private static String resolveName(@Nonnull final Class<?> clazz) {\n\t\tfinal String n = clazz.getName();\n\t\tfinal int i = n.lastIndexOf('.');\n\t\treturn i > 0 ? n.substring(i + 1) : n;\n\t}"
]
| [
"0.6398335",
"0.63382304",
"0.6192833",
"0.6164911",
"0.6158877",
"0.6066675",
"0.60627913",
"0.60604876",
"0.60196227",
"0.59964347",
"0.59594834",
"0.59067184",
"0.5865777",
"0.58177507",
"0.58167964",
"0.58167964",
"0.58167964",
"0.58167964",
"0.5806205",
"0.58038056",
"0.57946575",
"0.57653284",
"0.57480186",
"0.5746562",
"0.57412094",
"0.5740619",
"0.5711629",
"0.5707283",
"0.5689815",
"0.5645213",
"0.5603234",
"0.5601006",
"0.556802",
"0.55307573",
"0.55230016",
"0.5511872",
"0.54765975",
"0.5476248",
"0.54670894",
"0.5450428",
"0.54429036",
"0.5401579",
"0.53987044",
"0.53936106",
"0.53748596",
"0.5366158",
"0.53387946",
"0.5331877",
"0.53145534",
"0.53145534",
"0.53145534",
"0.5299825",
"0.5298837",
"0.5291201",
"0.52845097",
"0.52575195",
"0.5256329",
"0.5240361",
"0.523574",
"0.52273804",
"0.52092934",
"0.5203059",
"0.5187682",
"0.5178527",
"0.5175737",
"0.51512706",
"0.5142507",
"0.51235735",
"0.5119011",
"0.51124936",
"0.511198",
"0.51098484",
"0.51093954",
"0.51072234",
"0.50993294",
"0.509833",
"0.5097768",
"0.5087401",
"0.5084955",
"0.50840384",
"0.50791675",
"0.50719315",
"0.5069568",
"0.50657165",
"0.50650126",
"0.5062848",
"0.5060252",
"0.5055683",
"0.5042449",
"0.5035745",
"0.5027685",
"0.5007912",
"0.5007432",
"0.50046784",
"0.49888423",
"0.4982212",
"0.49812177",
"0.49763536",
"0.49722165",
"0.4967936"
]
| 0.75133544 | 0 |
/ Encode the URI into canonicalized version. | private static String encodeURI(String url) {
StringBuffer uri = new StringBuffer(url.length());
int length = url.length();
for (int i = 0; i < length; i++) {
char c = url.charAt(i);
switch (c) {
case '!':
case '#':
case '$':
case '%':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case ',':
case '-':
case '.':
case '/':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case ':':
case ';':
case '=':
case '?':
case '@':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '[':
case ']':
case '_':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case '~':
uri.append(c);
break;
default:
StringBuffer result = new StringBuffer(3);
String s = String.valueOf(c);
try {
byte[] data = s.getBytes("UTF8");
for (int j = 0; j < data.length; j++) {
result.append('%');
String hex = Integer.toHexString(data[j]);
result.append(hex.substring(hex.length() - 2));
}
uri.append(result.toString());
} catch (UnsupportedEncodingException ex) {
// should never happen
}
}
}
return uri.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String encode(String uri) {\n return uri;\n }",
"private String encodeUri(String uri) {\n\t\t\tString newUri = \"\";\n\t\t\tStringTokenizer st = new StringTokenizer(uri, \"/ \", true);\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tok = st.nextToken();\n\t\t\t\tif (\"/\".equals(tok)) {\n\t\t\t\t\tnewUri += \"/\";\n\t\t\t\t} else if (\" \".equals(tok)) {\n\t\t\t\t\tnewUri += \"%20\";\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewUri += URLEncoder.encode(tok, \"UTF-8\");\n\t\t\t\t\t} catch (UnsupportedEncodingException ignored) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newUri;\n\t\t}",
"public static Object encodeURI(final Object self, final Object uri) {\n return URIUtils.encodeURI(self, JSType.toString(uri));\n }",
"public static String encodedURI(String uri, String decodedUri) {\r\n\t\tfinal String charToReplace = \":\";\r\n\t\tfinal String replacementChar = \"-\";\r\n\t\tif (decodedUri.startsWith(charToReplace)) {\r\n\t\t\tdecodedUri = decodedUri.substring(1); // remove leading char to replace, if any\r\n\t\t}\r\n\t\tString result = \"\";\r\n\t\tif (!uri.equals(decodedUri)) { // was the uri prefixable?\r\n\t\t\t// first, duplicate every pre-existing replacementChar to guarantee unity\r\n\t\t\tresult = decodedUri.replace(replacementChar, replacementChar + replacementChar);\r\n\t\t\t// replace the character to replace with a replacement character to make it a valid fragment\r\n\t\t\tresult = decodedUri.replace(charToReplace, replacementChar);\r\n\t\t} else {\r\n\t\t\tresult = IRILib.encodeUriComponent(decodedUri); // for non-prefixable uri's, just take the encoded form\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public abstract String encodeURL(CharSequence url);",
"public static String encode(String anyURI){\n int len = anyURI.length(), ch;\n StringBuffer buffer = new StringBuffer(len*3);\n \n // for each character in the anyURI\n int i = 0;\n for (; i < len; i++) {\n ch = anyURI.charAt(i);\n // if it's not an ASCII character, break here, and use UTF-8 encoding\n if (ch >= 128)\n break;\n if (gNeedEscaping[ch]) {\n buffer.append('%');\n buffer.append(gAfterEscaping1[ch]);\n buffer.append(gAfterEscaping2[ch]);\n }\n else {\n buffer.append((char)ch);\n }\n }\n \n // we saw some non-ascii character\n if (i < len) {\n // get UTF-8 bytes for the remaining sub-string\n byte[] bytes = null;\n byte b;\n try {\n bytes = anyURI.substring(i).getBytes(\"UTF-8\");\n } catch (java.io.UnsupportedEncodingException e) {\n // should never happen\n return anyURI;\n }\n len = bytes.length;\n \n // for each byte\n for (i = 0; i < len; i++) {\n b = bytes[i];\n // for non-ascii character: make it positive, then escape\n if (b < 0) {\n ch = b + 256;\n buffer.append('%');\n buffer.append(gHexChs[ch >> 4]);\n buffer.append(gHexChs[ch & 0xf]);\n }\n else if (gNeedEscaping[b]) {\n buffer.append('%');\n buffer.append(gAfterEscaping1[b]);\n buffer.append(gAfterEscaping2[b]);\n }\n else {\n buffer.append((char)b);\n }\n }\n }\n \n // If encoding happened, create a new string;\n // otherwise, return the orginal one.\n if (buffer.length() != len)\n return buffer.toString();\n else\n return anyURI;\n }",
"public static String encodeURI(String string) {\n\t\treturn Utils.encodeURI(string);\n\t}",
"public static Object encodeURIComponent(final Object self, final Object uri) {\n return URIUtils.encodeURIComponent(self, JSType.toString(uri));\n }",
"public static String encodeURL(String url) {\n\n\t\tint len = url.length();\n\n\t\t// add a little (6.25%) to leave room for some expansion during encoding\n\t\tlen += len >>> 4;\n\n\t\treturn appendURL(new StringBuffer(len), url).toString();\n\t}",
"public final String urlEncode() {\n\t\treturn urlEncode(UTF_8);\n\t}",
"private String encodeValue(final String dirtyValue) {\n String cleanValue = \"\";\n\n try {\n cleanValue = URLEncoder.encode(dirtyValue, StandardCharsets.UTF_8.name())\n .replace(\"+\", \"%20\");\n } catch (final UnsupportedEncodingException e) {\n }\n\n return cleanValue;\n }",
"public static String URIencoding(String word) {\n\t\tString result = word;\n\t\tword = word.replace(\" \", \"_\");\n\t\ttry {\n\t\t\tresult = URLEncoder.encode(word, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"public static String uriEncodeParts(final String value) {\n if (Strings.isNullOrEmpty(value)) {\n return value;\n }\n final int length = value.length();\n final StringBuilder builder = new StringBuilder(length << 1);\n for (int i = 0; i < length; i++) {\n final char c = value.charAt(i);\n if (CharMatcher.ASCII.matches(c)) {\n builder.append(String.valueOf(c));\n } else {\n builder.append(encodeCharacter(c));\n }\n }\n return builder.toString();\n }",
"public String encodeURL(String s) {\n\t\treturn null;\n\t}",
"private String encode(String value) {\n String encoded = \"\";\n try {\n encoded = URLEncoder.encode(value, \"UTF-8\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n String sb = \"\";\n char focus;\n for (int i = 0; i < encoded.length(); i++) {\n focus = encoded.charAt(i);\n if (focus == '*') {\n sb += \"%2A\";\n } else if (focus == '+') {\n sb += \"%20\";\n } else if (focus == '%' && i + 1 < encoded.length() && encoded.charAt(i + 1) == '7' && encoded.charAt(i + 2) == 'E') {\n sb += '~';\n i += 2;\n } else {\n sb += focus;\n }\n }\n return sb.toString();\n }",
"public String encodeURL(String input)\n\t{\n\t\tStringBuilder encodedString = new StringBuilder();\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\tchar c = input.charAt(i);\n\t\t\tboolean notEncoded = Character.isLetterOrDigit(c);\n\t\t\tif (notEncoded)\n\t\t\t\tencodedString.append(c);\n\t\t\telse\n\t\t\t{\n\t\t\t\tint value = (int) c;\n\t\t\t\tString hex = Integer.toHexString(value);\n\t\t\t\tencodedString.append(\"%\" + hex.toUpperCase());\n\t\t\t}\n\t\t}\n\t\treturn encodedString.toString();\n\t}",
"public String encodeURL(String url) {\n return manager.encodeUrl(this, url);\n }",
"protected String getEscapedUri(String uriToEscape) {\r\n\t\treturn UriComponent.encode(uriToEscape, UriComponent.Type.PATH_SEGMENT);\r\n\t}",
"@Override\n\tpublic String encodeURL(String url) {\n\t\treturn null;\n\t}",
"@Override\n public String encodeURL(String arg0) {\n return null;\n }",
"public static String encode(String s) {\n // return java.net.URLEncoder.encode(s);\n /*\n ** The only encoded chars are \"<>%=/\", chars < space and chars >= 127\n ** (including cr/lf, ...)\n ** A leading and/or trailing space is also encoded, all others are\n ** left alone\n **\n ** Encoding is %dd where dd are hex digits for the hex value encode\n **\n ** Check if needs encoding first, if not, simply return original string\n */\n char arr[] = s.toCharArray();\n int len = arr.length;\n for(int i=0; i < len; i++) {\n char ch = arr[i];\n if (ch < ' ' || ch > (char)127 || ch == '%' ||\n ch == '<' || ch == '>' || ch == '=' || \n ch == '/' || \n ((ch == ' ') && (i == 0 || i == len-1))) {\n \n StringBuffer sb = new StringBuffer();\n for(i=0; i < len; i++) {\n ch = arr[i];\n if (ch < ' ' || ch > (char)127 || ch == '%' ||\n ch == '<' || ch == '>' || ch == '=' || \n ch == '/' || \n ((ch == ' ') && (i == 0 || i == len-1))) {\n \n byte b = (byte)arr[i];\n sb.append('%');\n char c = Character.forDigit((b >> 4) & 0xf, 16);\n sb.append(c);\n c = Character.forDigit(b & 0xf, 16);\n sb.append(c);\n } else {\n sb.append(arr[i]);\n }\n }\n s = sb.toString();\n break;\n }\n }\n return s;\n }",
"@Override\n\tpublic CharSequence encodeURL(CharSequence url)\n\t{\n\t\tif (httpServletResponse != null && url != null)\n\t\t{\n\t\t\treturn httpServletResponse.encodeURL(url.toString());\n\t\t}\n\t\treturn url;\n\t}",
"@Override\n public String encodeURL(String url) {\n return this._getHttpServletResponse().encodeURL(url);\n }",
"public final String urlEncode(String encoding) {\n\n\t\tfinal StringBuilder out = new StringBuilder();\n\n\t\ttry {\n\t\t\turlEncode(out, encoding);\n\t\t} catch (IOException e) {\n\t\t\tnew IllegalStateException(e);// Should never happen.\n\t\t}\n\n\t\treturn out.toString();\n\t}",
"public String encodeUrl(String s) {\n\t\treturn null;\n\t}",
"public String encode(String longUrl) {\n if (longToShort.containsKey(longUrl)) {\n return longToShort.get(longUrl);\n }\n String encode = intToBase62(longUrl.hashCode());\n List<String> list;\n if (shortToLong.containsKey(encode)) {\n list = shortToLong.get(encode);\n } else {\n list = new ArrayList<>();\n shortToLong.put(encode, list);\n }\n encode += SEPERATE + list.size();\n list.add(longUrl);\n longToShort.put(longUrl, encode);\n return PREFIX + encode;\n }",
"public String encode(String longUrl) {\n\t int key = longUrl.hashCode();\n\t map.put(key, longUrl);\n\t return Integer.toString(key);\n\t }",
"@Override\n public String encodeUrl(String arg0) {\n return null;\n }",
"@Override\n\tpublic String encodeUrl(String url) {\n\t\treturn null;\n\t}",
"public byte[] encode(byte[] bytes) {\n/* 199 */ return encodeUrl(WWW_FORM_URL_SAFE, bytes);\n/* */ }",
"private static String urlEncode(String toEncode) throws UnsupportedEncodingException{\r\n\t\treturn URLEncoder.encode(toEncode, \"UTF-8\");\r\n\t}",
"private static String encodeurl(String url) \n { \n\n try { \n String prevURL=\"\"; \n String decodeURL=url; \n while(!prevURL.equals(decodeURL)) \n { \n prevURL=decodeURL; \n decodeURL=URLDecoder.decode( decodeURL, \"UTF-8\" ); \n } \n return decodeURL.replace('\\\\', '/'); \n } catch (UnsupportedEncodingException e) { \n return \"Issue while decoding\" +e.getMessage(); \n } \n }",
"@Override\n @SuppressWarnings(\"all\")\n public String encodeUrl(String arg0) {\n\n return null;\n }",
"URI rewrite(URI uri);",
"public static String encodeQuery(String query) {\n String retString;\n\n retString = replaceString(query, \"%\", \"%25\");\n retString = replaceString(retString, \" \", \"%20\");\n return retString;\n }",
"public static String encodeURL(String string) {\n\t\treturn Utils.encodeURL(string);\n\t}",
"public String encodeToUrlString() throws IOException {\n return encodeWritable(this);\n }",
"public String encodeRedirectURL(String s) {\n\t\treturn null;\n\t}",
"public String encode(String longUrl) {\n\n String shortUrl = getShortUrl();\n\n if(shortToLongUrl.containsKey(shortUrl)){\n shortUrl = getShortUrl();\n }\n\n shortToLongUrl.put(shortUrl, longUrl);\n return \"http://tinyurl.com/\" + shortUrl;\n }",
"URI uri();",
"@Override\n protected final String encode(String unencoded) {\n try {\n return StringUtils.isBlank(unencoded) ? \"\" : URLEncoder.encode(unencoded, \"UTF-8\");\n } catch (UnsupportedEncodingException ex) {\n java.util.logging.Logger.getLogger(PostRedirectGetWithCookiesFormHelperImpl.class.getName()).log(Level.SEVERE, null, ex);\n return unencoded;\n }\n }",
"URI createURI();",
"public static String encode(String argStr) {\r\n\t\tString result = argStr;\r\n\t\ttry {\r\n\t\t\tif (result != null && !result.isEmpty()) {\r\n\t\t\t\tresult = URLDecoder.decode(result, UTF_8);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// ignore\r\n\t\t}\r\n\t\tresult = encodeExplicit(result);\r\n\t\treturn result;\r\n\t}",
"public static String encode(String toEncode)\n {\n return com.github.terefang.jldap.ldap.LDAPUrl.encode( toEncode);\n }",
"public String encode(String longUrl) {\n String key = \"\"+longUrl.hashCode();\n map.put(key, longUrl);\n return key;\n }",
"public static String encodedURI(Resource resource) {\r\n\t\tString result = null;\r\n\t\tif (resource != null) {\r\n\t\t\tresult = encodedURI(resource.getURI(), JenaUtils.prefixedURI(resource));\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public QueryStringEncoder(String uri) {\n this(uri, HttpCodecUtil.DEFAULT_CHARSET);\n }",
"private URI makeUri(String source) throws URISyntaxException {\n if (source == null)\n source = \"\";\n\n if ((source.length()>0)&&((source.substring(source.length() - 1)).equals(\"/\") ))\n source=source.substring(0, source.length() - 1);\n\n return new URI( source.toLowerCase() );\n }",
"public static String encodeQueryValue(String query) {\n String retString;\n\n retString = replaceString(query, \"%\", \"%25\");\n retString = replaceString(retString, \" \", \"%20\");\n retString = replaceString(retString, \"&\", \"%26\");\n retString = replaceString(retString, \"?\", \"%3F\");\n retString = replaceString(retString, \"=\", \"%3D\");\n return retString;\n }",
"public GiftCardProductQuery canonicalUrl() {\n startField(\"canonical_url\");\n\n return this;\n }",
"@Override\n public String encodeRedirectURL(String url) {\n return this._getHttpServletResponse().encodeRedirectURL(url);\n }",
"@Override\n\tpublic String encodeRedirectURL(String url) {\n\t\treturn null;\n\t}",
"public String encodeRedirectUrl(String s) {\n\t\treturn null;\n\t}",
"private String urlEncode(String str) {\n String charset = StandardCharsets.UTF_8.name();\n try {\n return URLEncoder.encode(str, charset);\n } catch (UnsupportedEncodingException e) {\n JrawUtils.logger().error(\"Unsupported charset: \" + charset);\n return null;\n }\n }",
"public static String encodedURI(NamedObject namedObject) {\r\n\t\tString result = null;\r\n\t\tif (namedObject != null) {\r\n\t\t\treturn encodedURI(namedObject.getURI(), namedObject.getPrefixedURI());\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"static String uriEscapeString(String unescaped) {\n try {\n return URLEncoder.encode(unescaped, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n // This is fatal.\n throw new RuntimeException(e);\n }\n }",
"public static String normalizeUrl(String url) throws URISyntaxException {\n\t\tURI uri = new URI(url);\n\t\tString scheme = uri.getScheme().toLowerCase();\n\t\tString authority = uri.getAuthority().toLowerCase();\n\t\tint port = uri.getPort();\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(scheme)\n\t\t .append(\"://\")\n\t\t .append(authority);\n\t\t\n\t\t//Port\n\t\tif (port != -1 &&\n\t\t\t((\"http\".equals(scheme) && 80 != port) ||\n\t\t\t (\"https\".equals(scheme) && 443 != port))) {\n\t\t\tsb.append(\":\").append(port);\n\t\t}\n\t\t\n\t\t//Path\n\t\tsb.append(uri.getPath());\n\t\treturn sb.toString();\n\t}",
"static private String ToUrlEncoded(String word) {\n\t\tString urlStr = null;\n\t\ttry {\n\t\t\turlStr = URLEncoder.encode(word,CharSet);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn urlStr;\n\t}",
"public URI toURI( String location ) throws URISyntaxException {\n\t\treturn new URI( Strings.nvl(location).replace(\" \", \"%20\"));\n\t}",
"public URI toIRI(\n ){\n String xri = toXRI();\n StringBuilder iri = new StringBuilder(xri.length());\n int xRef = 0;\n for(\n int i = 0, limit = xri.length();\n i < limit;\n i++\n ){\n char c = xri.charAt(i);\n if(c == '%') {\n iri.append(\"%25\");\n } else if (c == '(') {\n xRef++;\n iri.append(c);\n } else if (c == ')') {\n xRef--;\n iri.append(c);\n } else if (xRef == 0) {\n iri.append(c);\n } else if (c == '#') {\n iri.append(\"%23\");\n } else if (c == '?') {\n iri.append(\"%3F\");\n } else if (c == '/') {\n iri.append(\"%2F\");\n } else {\n iri.append(c);\n }\n }\n return URI.create(iri.toString());\n }",
"private static String getCanonicalizedResourceName(Reference resourceRef) {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(resourceRef.getPath());\r\n \r\n Form query = resourceRef.getQueryAsForm();\r\n if (query.getFirst(\"acl\", true) != null) {\r\n sb.append(\"?acl\");\r\n } else if (query.getFirst(\"torrent\", true) != null) {\r\n sb.append(\"?torrent\");\r\n }\r\n \r\n return sb.toString();\r\n }",
"@Override\n public String encodeRedirectURL(String arg0) {\n return null;\n }",
"protected String getTildered(String wrappedUri) {\r\n\t\treturn wrappedUri.replaceAll(\"~\", \"~0\").replaceAll(\"/\", \"~1\");\r\n\t}",
"public String encode(String longUrl) {\n String key = \"\"+map.size();\n map.put(key, longUrl);\n return key;\n }",
"static String hashURL(String url){\n\t\treturn url.replace('/', 's').replace(':','c');\n\t}",
"@Override\n @SuppressWarnings({ \"all\", \"deprecation\" })\n public String encodeRedirectUrl(String arg0) {\n\n return null;\n }",
"@VisibleForTesting\n void appendCanonicalizedResource(HttpRequest request, StringBuilder toSign) {\n toSign.append(request.getEndpoint().getRawPath().toLowerCase()).append(\"\\n\");\n }",
"URI translate(URI original);",
"@Override\n\tpublic String encodeRedirectUrl(String url) {\n\t\treturn null;\n\t}",
"protected String canonicalizeLabel(String label) {\r\n\t\tif (label.indexOf('&') < 0) {\r\n\t\t\treturn label;\r\n\t\t}\r\n\r\n\t\treturn label.replaceAll(\"&\", \"&&\"); //$NON-NLS-1$//$NON-NLS-2$\r\n\t}",
"private static String urlEncodeParameter(String parameter) throws UnsupportedEncodingException{\r\n\t\tint equal = parameter.indexOf(\"=\");\r\n\t\treturn urlEncode(parameter.substring(0, equal))+\"=\"+urlEncode(parameter.substring(equal+1));\r\n\t}",
"public static String verifierUri(String uri) {\n\t\treturn uri.charAt(uri.length() - 1) == '/' ? uri : uri + \"/\";\n\t}",
"@Test\n\tpublic void testUrlEncode_2()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"public URI toURI( URL url ) throws URISyntaxException {\n\t\treturn toURI(url.toString());\n\t}",
"java.lang.String getUri();",
"java.lang.String getUri();",
"@Test\n\tpublic void testUrlEncode_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"private String URLEncode (String sStr) {\r\n if (sStr==null) return null;\r\n\r\n int iLen = sStr.length();\r\n StringBuffer sEscaped = new StringBuffer(iLen+100);\r\n char c;\r\n for (int p=0; p<iLen; p++) {\r\n c = sStr.charAt(p);\r\n switch (c) {\r\n case ' ':\r\n sEscaped.append(\"%20\");\r\n break;\r\n case '/':\r\n sEscaped.append(\"%2F\");\r\n break;\r\n case '\"':\r\n sEscaped.append(\"%22\");\r\n break;\r\n case '#':\r\n sEscaped.append(\"%23\");\r\n break;\r\n case '%':\r\n sEscaped.append(\"%25\");\r\n break;\r\n case '&':\r\n sEscaped.append(\"%26\");\r\n break;\r\n case (char)39:\r\n sEscaped.append(\"%27\");\r\n break;\r\n case '+':\r\n sEscaped.append(\"%2B\");\r\n break;\r\n case ',':\r\n sEscaped.append(\"%2C\");\r\n break;\r\n case '=':\r\n sEscaped.append(\"%3D\");\r\n break;\r\n case '?':\r\n sEscaped.append(\"%3F\");\r\n break;\r\n case 'á':\r\n sEscaped.append(\"%E1\");\r\n break;\r\n case 'é':\r\n sEscaped.append(\"%E9\");\r\n break;\r\n case 'í':\r\n sEscaped.append(\"%ED\");\r\n break;\r\n case 'ó':\r\n sEscaped.append(\"%F3\");\r\n break;\r\n case 'ú':\r\n sEscaped.append(\"%FA\");\r\n break;\r\n case 'Á':\r\n sEscaped.append(\"%C1\");\r\n break;\r\n case 'É':\r\n sEscaped.append(\"%C9\");\r\n break;\r\n case 'Í':\r\n sEscaped.append(\"%CD\");\r\n break;\r\n case 'Ó':\r\n sEscaped.append(\"%D3\");\r\n break;\r\n case 'Ú':\r\n sEscaped.append(\"%DA\");\r\n break;\r\n case 'à':\r\n sEscaped.append(\"%E0\");\r\n break;\r\n case 'è':\r\n sEscaped.append(\"%E8\");\r\n break;\r\n case 'ì':\r\n sEscaped.append(\"%EC\");\r\n break;\r\n case 'ò':\r\n sEscaped.append(\"%F2\");\r\n break;\r\n case 'ù':\r\n sEscaped.append(\"%F9\");\r\n break;\r\n case 'À':\r\n sEscaped.append(\"%C0\");\r\n break;\r\n case 'È':\r\n sEscaped.append(\"%C8\");\r\n break;\r\n case 'Ì':\r\n sEscaped.append(\"%CC\");\r\n break;\r\n case 'Ò':\r\n sEscaped.append(\"%D2\");\r\n break;\r\n case 'Ù':\r\n sEscaped.append(\"%D9\");\r\n break;\r\n case 'ñ':\r\n sEscaped.append(\"%F1\");\r\n break;\r\n case 'Ñ':\r\n sEscaped.append(\"%D1\");\r\n break;\r\n case 'ç':\r\n sEscaped.append(\"%E7\");\r\n break;\r\n case 'Ç':\r\n sEscaped.append(\"%C7\");\r\n break;\r\n case 'ô':\r\n sEscaped.append(\"%F4\");\r\n break;\r\n case 'Ô':\r\n sEscaped.append(\"%D4\");\r\n break;\r\n case 'ö':\r\n sEscaped.append(\"%F6\");\r\n break;\r\n case 'Ö':\r\n sEscaped.append(\"%D6\");\r\n break;\r\n case '`':\r\n sEscaped.append(\"%60\");\r\n break;\r\n case '¨':\r\n sEscaped.append(\"%A8\");\r\n break;\r\n default:\r\n sEscaped.append(c);\r\n break;\r\n }\r\n } // next\r\n\r\n return sEscaped.toString();\r\n }",
"public static String percentEncode(String s) {\r\n\t\t//s = _percentEncode( s ); // the original method, from java.net\r\n\t\ts = encodeURL(s, \"UTF-8\");\r\n\t\treturn s;\r\n\t}",
"public static String encode(String in){\n in = in.replace(\"&\", \"&\");\n in = in.replace(\"\\\"\", \""\");\n in = in.replace(\"<\", \"<\");\n in = in.replace(\">\", \">\");\n log.debug(\"encoded string: \" + in);\n // FIXME: Consider double-encoding & if it is not part of &\n return in;\n }",
"String getURI();",
"String getURI();",
"String getURI();",
"public static String URLEncode (String str) {\n\ttry {\n\t return java.net.URLEncoder.encode (str, \"UTF-8\");\n\t} catch (UnsupportedEncodingException e) {\n\t e.printStackTrace ();\n\t} \n\treturn str;\n }",
"@Test(expected = java.io.UnsupportedEncodingException.class)\n\tpublic void testUrlEncode_4()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"public static String encode(String arg) {\n String encoded = Base64.getEncoder().encodeToString(arg.getBytes());\n\n return encoded;\n }",
"private String encodeURILikeJavascript(String s) {\n log.info(\"Entering encodeURILikeJavascript\");\n String result = null;\n\n try {\n result = URLEncoder.encode(s, \"UTF-8\")\n .replaceAll(\"\\\\+\", \"%20\")\n .replaceAll(\"\\\\%21\", \"!\")\n .replaceAll(\"\\\\%27\", \"'\")\n .replaceAll(\"\\\\%28\", \"(\")\n .replaceAll(\"\\\\%29\", \")\")\n .replaceAll(\"\\\\%7E\", \"~\");\n } catch (UnsupportedEncodingException e) {\n result = s;\n }\n\n return result;\n }",
"public URI getUri(String iden) {\r\n\t\tURI rtn = null;\r\n\t\tString url = null;\r\n\t\tStringBuilder strRtn = new StringBuilder(uriBuilder);\r\n\t\tif(isUri(iden)) {\r\n\t\t\tSystem.out.println(\"isUri\");\r\n\t\t\treturn valueFactory.createURI(iden);\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\turl = URLEncoder.encode(iden,\"utf-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tstrRtn.append(url);\r\n\t\t\trtn = valueFactory.createURI(strRtn.toString());\r\n\t\t\treturn rtn;\r\n\t\t}\r\n\t}",
"public String encode(String longUrl) {\n String key = \"\";\n do {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < 6; i++) {\n int r = rand.nextInt(charSet.length());\n sb.append(charSet.charAt(r));\n }\n key = sb.toString();\n } while (map.containsKey(key));\n \n map.put(BASE_HOST + key, longUrl);\n return BASE_HOST + key;\n }",
"public static String encode(CharSequence object) throws HttpRequestException {\n int n;\n URL uRL;\n Object object2;\n block4: {\n try {\n uRL = new URL(object.toString());\n object2 = uRL.getHost();\n n = uRL.getPort();\n object = object2;\n if (n == -1) break block4;\n object = (String)object2 + ':' + Integer.toString(n);\n }\n catch (IOException iOException) {\n throw new HttpRequestException(iOException);\n }\n }\n try {}\n catch (URISyntaxException uRISyntaxException) {\n object2 = new IOException(\"Parsing URI failed\");\n ((Throwable)object2).initCause(uRISyntaxException);\n throw new HttpRequestException((IOException)object2);\n }\n object2 = new URI(uRL.getProtocol(), (String)object, uRL.getPath(), uRL.getQuery(), null).toASCIIString();\n n = ((String)object2).indexOf(63);\n object = object2;\n if (n <= 0) return object;\n object = object2;\n if (n + 1 >= ((String)object2).length()) return object;\n return ((String)object2).substring(0, n + 1) + ((String)object2).substring(n + 1).replace(\"+\", \"%2B\");\n }",
"public String encode(String longUrl) {\n\n list.add(longUrl);\n\n return String.valueOf(list.size());\n\n }",
"public static String urlEncode(String inText)\n {\n try\n {\n return URLEncoder.encode(inText, \"UTF-8\");\n }\n catch(java.io.UnsupportedEncodingException e)\n {\n Log.error(\"invalid encoding for url encoding: \" + e);\n\n return \"error\";\n }\n }",
"@Override\n public String encodeRedirectUrl(String arg0) {\n return null;\n }",
"public static String encoderRequete(\r\n\t\t\tfinal String pYQL) throws UnsupportedEncodingException {\r\n\t\t\r\n\t\tfinal String uriEncodee = URLEncoder.encode(pYQL, \"UTF-8\");\r\n\t\t\r\n\t\treturn uriEncodee;\r\n\t\t\r\n\t}",
"public String fixForScheme(String url) {\n\t\tStringBuffer returnUrl = new StringBuffer(url);\n\t\tif(StringUtils.contains(url, \"returnurl=\"))\n\t\t{\n\t\t\treturnUrl = new StringBuffer(StringUtils.substring(url,0, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")));\n\t\t\t\n\t\t\treturnUrl.append(\"returnurl=\");\n\t\t\tString returnurl = StringUtils.substring(url, \n\t\t\t\t\tStringUtils.indexOf(url, \"returnurl=\")+10);\n\t\t\t\n\t\t\ttry {\n\t\t\t\treturnUrl.append(URLEncoder.encode(new String(Base64.encodeBase64(returnurl.getBytes())),\"UTF-8\"));\n\t\t\t} catch (UnsupportedEncodingException 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 returnUrl.toString();\n\t}",
"@Test\n\tpublic void testUrlEncode_3()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tString input = \"\";\n\t\tString encodingScheme = \"\";\n\n\t\tString result = fixture.urlEncode(input, encodingScheme);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}",
"public static String urlEncode(String str) {\n try {\n return URLEncoder.encode(notNull(\"str\", str), \"UTF-8\");\n } catch (UnsupportedEncodingException ex) {\n return Exceptions.chuck(ex);\n }\n }",
"@Override\n protected boolean shouldEncodeUrls() {\n return isShouldEncodeUrls();\n }",
"public static String encodeObjectId(String objectId) {\n if (objectId != null) {\n return objectId.replace(FORWARD_SLASH, FORWARD_SLASH_ENCODED2);\n }\n return objectId;\n }",
"protected native String encodeURIComponent(String text) /*-{\r\n\t\treturn encodeURIComponent(text);\r\n\t}-*/;"
]
| [
"0.74910665",
"0.7237207",
"0.6726856",
"0.66509444",
"0.6612382",
"0.63238007",
"0.6252602",
"0.6134464",
"0.58842736",
"0.5869767",
"0.5833109",
"0.5816849",
"0.57731336",
"0.57254755",
"0.5695371",
"0.56927425",
"0.56923586",
"0.5686202",
"0.5667971",
"0.5663427",
"0.5624826",
"0.5596409",
"0.5565749",
"0.5557034",
"0.5553453",
"0.554556",
"0.5522184",
"0.54945755",
"0.54759574",
"0.54599565",
"0.5455427",
"0.5420521",
"0.54163796",
"0.54007417",
"0.5389151",
"0.53880346",
"0.53787214",
"0.5372418",
"0.5366362",
"0.5349198",
"0.53283393",
"0.5310388",
"0.5287377",
"0.5285818",
"0.527921",
"0.52759373",
"0.52634436",
"0.52606267",
"0.5250626",
"0.52378345",
"0.5234845",
"0.5217074",
"0.5215351",
"0.5213697",
"0.5203402",
"0.51655483",
"0.51640755",
"0.51274776",
"0.51101243",
"0.510517",
"0.5104761",
"0.508303",
"0.5076912",
"0.5069061",
"0.506644",
"0.50621986",
"0.5054202",
"0.50480807",
"0.50323516",
"0.50252616",
"0.5024194",
"0.50162214",
"0.5011468",
"0.5007053",
"0.5003887",
"0.5003887",
"0.49992374",
"0.49965283",
"0.49900615",
"0.4986946",
"0.4980031",
"0.4980031",
"0.4980031",
"0.49731693",
"0.49636206",
"0.49632904",
"0.49428117",
"0.49413973",
"0.49391198",
"0.49356028",
"0.49342063",
"0.49341187",
"0.49288967",
"0.49098",
"0.48990467",
"0.48797578",
"0.4865897",
"0.4860558",
"0.48571354",
"0.48536617"
]
| 0.64321584 | 5 |
Returns the name of the file that is pointed to by this URI. | public static String getName(URI uri) {
if (uri != null) {
String location = uri.getSchemeSpecificPart();
if (location != null) {
String name = location;
int index = location.lastIndexOf('/');
if (index != -1) {
name = name.substring(index + 1, name.length());
}
return name;
}
}
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"public String getFileName() {\n\t\treturn file.getFileName();\n\t}",
"String get_name() {\n File file = new File(url);\n return file.getName();\n }",
"public String getFileName() {\n\t\treturn file.getName();\n\t}",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"java.lang.String getFileName();",
"public String getName() {\n return _file.getAbsolutePath();\n }",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }",
"public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}",
"public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}",
"public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}",
"public String getFilename() {\n\treturn file.getFilename();\n }",
"public String getName()\n {\n return( file );\n }",
"public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}",
"@Override\n\tpublic String getFilename() {\n\t\treturn this.path.getFileName().toString();\n\t}",
"public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }",
"private void getFileName() {\n\t\tHeader contentHeader = response.getFirstHeader(\"Content-Disposition\");\n\t\tthis.filename = null;\n\t\tif (contentHeader != null) {\n\t\t\tHeaderElement[] values = contentHeader.getElements();\n\t\t\tif (values.length == 1) {\n\t\t\t\tNameValuePair param = values[0].getParameterByName(\"filename\");\n\t\t\t\tif (param != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfilename = param.getValue();\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}\n\t\t\t}\n\t\t}\n\t\tif (this.filename == null) {\n\t\t\tthis.filename = url.substring(url.lastIndexOf(\"/\") + 1);\n\t\t}\n\t}",
"public String getFileName()\n {\n return getString(\"FileName\");\n }",
"String getFilename();",
"public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }",
"public String getFile_name() {\n\t\treturn file_name;\n\t}",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n }\n }",
"public String getFileName(Uri uri) {\n String result = null;\n int cut;\n\n String scheme = uri.getScheme();\n if (scheme != null && scheme.equals(\"content\")) {\n //\n // query the URI provider for the file name\n //\n try (Cursor cursor = getContentResolver().query(uri, new String[]{OpenableColumns.DISPLAY_NAME}, null, null, null)) {\n if (cursor != null && cursor.moveToFirst()) {\n result = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));\n }\n }\n }\n if (result != null)\n return result;\n\n result = uri.getPath();\n try {\n assert result != null;\n cut = result.lastIndexOf('/');\n } catch (NullPointerException e) {\n cut = -1;\n }\n if (cut != -1)\n result = result.substring(cut + 1);\n\n return result;\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n fileName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getFileRealName() {\n return fileRealName;\n }",
"public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}",
"public String getName() {\n\t\treturn filename;\n\t}",
"public edu.umich.icpsr.ddi.FileNameType getFileName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileNameType target = null;\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().find_element_user(FILENAME$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getName() {\r\n return mFile.getName();\r\n }",
"public String getFilename();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"String getFileName();",
"public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n fileName_ = s;\n return s;\n }\n }",
"public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }",
"@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }",
"public String getFileName();",
"public String getFileName();",
"static public String getFileName(ObjectNode schemeId)\n\t{\n\t\treturn schemeId.path(\"fileName\").asText(null);\n\t}",
"public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }",
"public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}",
"public String getName() {\n if (filename != null) {\n int index = filename.lastIndexOf(separatorChar);\n\n if (index >= 0) {\n return filename.substring(index + 1);\n } else {\n if (filename == null) {\n return \"\";\n } else {\n return filename;\n }\n }\n } else {\n return \"\";\n }\n }",
"public final String getFileName()\r\n {\r\n return _fileName;\r\n }",
"public String getNameForFileSystem() {\r\n\t\treturn filename;\r\n\t}",
"public String getFileName() {\n if (url.endsWith(\"/\")) {\n url = url.substring(0, url.length() - 1);\n }\n\n //Replace illegal characters\n String urlFileName = url.replace(\"http://\", \"\");\n urlFileName = urlFileName.replace(\"https://\", \"\");\n urlFileName = urlFileName.replace(\"/\", \"\");\n urlFileName += \".txt\";\n\n return urlFileName;\n }",
"public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}",
"@java.lang.Override\n public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getFilename() {\n java.lang.Object ref = filename_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n filename_ = s;\n return s;\n }\n }",
"private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}",
"public final String getFileName() {\n return this.fileName;\n }",
"public String GetFileName() {\r\n\treturn fileName;\r\n }",
"public String getSimpleName() { return FilePathUtils.getFileName(_name); }",
"public String getRemoteFileName() {\n\t\treturn this.reader.getRemoteFileName();\n\t}",
"protected String getFileName()\n {\n return new StringBuilder()\n .append(getInfoAnno().filePrefix())\n .append(getName())\n .append(getInfoAnno().fileSuffix())\n .toString();\n }",
"public String getFileName()\n\t{\n\t\treturn fileName;\n\t}",
"public String getFileName()\n\t{\n\t\treturn fileName;\n\t}",
"public String getFileName ();",
"protected String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName(String request) {\n\t\tString fileName = request.substring(request.indexOf('/') + 1, request.indexOf(\" HTTP\", (request.indexOf('/'))));\n\t\tSystem.out.println(\"Filename is: \" + fileName);\n\n\t\treturn fileName;\n\t}",
"public String fileName () {\n\t\treturn fileName;\n\t}",
"public String getName()\n\t{\n\t\treturn _fileName;\n\t}",
"public String getFileName()\r\n\t{\r\n\t\treturn settings.getFileName();\r\n\t}",
"public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"public String getFileName() {\r\n\t\treturn fileName;\r\n\t}",
"@Override\n\tpublic String getName()\n\t{\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFileName() {\n\t\treturn fileName;\n\t}",
"public String getFilename() {\n\t\treturn fileName;\n\t}"
]
| [
"0.77801317",
"0.74724185",
"0.7465973",
"0.7465973",
"0.7429905",
"0.74144995",
"0.739962",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.7397626",
"0.73642206",
"0.7349562",
"0.7303816",
"0.7287358",
"0.7278371",
"0.72656226",
"0.7248345",
"0.72075915",
"0.72009695",
"0.71927947",
"0.71892",
"0.7168589",
"0.713661",
"0.70963544",
"0.706492",
"0.7035667",
"0.70165247",
"0.70165247",
"0.7014421",
"0.7003875",
"0.7003875",
"0.6992327",
"0.6991642",
"0.6984969",
"0.69828135",
"0.6982792",
"0.6982792",
"0.6982792",
"0.6982792",
"0.6982792",
"0.6982792",
"0.698",
"0.69714105",
"0.6957789",
"0.6957789",
"0.6957789",
"0.6957789",
"0.6957789",
"0.6950657",
"0.6950657",
"0.6934738",
"0.6934738",
"0.6934738",
"0.6934738",
"0.6934738",
"0.6934738",
"0.69228894",
"0.6919606",
"0.69154525",
"0.69154525",
"0.69088554",
"0.69069153",
"0.68815744",
"0.6879107",
"0.6870207",
"0.68629026",
"0.6857661",
"0.68556064",
"0.6852764",
"0.6852764",
"0.6840408",
"0.6838886",
"0.68312496",
"0.6817095",
"0.6815978",
"0.6790934",
"0.6766039",
"0.6766039",
"0.6755062",
"0.6748417",
"0.67480695",
"0.6747761",
"0.6746778",
"0.67455757",
"0.6743804",
"0.6734891",
"0.6734891",
"0.6734891",
"0.67344385",
"0.67135453",
"0.67135453",
"0.67135453",
"0.67135453",
"0.67135453",
"0.6670571"
]
| 0.0 | -1 |
Returns the extension of the file that is pointed to by this URI. | public static String getExtension(URI uri) {
if (uri != null) {
String location = uri.getSchemeSpecificPart();
if (location != null) {
String name = location;
int index = location.lastIndexOf('.');
if (index != -1) {
name = name.substring(index + 1, name.length());
}
return name;
}
}
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }",
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}",
"public String getFileExtension();",
"public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}",
"String getFileExtension();",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}",
"public static String getFileExtension() {\n return fileExtension;\n }",
"public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}",
"String getExtension();",
"public String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }",
"private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }",
"protected abstract String getFileExtension();",
"public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }",
"public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}",
"public static String getFileExtension(URL url) {\n\t\tString fileName = url.getFile();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }",
"public abstract String getFileExtension();",
"@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // [email protected]: Review of patch from [email protected]\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }",
"public String getExtension() {\n return extension;\n }",
"public String getExtension() {\n return extension;\n }",
"private String getFileExtension(Uri uri) {\n ContentResolver cR = getActivity().getApplicationContext().getContentResolver();\n MimeTypeMap mime = MimeTypeMap.getSingleton();\n return mime.getExtensionFromMimeType(cR.getType(uri));\n }",
"public static String getExtension(final String file) throws IOException {\n return FilenameUtils.getExtension(file);\n }",
"public String getExtension(String url) {\n\t\tint dotIndex = url.lastIndexOf('.');\n\t\tString extension = null;\n\t\tif (dotIndex > 0) {\n\t\t\textension = url.substring(dotIndex + 1);\n\t\t}\n\t\treturn extension;\n\t}",
"public String getExtension() {\n return extension;\n }",
"private String getFileEx(Uri uri){\n ContentResolver cr=getContentResolver();\n MimeTypeMap mime=MimeTypeMap.getSingleton();\n return mime.getExtensionFromMimeType(cr.getType(uri));\n }",
"private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }",
"@CheckForNull\n String getPreferredExtension();",
"@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }",
"private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }",
"public static String getExtension(final File file) throws IOException {\n return FilenameUtils.getExtension(file.getName());\n }",
"String getFileExtensionByFileString(String name);",
"public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf(\".\");\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }",
"String getContentType(String fileExtension);",
"public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf('.');\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }",
"public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }",
"private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}",
"private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }",
"@Internal(\"Represented as part of archiveName\")\n public String getExtension() {\n return extension;\n }",
"public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}",
"public static String getSlideFileExtension(String slideRef) {\n\t\t// Determine the file extension for this slide\n\t\treturn FilenameUtils.getExtension(slideRef);\n\t}",
"private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}",
"public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }",
"public String getImageExt(Uri uri) {\n ContentResolver contentResolver = getContentResolver();\n// file extension from url\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n // uri laa kr de rhaah hai\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }",
"public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }",
"public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}",
"@Pure\n\tpublic String getScriptFileExtension() {\n\t\treturn this.fileExtension;\n\t}",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"String getFileMimeType();",
"private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }",
"public String getFileExtension(File objFile) {\n\n String sFileName = null;\n String sExtension = null;\n\n try {\n\n if (!objFile.exists()) {\n throw new Exception(\"File does not exists\");\n }\n\n sFileName = objFile.getName();\n int i = sFileName.lastIndexOf('.');\n if (i > 0) {\n sExtension = sFileName.substring(i + 1).trim();\n }\n\n } catch (Exception e) {\n println(\"Methods.getFileExtension : \" + e.toString());\n sExtension = \"\";\n } finally {\n return sExtension;\n }\n }",
"public String getFileExtension() {\r\n return Generator.ANIMALSCRIPT_FORMAT_EXTENSION;\r\n }",
"public static String getExt(File song)\n\t{\n\t\treturn song.getName().substring(song.getName().lastIndexOf('.') + 1);\n\t}",
"public static String getSafeFileExtension(IPath path) {\r\n\t\tString fileExtension = \"\"; //$NON-NLS-1$\r\n\t\tif (path != null) {\r\n\t\t\tString temp = path.getFileExtension();\r\n\t\t\tif (temp != null)\r\n\t\t\t\tfileExtension = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn fileExtension;\r\n\t}",
"private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }",
"public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }",
"public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}",
"public static String getFileExtension(File aFile) {\n\t\tString returnMe = aFile.getName().substring(\n\t\t\t\taFile.getName().lastIndexOf('.') + 1);\n\t\treturn returnMe;\n\t}",
"public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public String getFileExt(File fileName) {\n return fileName.getName()\n .substring(fileName.getName().lastIndexOf('.'));\n }",
"public static String GetFileExtension(String filePath) {\n\n\t\tint index = filePath.lastIndexOf('.');\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(index + 1);\n\t\t}\n\n\t\treturn \"\";\n\t}",
"public String getFilePath(Extension extension) {\n\t\treturn extension.eResource().getURI().toString();\n\t}",
"protected String getExtension() {\n\t\treturn \"\";\n\t}",
"public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"public static String getFileExtention(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(index + 1);\n\n return \"\";\n }",
"public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}",
"public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }",
"default String fileExtension() {\n\t\treturn \".json\";\n\t}",
"public static String contentToFileExtension(String mimeType) {\r\n\t\tint slashPos = mimeType.indexOf(MIMEConstants.SEPARATOR);\r\n\t\tif ((slashPos < 1) || (slashPos == (mimeType.length() - 1))) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString type = mimeType.substring(0, slashPos);\r\n\t\tString subtype;\r\n\t\tint semicolonPos = mimeType.indexOf(\";\", slashPos + 1);\r\n\t\tif (semicolonPos < 0) {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1).trim();\r\n\t\t} else {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1, semicolonPos).trim();\r\n\t\t}\r\n\r\n\t\treturn contentToFileExtension(type, subtype);\r\n\t}",
"public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}",
"public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }",
"public URI getURI()\n {\n return extensionURI;\n }",
"private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}",
"public Extension getExtension() {\n return extension;\n }",
"private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}",
"public String getDataFileExtension() {\r\n return dataFileExtension;\r\n }",
"public String getFileType()\n {\n if (m_fileOptions.m_type == null ||\n m_fileOptions.m_type.length() <= 0)\n {\n return getTypeFromExtension();\n }\n\n return m_fileOptions.m_type;\n }",
"public static String getFileExtension(String filePath) {\n if (filePath == null || filePath.isEmpty()) {\n return \"\";\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (extenPosi == -1) {\n return \"\";\n }\n return (filePosi >= extenPosi) ? \"\" : filePath.substring(extenPosi + 1);\n }",
"public java.lang.Object getExtension() {\r\n return extension;\r\n }",
"public List<String> getFileExtensions()\n/* */ {\n/* 619 */ if ((useRegisteredSuffixPatternMatch()) && (this.contentNegotiationManager != null)) {\n/* 620 */ return this.contentNegotiationManager.getAllFileExtensions();\n/* */ }\n/* 622 */ return null;\n/* */ }",
"java.lang.String getExtensionText();",
"public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}",
"public FileNameExtensionFilter getExtensionFilter() {\r\n\t\treturn extensionFilter;\r\n\t}",
"java.lang.String getMimeType();",
"java.lang.String getMimeType();",
"public String getExtName(String szMIMEType)\r\n { \r\n if (szMIMEType == null)\r\n return null;\r\n\r\n Object extension = m_hashTableExt.get(szMIMEType);\r\n\r\n if (extension == null) \r\n return null;\r\n return (String)extension;\r\n }",
"public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"String getOutputExtension();",
"public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }",
"java.lang.String getFilename();",
"java.lang.String getFilename();",
"public String getExtension(File f) {\n\t if(f != null) {\n\t String filename = f.getName();\n\t int i = filename.lastIndexOf('.');\n\t if(i>0 && i<filename.length()-1) {\n\t\t return filename.substring(i+1).toLowerCase();\n\t }\n\t }\n\t return null;\n }",
"public String[] getExtensions() {\n\t\treturn url.getExtensions();\n }",
"public String getReadFileExtension(int formatIndex);",
"String getTilePathExtension();",
"public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}"
]
| [
"0.80109483",
"0.7903638",
"0.7882344",
"0.77681583",
"0.770514",
"0.7622851",
"0.76064384",
"0.75724226",
"0.74624765",
"0.7427767",
"0.72938126",
"0.7219773",
"0.7106918",
"0.70847166",
"0.70756876",
"0.707182",
"0.7069146",
"0.7052431",
"0.703777",
"0.7010296",
"0.6926794",
"0.6926794",
"0.6923777",
"0.69159937",
"0.6896086",
"0.68859094",
"0.6871346",
"0.68240136",
"0.6782879",
"0.67547363",
"0.6742347",
"0.67328733",
"0.67255765",
"0.6704491",
"0.6674985",
"0.6658495",
"0.6635465",
"0.6617655",
"0.6596446",
"0.6580492",
"0.65604216",
"0.65475565",
"0.6545074",
"0.65430385",
"0.65389377",
"0.65188223",
"0.6513143",
"0.6510679",
"0.65089923",
"0.6493776",
"0.6482414",
"0.6479637",
"0.647825",
"0.64619875",
"0.6458633",
"0.6447535",
"0.6444103",
"0.642576",
"0.641797",
"0.63956994",
"0.63922703",
"0.63802105",
"0.6376528",
"0.63746196",
"0.6348844",
"0.6340167",
"0.6295083",
"0.6286781",
"0.62784827",
"0.6276868",
"0.62729",
"0.6266959",
"0.62544745",
"0.6235454",
"0.62242115",
"0.62163126",
"0.6215551",
"0.6180842",
"0.6173978",
"0.61718225",
"0.6171333",
"0.6170245",
"0.61671704",
"0.61607265",
"0.61500406",
"0.61499727",
"0.61366063",
"0.612539",
"0.612539",
"0.6122087",
"0.6113637",
"0.61092925",
"0.6099583",
"0.6088182",
"0.6088182",
"0.608774",
"0.6076809",
"0.6074482",
"0.6060668",
"0.6032598"
]
| 0.68948674 | 25 |
Returns the name of the directory that is pointed to by this URI. | public static String getDirectoryName(URI uri) {
String location = uri.getSchemeSpecificPart();
if (location != null) {
String name = location;
int end = location.lastIndexOf('/');
if (end != -1) {
int start = location.lastIndexOf('/', end - 1);
name = name.substring(start + 1, end);
}
return name;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getDirName();",
"@Override\n\tpublic String getDirName() {\n\t\treturn StringUtils.substringBeforeLast(getLocation(), \"/\");\n\t}",
"public java.lang.String getDirName() {\n java.lang.Object ref = dirName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n dirName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDirName() {\n java.lang.Object ref = dirName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n dirName_ = s;\n }\n return s;\n }\n }",
"public String getDirectory() {\n return directoryProperty().get();\n }",
"public String directory () {\n\t\treturn directory;\n\t}",
"public String getDir();",
"String getDir();",
"public String getDir() {\n return dir;\n }",
"public String getDir() {\n return this.dir;\n }",
"public com.google.protobuf.ByteString\n getDirNameBytes() {\n java.lang.Object ref = dirName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n dirName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getDir(){\r\n\t\treturn dir;\r\n\t}",
"public com.google.protobuf.ByteString\n getDirNameBytes() {\n java.lang.Object ref = dirName_;\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 dirName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getName() {\n\t\treturn name != null ? name : getDirectory().getName();\n\t}",
"String getDirectoryPath();",
"public String getFolderName() {\n return owner.getName();\n }",
"Object getDir();",
"public String getPathName();",
"public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"String getPathName();",
"String getPathName();",
"public String getPathName()\n \t{\n \t\tif ( arcname!=null )\n \t\t\treturn arcname + ARC_SEPARATOR + pathname;\n \t\treturn pathname;\n \t}",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"protected abstract String getDirectory(URL url);",
"public String getPublicUserDirectoryName() {\n return getStringProperty(PUBLIC_USER_DIRECTORY_NAME_KEY);\n }",
"public String getBaseDirectoryName() {\n return mBaseDirectoryName;\n }",
"public String getIndexDirectoryString() {\n File indexDir = this.getIndexDirectory();\n return indexDir != null ? indexDir.getAbsolutePath() : null;\n }",
"public static String getDir(String name) {\n\t\tint s = name.lastIndexOf(FILE_SEP);\n\t\treturn s == -1 ? null : name.substring(0, s);\n\t}",
"public String getArchiveDDFolderName();",
"public String getName() {\n return dtedDir + \"/\" + filename;\n }",
"public String getRelativePath() {\n if (repository == null) {\n return name;\n } else {\n StringBuffer b = new StringBuffer();\n repository.getRelativePath(b);\n b.append(name);\n return b.toString();\n }\n }",
"public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"public String getPathName()\n {\n return getString(\"PathName\");\n }",
"String get_name() {\n File file = new File(url);\n return file.getName();\n }",
"public StringProperty directoryProperty() {\n return directory;\n }",
"com.google.protobuf.ByteString\n getDirNameBytes();",
"public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }",
"public String getQualifiedName() {\n if(probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }",
"public static String downloadDir() {\n\n String downloads = stringValue(\"treefs.downloads\");\n if(isNullOrEmpty(downloads)) {\n // default home location\n downloads = home() + File.separator + \"downloads\";\n } else {\n downloads = home() + File.separator + downloads;\n }\n\n System.out.println(\"downloadDir=\" + downloads);\n return downloads;\n }",
"public String getPathname() {return this.pathname;}",
"public int getDir() {\n return this.dir;\n }",
"public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}",
"public String getFolderName() {\n return folderName;\n }",
"public int getDir() {\n\t\treturn dir;\r\n\t}",
"public URL getRootDirURL() {\n\t\treturn null;\n\t}",
"public String getPathName() {\n\t\treturn pathName;\n\t}",
"protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }",
"public String getDirectoryPath() { return DirectoryManager.OUTPUT_RESULTAT + \"/\" + directoryName;}",
"public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}",
"public String getFullPathName() {\r\n return fullPathName;\r\n }",
"public NoKD getDir() {\r\n return dir;\r\n }",
"@Basic @Raw\r\n\tpublic Directory getDir() {\r\n\t\treturn dir;\r\n\t}",
"private static String getDirname(String pathToFile) {\n\t\tString result = null;\n\t\tPath originalFile = Paths.get(pathToFile);\n\t\tPath resultDir = originalFile.getParent();\n\t\tif(resultDir != null) {\n\t\t\tlogger.debug(\"A parent path exists: {}\", resultDir.toString());\n\t\t\tresultDir.normalize(); // remove redundant elements from the path\n\t\t\tresult = resultDir.toString() + \"/\";\n\t\t\tlogger.debug(\"Normalized parent path: {}\", result);\n\t\t}\n\t\treturn result;\n\t}",
"public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}",
"public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }",
"public String getBaseDirectory()\n {\n return m_baseDirectory;\n }",
"public String fullFileName () {\n\t\tif (directory == null || directory.equals(\"\"))\n\t\t\treturn fileName;\n\t\telse\n\t\t\treturn directory + File.separator + fileName;\t//add a '\\' in the path\n\t}",
"protected static String getObjectDirPath(URI resource) {\n String ret = getObjectPath(resource);\n return ret.substring(0, ret.lastIndexOf('/') + 1);\n }",
"public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }",
"public String getName() { return FilePathUtils.getFileName(getPath()); }",
"public File getDirectory() {\n\t\treturn directory;\n\t}",
"public String filename() {\n\t int sep = fullPath.lastIndexOf(pathSeparator);\n\t return fullPath.substring(sep + 1);\n\t }",
"public static String getNodeDirStr(Node node) {\n\t\treturn node.root.dir.dir;\n\t}",
"public File getDirectory()\n {\n return directory;\n }",
"public Builder setDirName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n dirName_ = value;\n onChanged();\n return this;\n }",
"java.io.File getBaseDir();",
"public static String getLastDir() {\n return getProperty(\"lastdir\");\n }",
"public String getPath()\n\t{\n\t\tString previousPath = File.separator;\n\t\t\n\t\t//if there is a parent\n\t\tif(getParentDirectory() != null)\n\t\t{\n\t\t\t//write over the previous path with the parent's path and a slash\n\t\t\t// /path/to/parent\n\t\t\tpreviousPath = getParentDirectory().getPath() + File.separator;\n\t\t}\n\t\t//else- no parent, this is the root \"/\"\n\t\t\n\t\t//add the name, /path/to/parent/thisdir \n\t\treturn previousPath + getName();\t\t\n\t}",
"public String getPath() {\n\t\treturn pfDir.getPath();\n\t}",
"public final String getModuleDirectory() {\n return properties.get(MODULE_DIRECTORY_PROPERTY);\n }",
"public static String folder(String filename) {\n return new File(filename).getParentFile().getAbsolutePath() + \"/\";\n }",
"private String getDirectory(String timedObjectId) {\n String dirName = directories.get(timedObjectId);\n if (dirName == null) {\n dirName = baseDir.getAbsolutePath() + File.separator + timedObjectId.replace(File.separator, \"-\");\n File file = new File(dirName);\n if(!file.exists()) {\n if(!file.mkdirs()) {\n logger.error(\"Could not create directory \" + file + \" to persist EJB timers.\");\n }\n }\n directories.put(timedObjectId, dirName);\n }\n return dirName;\n }",
"public String getFolder() {\n return myFolder;\n }",
"String folderPath();",
"@Override\n\tpublic String getName() {\n\t\treturn new File(relativePath).getName();\n\t}",
"public String getImageDir() {\n return (String) data[GENERAL_IMAGE_DIR][PROP_VAL_VALUE];\n }",
"FsPath baseDir();",
"private String getSolverDirName() {\n\t\tString solverName = \"yksuh\";\n\t\treturn solverName;\n\t}",
"public Directory getDirectory() {\n\n\tif( _directory == null) { // If the current directory was not already parsed,\n \n \t _directory = parseDirectory(); // parse it.\n\t}\n\n\treturn _directory; // Return the current root directory.\n }",
"public File getFolderNameToSave() {\n\t\tFile destDir = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (!destDir.exists()) {\n\t\t\tdestDir.mkdir();\n\t\t}\n\t\treturn destDir;\n\t}",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }",
"private String getDirectoryParameter(PluginCall call) {\n return call.getString(\"directory\");\n }",
"String getFolderName(Date date);",
"public final File getISdirectory()\n {\n return is_directory;\n }",
"public File getDirectoryValue();",
"@Override\r\n public String getBaseName() {\r\n if (baseName == null) {\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1) {\r\n baseName = getPath();\r\n } else {\r\n baseName = getPath().substring(idx + 1);\r\n }\r\n }\r\n\r\n return baseName;\r\n }",
"protected String path() {\n return path(getName());\n }",
"public String getDirAddress() {\n return dirAddress;\n }",
"public String getFolder() {\r\n return folder;\r\n }",
"@Internal(\"Represented as part of archivePath\")\n public File getDestinationDir() {\n return destinationDir;\n }",
"public String getDN() {\n\t\treturn url.getDN();\n }",
"public static String getFileDirectory(String urlFileGenerated) {\r\n\r\n\t\tString result = \"\";\r\n\r\n\t\tif (urlFileGenerated != null) {\r\n\t\t\tresult = urlFileGenerated.substring(0, urlFileGenerated.lastIndexOf(\"/\") + 1);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\r\n\t}",
"public String getBasename()\n {\n // Default implementation: getBasename of path \n return _nodeVRL.getBasename(); \n }",
"private String getDirectoryForBackup() {\n\t\tString backupPath = configurationService.getValue(BACKUP_FOLDER_CONFIG);\n\t\tif (backupPath == null) {\n\t\t\t// if backup path null throw error, backup folder must be set\n\t\t\tthrow new ResultCodeException(CoreResultCode.BACKUP_FOLDER_NOT_FOUND,\n\t\t\t\t\tImmutableMap.of(\"property\", BACKUP_FOLDER_CONFIG));\n\t\t}\n\t\t// apend script default backup folder\n\t\tbackupPath = backupPath + \"/\" + SCRIPT_DEFAULT_BACKUP_FOLDER;\n\t\t// add date folder\n\t\tZonedDateTime date = ZonedDateTime.now();\n\t\tDecimalFormat decimalFormat = new DecimalFormat(\"00\");\n\t\treturn backupPath + date.getYear() + decimalFormat.format(date.getMonthValue())\n\t\t\t\t+ decimalFormat.format(date.getDayOfMonth()) + \"/\";\n\t}",
"public static String getRootFolderName() {\n\n return rootFolderName;\n }",
"public String getDefDir() {\n\n\t\t// String newDefDir = defDir.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\");\n\n\t\treturn defDir;\n\n\t}",
"private String nameFolder() {\n\t\tString stringUrl = url.toString();\n\t\tint position1 = stringUrl.indexOf(\"://www.\"); \t\t\t\t // position of first \":\"\n\t\tint position2; \t\t\t\t\t\t \t\t\t\t\t // position before the country's suffix\n\n\t\ttry {\n\t\t\t// case link is something \"http://listofrandomwords.com/\"\n\t\t\tif (position1 == -1) {\n\t\t\t\tposition1 = stringUrl.indexOf(\"://\"); \t\t\t\t\t // position of \":\"\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 6);\t\t\t\t\t\t// position of first \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 3, position2); \t// position + 3 = first letter of domain\n\t\t\t} else {\n\t\t\t\tposition2 = stringUrl.indexOf(\".\", 12);\t\t\t\t\t\t// position of second \".\"\n\t\t\t\treturn stringUrl.substring(position1 + 7, position2);\t\t// position + 7 = first letter of domain\n\t\t\t}\n\t\t} catch (StringIndexOutOfBoundsException e) {\n\t\t\tRandom ran = new Random();\n\t\t\treturn RANDOM_WORDS[ran.nextInt(RANDOM_WORDS.length - 1)];\n\t\t}\n\t}",
"public WebFile getDir() { return _gdir; }"
]
| [
"0.7228201",
"0.7174553",
"0.71007735",
"0.70537984",
"0.6746916",
"0.6733758",
"0.6631235",
"0.66133595",
"0.63700366",
"0.6362447",
"0.6277463",
"0.6267955",
"0.6214054",
"0.6174895",
"0.6097098",
"0.6076316",
"0.60622245",
"0.6013984",
"0.6003959",
"0.6003449",
"0.5995515",
"0.5995515",
"0.5948127",
"0.5907567",
"0.5893071",
"0.58884305",
"0.5864596",
"0.5857243",
"0.5839781",
"0.583376",
"0.58171815",
"0.5815879",
"0.5814762",
"0.58104694",
"0.5798994",
"0.5794694",
"0.57922333",
"0.5765321",
"0.5739247",
"0.571898",
"0.5716427",
"0.5712502",
"0.57048035",
"0.5704399",
"0.5691379",
"0.5685692",
"0.5684892",
"0.5676309",
"0.56752276",
"0.5672668",
"0.5667204",
"0.5663577",
"0.56576014",
"0.56526834",
"0.5624411",
"0.5617439",
"0.55952585",
"0.559274",
"0.55530524",
"0.5549214",
"0.55485916",
"0.55388415",
"0.5536011",
"0.55329657",
"0.55227226",
"0.551357",
"0.5503421",
"0.5483388",
"0.54824305",
"0.54685736",
"0.54398304",
"0.5436496",
"0.54363126",
"0.54202944",
"0.5417343",
"0.5416826",
"0.5397025",
"0.5388874",
"0.53815854",
"0.53805566",
"0.53679574",
"0.53618926",
"0.53579277",
"0.53486836",
"0.534731",
"0.53454834",
"0.5338019",
"0.5324887",
"0.531551",
"0.5310397",
"0.5305251",
"0.5290309",
"0.5289347",
"0.5282538",
"0.52785486",
"0.5276841",
"0.5269241",
"0.526899",
"0.52588534",
"0.5242289"
]
| 0.60867065 | 15 |
Creates a URI from a path, the path can be relative or absolute, '\' and '/' are normalised. | public static URI createURI(String path) {
path = path.replace('\\', '/');
return URI.create(encodeURI(path));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String uri(String path) {\n return baseURI + '/' + path;\n }",
"Uri.Builder with(String path) {\n return Uri.parse(toPath() + path).buildUpon();\n }",
"URI createURI();",
"@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}",
"private static URIBuilder createURIBuilder(String path) {\n\t\tURIBuilder builder = new URIBuilder();\n\t\tif(path.contains(\"?\")) {\n\t\t\tString uri = path.substring(0, path.indexOf(\"?\"));\n\t\t\tString queryParamName = path.substring(path.indexOf(\"?\") + 1, path.indexOf(\"=\"));\n\t\t\tString queryParamValue = path.substring(path.indexOf(\"=\") + 1);\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(uri).setParameter(queryParamName, queryParamValue);\n\t\t}\n\t\telse {\n\t\t\tbuilder.setScheme(\"http\").setHost(HOST).setPath(path);\n\t\t}\n\t\treturn builder;\n\t}",
"@Override\n public URI createUri(String url) {\n try {\n this.uri = new URI(url);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n return uri;\n }",
"private URI makeUri(String source) throws URISyntaxException {\n if (source == null)\n source = \"\";\n\n if ((source.length()>0)&&((source.substring(source.length() - 1)).equals(\"/\") ))\n source=source.substring(0, source.length() - 1);\n\n return new URI( source.toLowerCase() );\n }",
"public URIBuilder setPath(final String path) {\n this.path = path;\n this.encodedSchemeSpecificPart = null;\n this.encodedPath = null;\n return this;\n }",
"private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormalized = \"/\" + normalized;\n\t\t}\n\n\t\t// Resolve occurrences of \"//\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"//\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 1);\n\t\t}\n\n\t\t// Resolve occurrences of \"%20\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"%20\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index) + \" \"\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Resolve occurrences of \"/./\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/./\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 2);\n\t\t}\n\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/../\");\n\t\t\tif (index < 0)\n\t\t\t\tbreak;\n\t\t\tif (index == 0) {\n\t\t\t\treturn (null); // Trying to go outside our context\n\t\t\t}\n\t\t\tint index2 = normalized.lastIndexOf('/', index - 1);\n\t\t\tnormalized = normalized.substring(0, index2)\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Return the normalized path that we have completed\n\t\treturn (normalized);\n\t}",
"public URL makeUrl(String path) throws IOException {\n path = Val.chkStr(path);\n URL url = null;\n \n if ((_localFolder.length() > 0) && (_externalFolder.length() > 0) &&\n path.startsWith(_localFolder)) {\n path = _externalFolder+path.substring(_localFolder.length());\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = new URL(path); \n \n } else {\n //url = this.getClass().getClassLoader().getResource(path);\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = Thread.currentThread().getContextClassLoader().getResource(path);\n }\n if (url == null) {\n throw new IOException(\"Unable to create resource URL for path: \"+path);\n }\n return url;\n}",
"public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }",
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }",
"URI uri();",
"private static File parsePath(String path) {\n\t\tpath = (path == null ? \"\" : path.trim());\n\t\tif (path.startsWith(\"file://\")) {\n\t\t\tpath = path.substring(\"file://\".length());\n\t\t} else if (path.startsWith(\"file:\")) { \n\t\t\tpath = path.substring(\"file:\".length());\t\n\t\t}\n\t\t\n\t\tif (path.length() == 0 || path.equals(\".\")) {\n\t\t\tpath = System.getProperty(\"user.dir\", \".\"); // CWD\n\t\t} else {\t\n\t\t\t// convert separators to native format\n\t\t\tpath = path.replace('\\\\', File.separatorChar);\n\t\t\tpath = path.replace('/', File.separatorChar);\n\t\t\t\n\t\t\tif (path.startsWith(\"~\")) {\n\t\t\t\t// substitute Unix style home dir: ~ --> user.home\n\t\t\t\tString home = System.getProperty(\"user.home\", \"~\");\n\t\t\t\tpath = home + path.substring(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new File(path);\n\t}",
"public final void mURI_PATH() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:457:18: ( ( ALPHANUM | UNDERSCORE | DASH | COLON | DOT | HASH | QUESTION | SLASH ) )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t{\n\t\t\tif ( input.LA(1)=='#'||(input.LA(1) >= '-' && input.LA(1) <= ':')||input.LA(1)=='?'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public URI(String p_scheme, String p_host, String p_path,\n String p_queryString, String p_fragment)\n throws MalformedURIException {\n this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);\n }",
"public static byte[] preparePath(final byte[] path) {\n String p = MetaData.normPath(string(path));\n if(Strings.endsWith(p, '/')) p = p.substring(0, p.length() - 1);\n return concat(SLASH, token(p));\n }",
"Path createPath();",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public Path(String path) {\n this(null, path);\n }",
"public static URI addPath(URI uri, Path subpath) {\r\n final String scheme = uri.getScheme();\r\n final String userInfo = uri.getUserInfo();\r\n final String host = uri.getHost();\r\n final int port = uri.getPort();\r\n final String path = getPath(uri).append(subpath).getPathname();\r\n final String query = uri.getQuery();\r\n final String fragment = uri.getFragment();\r\n try {\r\n return new URI(scheme, userInfo, host, port, path, query, fragment);\r\n } catch (URISyntaxException e) {\r\n throw new IllegalArgumentException(e);\r\n }\r\n }",
"public static String makeResourceFromURI(String uri) {\n String path = uri.substring(MagicNames.ANTLIB_PREFIX.length());\n String resource;\n if (path.startsWith(\"//\")) {\n //handle new style full paths to an antlib, in which\n //all but the forward slashes are allowed.\n resource = path.substring(\"//\".length());\n if (!resource.endsWith(\".xml\")) {\n //if we haven't already named an XML file, it gets antlib.xml\n resource += ANTLIB_XML;\n }\n } else {\n //convert from a package to a path\n resource = path.replace('.', '/') + ANTLIB_XML;\n }\n return resource;\n }",
"public static String unixPath(String path) {\n String convert = path.replace(\"\\\\\", \"/\");\n return convert;\n }",
"Uri decryptedPath();",
"private static URI createUri(String eventSource, String protocol, String resource) {\n if (eventSource.contains(\"://\")) {\n // Defines the event source the full path? Indicated by containing more than the protocol (://) and top-level slashes\n return eventSource.chars().filter(ch -> ch == '/').count() > 3\n ? URI.create(eventSource)\n : URI.create(eventSource + resource);\n } else {\n // Defines the event source the sub path?\n return eventSource.chars().filter(ch -> ch == '/').count() > 1\n ? URI.create(protocol + \"://\" + eventSource)\n : URI.create(protocol + \"://\" + eventSource + resource);\n }\n }",
"public static String decodePath(String href) {\r\n // For IPv6\r\n href = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n // Seems that some client apps send spaces.. maybe..\r\n href = href.replace(\" \", \"%20\");\r\n // ok, this is milton's bad. Older versions don't encode curly braces\r\n href = href.replace(\"{\", \"%7B\").replace(\"}\", \"%7D\");\r\n try {\r\n if (href.startsWith(\"/\")) {\r\n URI uri = new URI(\"http://anything.com\" + href);\r\n return uri.getPath();\r\n } else {\r\n URI uri = new URI(\"http://anything.com/\" + href);\r\n String s = uri.getPath();\r\n return s.substring(1);\r\n }\r\n } catch (URISyntaxException ex) {\r\n throw new RuntimeException(ex);\r\n }\r\n }",
"public static void parseFullPath(String path, IUriListener listener) {\n if (path == null) {\n path = \"\";\n }\n char[] array = path.toCharArray();\n parseFullPath(array, listener);\n }",
"public static String uriToPath(String u) {\n return uriToPath(uriStoreLocation(u), u.substring(6));\n }",
"public URI(String p_uriSpec) throws MalformedURIException {\n this((URI)null, p_uriSpec);\n }",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"interface UriBuilderFactory {\n UriBuilder fromLink(Link link);\n\n UriBuilder fromPath(String s);\n\n UriBuilder fromUri(URI uri);\n}",
"public static Path makeAbsolute( Path path, final Configuration conf) throws IOException\r\n\t{\r\n\t\tFileSystem fs = path.getFileSystem(conf);\r\n\t\tif (!path.isAbsolute()) {\r\n\t\t\tpath = new Path(fs.getWorkingDirectory(), path);\r\n\t\t}\r\n\t\t\r\n\t\tURI pathURI = path.makeQualified(fs).toUri();\r\n\t\treturn new Path(pathURI.getPath());\r\n\t\t\r\n\t}",
"static Path absolute(final Path path) {\n return path.toAbsolutePath().normalize();\n }",
"Uri encryptedPath();",
"public final void mSTRING_URI() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = STRING_URI;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:472:3: ( SCHEMA COLON DOUBLE_SLASH ( URI_PATH )* )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:472:5: SCHEMA COLON DOUBLE_SLASH ( URI_PATH )*\n\t\t\t{\n\t\t\tmSCHEMA(); \n\n\t\t\tmCOLON(); \n\n\t\t\tmDOUBLE_SLASH(); \n\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:472:31: ( URI_PATH )*\n\t\t\tloop6:\n\t\t\twhile (true) {\n\t\t\t\tint alt6=2;\n\t\t\t\tint LA6_0 = input.LA(1);\n\t\t\t\tif ( (LA6_0=='#'||(LA6_0 >= '-' && LA6_0 <= ':')||LA6_0=='?'||(LA6_0 >= 'A' && LA6_0 <= 'Z')||LA6_0=='_'||(LA6_0 >= 'a' && LA6_0 <= 'z')) ) {\n\t\t\t\t\talt6=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt6) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t\t\t{\n\t\t\t\t\tif ( input.LA(1)=='#'||(input.LA(1) >= '-' && input.LA(1) <= ':')||input.LA(1)=='?'||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\t\t\trecover(mse);\n\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tbreak loop6;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public static void parseFullPath(char[] path, IUriListener listener) {\n UriParser parser = new UriParser(listener);\n parser.parseFullPath(path, 0);\n }",
"public static String composePath(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\tFile file = new File(uri);\n\t\t\treturn file.toString();\n\t\t} else if (base != null) {\n\t\t\tFile file = new File(new File(base), uri.toString());\n\t\t\treturn file.toString();\n\t\t}\n\t\treturn relativePath;\n\t}",
"public URI(String p_scheme, String p_userinfo,\n String p_host, int p_port, String p_path,\n String p_queryString, String p_fragment)\n throws MalformedURIException {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n throw new MalformedURIException(\"Scheme is required!\");\n }\n \n if (p_host == null) {\n if (p_userinfo != null) {\n throw new MalformedURIException(\n \"Userinfo may not be specified if host is not specified!\");\n }\n if (p_port != -1) {\n throw new MalformedURIException(\n \"Port may not be specified if host is not specified!\");\n }\n }\n \n if (p_path != null) {\n if (p_path.indexOf('?') != -1 && p_queryString != null) {\n throw new MalformedURIException(\n \"Query string cannot be specified in path and query string!\");\n }\n \n if (p_path.indexOf('#') != -1 && p_fragment != null) {\n throw new MalformedURIException(\n \"Fragment cannot be specified in both the path and fragment!\");\n }\n }\n \n setScheme(p_scheme);\n setHost(p_host);\n setPort(p_port);\n setUserinfo(p_userinfo);\n setPath(p_path);\n setQueryString(p_queryString);\n setFragment(p_fragment);\n }",
"protected String getEscapedUri(String uriToEscape) {\r\n\t\treturn UriComponent.encode(uriToEscape, UriComponent.Type.PATH_SEGMENT);\r\n\t}",
"public URI() {\n }",
"public static String decodePath(String href) {\r\n\t\t// For IPv6\r\n\t\thref = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n\t\t// Seems that some client apps send spaces.. maybe..\r\n\t\thref = href.replace(\" \", \"%20\");\r\n\t\ttry {\r\n\t\t\tif (href.startsWith(\"/\")) {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com\" + href);\r\n\t\t\t\treturn uri.getPath();\r\n\t\t\t} else {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com/\" + href);\r\n\t\t\t\tString s = uri.getPath();\r\n\t\t\t\treturn s.substring(1);\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException ex) {\r\n\t\t\tthrow new RuntimeException(ex);\r\n\t\t}\r\n\t}",
"public static String getUriPathFromUrl(final String url) {\n // URI = scheme:[//authority]path[?query][#fragment]\n String uri = url;\n if(url != null && url.length() > 0) {\n final int ejbcaIndex = url.indexOf(\"/ejbca\");\n if (ejbcaIndex != -1) {\n uri = url.substring(ejbcaIndex);\n // TODO Temporary\n uri = uri.replaceAll(\"//\", \"/\");\n final int questionMarkIndex = uri.indexOf('?');\n uri = (questionMarkIndex == -1 ? uri : uri.substring(0, questionMarkIndex));\n final int semicolonIndex = uri.indexOf(';');\n uri = (semicolonIndex == -1 ? uri : uri.substring(0, semicolonIndex));\n final int numberSignIndex = uri.indexOf('#');\n uri = (numberSignIndex == -1 ? uri : uri.substring(0, numberSignIndex));\n }\n }\n return uri;\n }",
"public URL getURL(String path) throws MalformedURLException {\n\t\treturn new URL(this.urlBase.getProtocol(), this.urlBase.getHost(), this.urlBase.getPort(), this.urlBase.getFile() + path);\n\t}",
"private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}",
"@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) throws URISyntaxException {\n\t\tSystem.out.println(\"Creating \\\"Path\\\" instances:\");\n\t\tSystem.out.println(\" p1 = d:/Temp/E53Z/Archives/\");\n\t\tSystem.out.println(\" p2 = /tmp/foo\");\n\t\tSystem.out.println(\" p3 = file:///Users/joe/FileTest.java\");\n\t\tPath p1 = Paths.get(\"d:/Temp/E53Z/Archives/\");\n\t\tPath p2 = Paths.get(\"/tmp/foo\");\n\t\tPath p3 = Paths.get(URI.create(\"file:///Users/joe/FileTest.java\"));\n\n\t\t/* Retrieving Information about a Path */\n\t\tSystem.out.println(\"\\nRetrieving information about a Path\");\n\t\tSystem.out.format(\" p1.toString: %s%n\", p1.toString() );\n\t\tSystem.out.format(\" p1.getFileName: %s%n\", p1.getFileName() );\n\t\tSystem.out.format(\" p1.getName(0): %s%n\", p1.getName(0) );\n\t\tSystem.out.format(\" p1.getNameCount: %d%n\", p1.getNameCount());\n\t\tSystem.out.format(\" p1.subpath(0,2): %s%n\", p1.subpath(0,2) );\n\t\tSystem.out.format(\" p1.getParent: %s%n\", p1.getParent() );\n\t\tSystem.out.format(\" p1.getRoot: %s%n\", p1.getRoot() );\n\t\t\n\t\t/* Removing Redundancies From a Path */\n\t\tSystem.out.println(\"\\nRemoving redundancies From a Path\");\n\t\tPath p4 = Paths.get(\"/home/sally/../joe/foo\");\n\t\tSystem.out.println(\" Ful path: \" + p4);\n\t\tSystem.out.println(\" Normalized path: \" + p4.normalize());\n\n\t\t/* Converting a Path */\n\t\tSystem.out.println(\"\\nConverting a Path\");\n\t\tPath p5 = Paths.get(\"/Home/logFile/\");\n\t\tSystem.out.println(\" p5.toUri: \" + p5.toUri());\n\t\tSystem.out.println(\" p5.toAbsolutePath: \" + p5.toAbsolutePath());\n\t\ttry {\n\t\t\tSystem.out.println(\" p5.toRealPath: \" + p5.toRealPath(LinkOption.NOFOLLOW_LINKS));\n\t\t} catch (NoSuchFileException x) {\n\t\t System.out.format(\" Exception: p5 = %s: no such\" + \" file or directory%n\", p5);\n\t\t // Logic for case when file doesn't exist.\n\t\t} catch (IOException x) {\n\t\t System.out.format(\" Exception: %s%n\", x);\n\t\t // Logic for other sort of file error.\n\t\t}\n\t\t\n\t\t/* Joining two paths */\n\t\tSystem.out.println(\"\\nJoining two paths\");\n\t\tPath p6 = Paths.get(\"/Home/logFile/\");\n\t\tPath p7 = Paths.get(\"log.txt\");\n\t\tSystem.out.println(\" p6 = \" + p6);\n\t\tSystem.out.println(\" p7 = \" + p7);\n\t\tSystem.out.println(\" p6.resolve(p7) = \" + p6.resolve(p7));\n\t\t\n\t\t/* Creating a path between two paths */\n\t\tSystem.out.println(\"\\nCreating a path between two paths\");\n\t\tPath p8 = Paths.get(\"D:/Home/logFileS/\");\n\t\tPath p9 = Paths.get(\"D:/Home/TextFiles/\");\n\t\tSystem.out.println(\" p8 = \" + p8);\n\t\tSystem.out.println(\" p9 = \" + p9);\n\t\tSystem.out.println(\" p8.relativize(p9) = \" + p8.relativize(p9));\n\t\tSystem.out.println(\" !!! Paths.get(\\\"\\\").toAbsolutePath().toString(); = \" + Paths.get(\"\").toAbsolutePath().toString());\n\t\tSystem.out.println(\" !!! p8.relativize(p9).toAbsolutePath() = \" + p8.relativize(p9).toAbsolutePath());\n\t\t\n\t\t/* Comparing Two Paths */\n\t\tSystem.out.println(\"\\nComparing two paths\");\n\t\tPath p10 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p11 = Paths.get(\"D:/Home\");\n\t\tPath p12 = Paths.get(\"logFiles\");\n\t\tPath p13 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p14 = Paths.get(\"D:/Home/TextFiles/../logFiles\");\n\t\tSystem.out.println(\" p10 = \" + p10);\n\t\tSystem.out.println(\" p11 = \" + p11);\n\t\tSystem.out.println(\" p12 = \" + p12);\n\t\tSystem.out.println(\" p13 = \" + p13);\n\t\tSystem.out.println(\" p14 = \" + p14);\n\t\tSystem.out.println(\" p10.equils(p13) = \" + p10.equals(p13));\n\t\tSystem.out.println(\" p10.startsWith(p11) = \" + p10.startsWith(p11));\n\t\tSystem.out.println(\" p10.endsWith(p12) = \" + p10.endsWith(p12));\n\t\tSystem.out.println(\" p10.equils(p14) = \" + p10.equals(p14));\n\t\ttry {\n\t\t\tSystem.out.println(\" Files.isSameFile(p10, p14) = \" + Files.isSameFile(p10, p14)); // It is true if both files(folders) exist.\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/* Iterating over Path \"p10\") */\n\t\tSystem.out.print(\"\\nIterating over Path \\\"p10\\\"\\n \");\n\t\tfor(Path name: p10){\n\t\t\tSystem.out.print(\"[\" + name + \"]\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public Builder setPath(String path) {\n\t\t\turl.path = path == null || path.isEmpty() ? null : path;\n\t\t\treturn this;\n\t\t}",
"@Override\n\tpublic URI createURI(String... parts) throws URISyntaxException {\n\t\treturn null;\n\t}",
"public URI toURI( URL url ) throws URISyntaxException {\n\t\treturn toURI(url.toString());\n\t}",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"public static IPath createPossiblyRelativePath(String pathString) {\r\n\t\t// canonicalize slashes\r\n\t\tchar[] pathChars = pathString.toCharArray();\r\n\t\tint offset = 0;\r\n\t\tfor (int i = 0; i < pathChars.length; i++) {\r\n\t\t\tif (pathChars[i] == '\\\\')\r\n\t\t\t\tpathChars[i] = '/';\r\n\t\t}\r\n\t\t\r\n\t\t// The problem is, if \"./\" appears, then \"../\"'s after it are dropped,\r\n\t\t// so get rid of \"./\" early. The result will still be relative.\r\n\t\twhile (offset + 2 <= pathChars.length) { \r\n\t\t\tif (pathChars[offset] == '.' && pathChars[offset+1] == '/') {\r\n\t\t\t\toffset += 2;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn PathUtils.createPath(new String(pathChars, offset, pathChars.length - offset));\r\n\t}",
"public URI(String p_scheme, String p_schemeSpecificPart)\n throws MalformedURIException {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n throw new MalformedURIException(\n \"Cannot construct URI with null/empty scheme!\");\n }\n if (p_schemeSpecificPart == null ||\n p_schemeSpecificPart.trim().length() == 0) {\n throw new MalformedURIException(\n \"Cannot construct URI with null/empty scheme-specific part!\");\n }\n setScheme(p_scheme);\n setPath(p_schemeSpecificPart);\n }",
"String getRealPath(String path);",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"public static PathAnchor filesystem(String path) {\n if (path == null) {\n throw new NullPointerException(\"passed path was null\");\n }\n return filesystem(Paths.get(path));\n }",
"public URI toURI( String location ) throws URISyntaxException {\n\t\treturn new URI( Strings.nvl(location).replace(\" \", \"%20\"));\n\t}",
"public Path(Path parent, String path) {\n this.parts = (parent == null) ? ArrayUtils.EMPTY_STRING_ARRAY : parent.parts;\n path = StringUtils.stripStart(path, \"/\");\n this.index = path.equals(\"\") || path.endsWith(\"/\");\n path = StringUtils.stripEnd(path, \"/\");\n if (!path.equals(\"\")) {\n String[] child = path.split(\"/\");\n String[] res = new String[this.parts.length + child.length];\n for (int i = 0; i < this.parts.length; i ++) {\n res[i] = this.parts[i];\n }\n for (int i = 0; i < child.length; i++) {\n res[this.parts.length + i] = child[i];\n }\n this.parts = res;\n }\n }",
"public URIImpl(String uriString) {\r\n\t\tthis(uriString, true);\r\n\t}",
"public InputSource makeInputSource(String path) throws IOException {\n return new InputSource(makeUrl(path).toString());\n}",
"public static String getPath(String uri) {\n return createUri(uri).getPath();\n }",
"public External withPath(String path) {\n this.path = path;\n return this;\n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public static File toFile(URI uri) {\n// if (uri.getScheme() == null) {\n// try {\n// uri = new URI(\"file\", uri.getSchemeSpecificPart(), null);\n// } catch (URISyntaxException e) {\n// // should never happen\n// Logger.getLogger(URIUtils.class).fatal(uri, e);\n// }\n// }\n\t\treturn new File((File) null, uri.getSchemeSpecificPart());\n\t}",
"public Builder setPath(final String value) {\n _path = value;\n return self();\n }",
"public void setPath(String p_path) throws MalformedURIException {\n if (p_path == null) {\n m_path = null;\n m_queryString = null;\n m_fragment = null;\n }\n else {\n initializePath(p_path, 0);\n }\n }",
"URI getUri();",
"public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformFromShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private static void createPath(Path path) {\r\n\t\tString tempStr = \"\";\r\n\t\tint finished = 1;\r\n\t\tint tempId = -1;\r\n\t\tList<GeoCoordinate> polyline = new ArrayList<GeoCoordinate>();\r\n\t\tList<Place> placeList = new ArrayList<Place>();\r\n\t\tContainerNII pathNii = new ContainerNII();\r\n\t\tPlace place;\r\n\t\t\r\n\t\twhile (finished == 1){\r\n\t\t\t\r\n\t\t\tplace = new Place();\r\n\t\t\tcreatePlace(place);\r\n\t\t\tplaceList.add(place);\r\n\t\t\tfinished = checkContinue(\"place\");\r\n\t\t}\r\n\t\tpath.setPlaces(placeList);\r\n\t\t\r\n\t\tif ((tempId = insertInteger(\"path id: \")) != -1)\r\n\t\t\tpath.setId(tempId);\t\r\n\t\t\r\n\t\tinsertNIIValues(pathNii, \"path\");\r\n\t\tpath.setNii(pathNii);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path length: \")) != null)\r\n\t\t\tpath.setLength(tempStr);\r\n\t\t\r\n\t\tinsertPolyline(polyline, strPath);\r\n\t\tpath.setPolyline(polyline);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path duration: \")) != null)\r\n\t\t\tpath.setDuration(tempStr);\r\n\t\t\r\n\t}",
"@Override\n\tpublic URL getURL(String uri) throws MalformedURLException {\n\t\tif (uri.length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Empty URI\");\n\t\t}\n\t\tURL url;\n\t\tif (uri.indexOf(\"://\") < 0) {\n\t\t\turl = new URL(getBaseURL(), uri);\n\t\t} else {\n\t\t\turl = new URL(uri);\n\t\t}\n\t\treturn url;\n\t}",
"public Resource createResourceFromUri(String uri)\n\t{\n\t\turi = this.replaceNamespacePrefixes(uri);\n\t\treturn this.model.createResource(uri);\n\t}",
"public URI buildUri(String name) {\n return URI.create(String.format(\"%s/%s\",\n config.getSftpListingDirectoryPath(),\n name));\n }",
"public void buildPathPart(Appendable buffer, String uri) throws WebAppConfigurationException, IOException {\n buildPathPart(buffer, uri, null);\n }",
"public UriParser(String uri) {\n try {\n checkedParse(uri);\n\n } catch (URISyntaxException e) {\n throw new RuntimeException(e);\n }\n }",
"public static Uri createUri(Class<? extends Model> type, Long id) {\n final StringBuilder uri = new StringBuilder();\n uri.append(\"content://\");\n uri.append(sAuthority);\n uri.append(\"/\");\n uri.append(Cache.getTableName(type).toLowerCase());\n\n if (id != null) {\n uri.append(\"/\");\n uri.append(id.toString());\n }\n\n return Uri.parse(uri.toString());\n }",
"public static PathAnchor filesystem(Path path) {\n if (path == null) {\n throw new NullPointerException(\"passed path was null\");\n }\n return new Filesystem(path);\n }",
"public static URI toURI(String filenameOrFileURI) {\n File file = toFile(filenameOrFileURI);\n return file==null?null:file.toURI();\n }",
"ObservablePath createObservablePath(final Path path) {\n return IOC.getBeanManager().lookupBean(ObservablePath.class).getInstance().wrap(path);\n }",
"public URI(URI p_other) {\n initialize(p_other);\n }",
"Object create(String uri) throws IOException, SAXException, ParserConfigurationException;",
"public void appendPath(String p_addToPath)\n throws MalformedURIException {\n if (p_addToPath == null || p_addToPath.trim().length() == 0) {\n return;\n }\n \n if (!isURIString(p_addToPath)) {\n throw new MalformedURIException(\n \"Path contains invalid character!\");\n }\n \n if (m_path == null || m_path.trim().length() == 0) {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = p_addToPath;\n }\n else {\n m_path = \"/\" + p_addToPath;\n }\n }\n else if (m_path.endsWith(\"/\")) {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = m_path.concat(p_addToPath.substring(1));\n }\n else {\n m_path = m_path.concat(p_addToPath);\n }\n }\n else {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = m_path.concat(p_addToPath);\n }\n else {\n m_path = m_path.concat(\"/\" + p_addToPath);\n }\n }\n }",
"private static URI toResourceURI( Class<?> baseClass, String baseDir) {\n try {\n return\n baseClass != null\n ? baseClass.getResource( baseDir==null? \".\" : baseDir).toURI()\n : new URI( \"file://\" + (baseDir==null? \"\" : baseDir));\n }\n catch( Exception e) {\n throw new IllegalArgumentException( \"Can't create URI\", e);\n }\n }",
"private String encodeUri(String uri) {\n\t\t\tString newUri = \"\";\n\t\t\tStringTokenizer st = new StringTokenizer(uri, \"/ \", true);\n\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\tString tok = st.nextToken();\n\t\t\t\tif (\"/\".equals(tok)) {\n\t\t\t\t\tnewUri += \"/\";\n\t\t\t\t} else if (\" \".equals(tok)) {\n\t\t\t\t\tnewUri += \"%20\";\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewUri += URLEncoder.encode(tok, \"UTF-8\");\n\t\t\t\t\t} catch (UnsupportedEncodingException ignored) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn newUri;\n\t\t}",
"private String addQueryToPath(\n String path,\n String fullUri) {\n\n String response = path;\n int index = fullUri.indexOf(\"?\");\n if (index == -1) {\n index = fullUri.indexOf(\"&\");\n }\n if (index != -1) {\n String query = fullUri.substring(index);\n if (query.isEmpty()) {\n response = path;\n } else {\n response = path + query;\n }\n }\n return response;\n }",
"java.lang.String getUri();",
"java.lang.String getUri();",
"public URIBuilder(final URI uri) {\n super();\n digestURI(uri);\n }",
"@Override // com.fasterxml.jackson.databind.deser.std.FromStringDeserializer\n public final Uri A0Q(String str, AbstractC02210iH r3) throws IOException, C03620oC {\n return Uri.parse(str);\n }",
"@Test\n public void testPathParsing_withAlternateSeparator() {\n PathService windowsPathService = PathServiceTest.fakeWindowsPathService();\n assertEquals(\n windowsPathService.parsePath(\"foo\\\\bar\\\\baz\"), windowsPathService.parsePath(\"foo/bar/baz\"));\n assertEquals(\n windowsPathService.parsePath(\"C:\\\\foo\\\\bar\"), windowsPathService.parsePath(\"C:\\\\foo/bar\"));\n assertEquals(\n windowsPathService.parsePath(\"c:\\\\foo\\\\bar\\\\baz\"),\n windowsPathService.parsePath(\"c:\", \"foo/\", \"bar/baz\"));\n }",
"@Test\n public void testToAbsolute_String_String() throws Exception {\n System.out.println(\"toAbsolute\");\n String base = \"http://user:[email protected]:8080/to/path/document?arg1=val1&arg2=val2#part\";\n String relative = \"../path2/doc2?a=1&b=2#part2\";\n String expResult = \"http://user:[email protected]:8080/to/path2/doc2?a=1&b=2#part2\";\n String result = URLParser.toAbsolute(base, relative);\n assertEquals(expResult, result);\n }",
"public URI(URI p_base, String p_uriSpec) throws MalformedURIException {\n initialize(p_base, p_uriSpec);\n }",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"@Deprecated\r\n\tpublic static URI create(String uriString) {\r\n\t\treturn new URIImpl(uriString);\r\n\t}",
"private void initializePath(String p_uriSpec, int p_nStartIndex)\n throws MalformedURIException {\n if (p_uriSpec == null) {\n throw new MalformedURIException(\n \"Cannot initialize path from null string!\");\n }\n \n int index = p_nStartIndex;\n int start = p_nStartIndex;\n int end = p_uriSpec.length();\n char testChar = '\\0';\n \n // path - everything up to query string or fragment\n if (start < end) {\n // RFC 2732 only allows '[' and ']' to appear in the opaque part.\n if (getScheme() == null || p_uriSpec.charAt(start) == '/') {\n \n // Scan path.\n // abs_path = \"/\" path_segments\n // rel_path = rel_segment [ abs_path ]\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Path contains invalid escape sequence!\");\n }\n index += 2;\n }\n // Path segments cannot contain '[' or ']' since pchar\n // production was not changed by RFC 2732.\n else if (!isPathCharacter(testChar)) {\n if (testChar == '?' || testChar == '#') {\n break;\n }\n throw new MalformedURIException(\n \"Path contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n else {\n \n // Scan opaque part.\n // opaque_part = uric_no_slash *uric\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '?' || testChar == '#') {\n break;\n }\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Opaque part contains invalid escape sequence!\");\n }\n index += 2;\n }\n // If the scheme specific part is opaque, it can contain '['\n // and ']'. uric_no_slash wasn't modified by RFC 2732, which\n // I've interpreted as an error in the spec, since the \n // production should be equivalent to (uric - '/'), and uric\n // contains '[' and ']'. - mrglavas\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Opaque part contains invalid character: \" + testChar);\n }\n ++index;\n }\n }\n }\n m_path = p_uriSpec.substring(start, index);\n \n // query - starts with ? and up to fragment or end\n if (testChar == '?') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n if (testChar == '#') {\n break;\n }\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Query string contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Query string contains invalid character: \" + testChar);\n }\n index++;\n }\n m_queryString = p_uriSpec.substring(start, index);\n }\n \n // fragment - starts with #\n if (testChar == '#') {\n index++;\n start = index;\n while (index < end) {\n testChar = p_uriSpec.charAt(index);\n \n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(p_uriSpec.charAt(index+1)) ||\n !isHex(p_uriSpec.charAt(index+2))) {\n throw new MalformedURIException(\n \"Fragment contains invalid escape sequence!\");\n }\n index += 2;\n }\n else if (!isURICharacter(testChar)) {\n throw new MalformedURIException(\n \"Fragment contains invalid character: \"+testChar);\n }\n index++;\n }\n m_fragment = p_uriSpec.substring(start, index);\n }\n }",
"private String cleanPath(String path) {\n if(path == null)\n return path;\n if(path.equals(\"\") || path.equals(\"/\"))\n return path;\n\n if(!path.startsWith(\"/\"))\n path = \"/\" + path;\n path = path.replaceAll(\"/+\", \"/\");\n if(path.endsWith(\"/\"))\n path = path.substring(0,path.length()-1);\n return path;\n }",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"public static URIElement buildURIElement(String uri) throws AmazonException{\r\n\t\tint questionIndex = uri.indexOf('?');\r\n\t\tif(questionIndex > 0){\r\n\t\t\turi = uri.substring(0, questionIndex);\r\n\t\t}\r\n\t\tString[] uriElements = uri.split(\"/\");\r\n\t\tif(uriElements.length < 4){\r\n\t\t\tthrow new AmazonException(\"InCompatible URI: \" + uri);\r\n\t\t}\r\n\t\tString context = uriElements[1];\r\n\t\tString module = uriElements[2];\r\n\t\tString command = uriElements[3];\r\n\t\tString method = \"execute\";\r\n\t\tif(uriElements.length == 5 ){\r\n\t\t\tif(uriElements[4] != null || !uriElements[4].isEmpty()){\r\n\t\t\t\tmethod = uriElements[4];\r\n\t\t\t}\r\n\t\t}\r\n\t\tint dotIndex = method.indexOf('.');\r\n\t\tif(dotIndex > 0){\r\n\t\t\tmethod = method.substring(0, dotIndex);\r\n\t\t}\r\n\t\t\r\n\t\treturn new URIElement(context, module, command, method);\r\n\t}",
"public String createPath(String path, byte[] value) throws Exception {\n PathUtils.validatePath(path);//if bad format,here will throw some Exception;\n EnsurePath ensure = new EnsurePath(path).excludingLast();\n //parent path should be existed.\n //EnsurePath: retry + block\n ensure.ensure(zkClient); //ugly API\n return zkClient.getZooKeeper().create(path, value, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);\n }",
"@Test\n\tvoid testFileURI(@TempDir Path tempDir) {\n\t\tfinal File tempFile = tempDir.resolve(\"foo.bar\").toFile();\n\t\tfinal URI fileURI = Files.toURI(tempFile); //create a Java URI directly from a file\n\t\tassertThat(fileURI.getScheme(), is(FILE_SCHEME)); //file:\n\t\tassertTrue(fileURI.getRawPath().startsWith(ROOT_PATH)); //file:/\n\t\tassertFalse(fileURI.getRawPath().startsWith(ROOT_PATH + PATH_SEPARATOR + PATH_SEPARATOR)); //not file:/// (even though that is correct)\n\t}"
]
| [
"0.64221174",
"0.64071053",
"0.6135005",
"0.6081571",
"0.59039176",
"0.57918185",
"0.57036304",
"0.56729954",
"0.5621521",
"0.5524872",
"0.5439856",
"0.5423009",
"0.5404098",
"0.53751504",
"0.526981",
"0.526802",
"0.5261677",
"0.52109534",
"0.5199068",
"0.51957256",
"0.50642544",
"0.50062585",
"0.5003572",
"0.4980304",
"0.49796474",
"0.49320093",
"0.49260712",
"0.49159598",
"0.49114758",
"0.48805204",
"0.48786348",
"0.4867409",
"0.48385438",
"0.48066372",
"0.4803839",
"0.47933304",
"0.4789619",
"0.47881252",
"0.4780056",
"0.4779727",
"0.47487354",
"0.47438562",
"0.474275",
"0.47320938",
"0.47256353",
"0.470024",
"0.46923035",
"0.46818224",
"0.46679786",
"0.46664876",
"0.4665412",
"0.46472624",
"0.46450898",
"0.46415824",
"0.46367705",
"0.46366942",
"0.46329048",
"0.4623035",
"0.46212134",
"0.46060783",
"0.46027943",
"0.45922405",
"0.45869008",
"0.45838335",
"0.45824763",
"0.45774892",
"0.45772862",
"0.4577175",
"0.4575726",
"0.45173812",
"0.45072687",
"0.45007098",
"0.449822",
"0.44933712",
"0.4482452",
"0.44759005",
"0.4472272",
"0.44684336",
"0.44660193",
"0.44623342",
"0.4452161",
"0.4444368",
"0.44326073",
"0.44232568",
"0.44059545",
"0.4405717",
"0.4405717",
"0.4402115",
"0.4398939",
"0.43976063",
"0.438882",
"0.43810105",
"0.4378159",
"0.4377155",
"0.43764916",
"0.43754622",
"0.43688157",
"0.4368398",
"0.43644834",
"0.4353213"
]
| 0.8335001 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.